SRM and VMAX 20K Part X: Swap Volume and Resource Mappings

In this post I am going to quickly cover the configuration of hosts for SRM. There isn’t a huge amount to cover and essentially it comes down to:

– Swap volume configuration
– Resource Mappings & Placeholder

The reason these bits need some thought is simple, if you are failing over a VM with 32GB of memory and no reservation, the swap file will by default live with the VM and take up 32GB space on the datastore. If you are putting a VM on replicated storage, you don’t really want the cost/overhead of replicating a swap file that can be easily redirected and created on local storage.

Resource mappings simply define the relationships between vCenter objects in order for SRM failover to work correctly. The placeholder Datastore is a fairly small local VMFS volume that is used to store configuration files of VM’s that are part of an SRM Protection Group. I created a small local volume on each site VMAX in my configuration for this purpose.

Configure Cluster/ESXi Swap Volumes

For each cluster of VMware hosts that is going to be using SRM functionality, the cluster must be set to use a specific swap volume. This volume will be a generic non-replicated Datastore on the local site VMAX that must be provisioned and configured before commencing. Once the cluster/hosts are configured in this way all virtual machines residing in this cluster, by default, will use this swap volume unless set otherwise. It is important to provision the Swap datastore to the necessary size for the intended cluster. E.G- If you have 50 VM’s in a cluster with 8GB Memory configured on each and no reservations, you need 400GB of space for the swap files in worst case scenario.

1) Navigate to the hosts and clusters menu on vCenter

2) Right click the cluster that you want to configure

3) Navigate dwon to the “Swapfile Location” and select the option to store the swapfile with the datastore on the host. Click ok.
SWAP1

4) Once complete, select the first host in the cluster and the configuration tab. Then select “Virtual Machine Swapfile Location” under software.
SWAP2

5) Select “Edit” at the top right hand of the screen. Highlight the volume that is destined to be the Swap volume for the cluster. Click Ok.
SWAP3

6) Repeat the above 5 steps for each host in the cluster that is being configured.

From this point on wards, all VM’s in the cluster will use this Datastore for their swap files (once power cycled). For any VM’s that are not going to be protected by SRM and staying on local disk, it might be worth ensuring that the following is set:
SWAP4

Failing that, if it is to be protected, ensure that the option of “Store in the host’s swapfile datastore” is set.

Configure Resource Mappings

Within SRM we have to configure mappings of the primary and secondary vCenter objects for SRM to know the resource to use during failover. A good example of this is mapping one cluster in Primary site against the recovery cluster on the Secondary site that will be used for the VM’s to failover on to. This can be a lot of work, depending on how many resources you want to map. I’ll cover the basics below.

1) From within the SRM management screen, select “Sites” and the primary site from the list.

2) Select the “Resource Mappings” tab at the top of the screen. Select a resource from the primary site and then select “Configure Mapping”.
MAP1

3) On the mapping screen, select the counter-part resource that you want to map to in the secondary site. Click ok.
MAP2

4) Next, select the “Folder Mappings” tab. Select the folder in the primary site and then “Configure Mapping”. Click ok in the Mapping box when you’ve selected the counter-part object.
MAP3

5) The last mapping is under “Network Mappings”. Select the port group of primary site and then “Configure Mapping”. Click ok in the mapping box when the counter-part is selected.
MAP4

6) A placeholder Datastore also has to be configured on each site. Select the “Placeholder Datastore” tab and then “Configure Placeholder Datastore”.
MAP5

7) Select the Secondary Site from the Navigation and repeat the above 6 step, mapping resources to the opposite site.

Conclusion

Configuring VMware hosts to be ready for SRM is quite easy. My main focus was the local swap volume size for each cluster. During the original configuration, I had to make changes to this on the ESXi host. This wasn’t as straightforward; I had to move VM’s around and power cycle them to get them to use an alternative volume once I had specified it. I also couldn’t unmount the original swap datastore even though nothing was using it anymore. The only way I got around it was to maintenance mode the hosts in the cluster and power cycle them! What I’m trying to say is that make sure you’ve thought about it properly first and then provision and configure. This was a learning experience for me and not the end of the world!

In the next, and last post of the series, I’ll be walking through creating some basic protection and recovery groups in SRM and performing a recovery.

Leave a Reply

Your email address will not be published. Required fields are marked *