By Frank Denneman – Senior Technical Marketing Architect
To virtualize vCenter or not, that has been an age-old question. To control the location of the vCenter virtual machine, in case the hosting vSphere server crashes, a couple of best practices where developed. Such as; Disable DRS, create host-vm affinity groups or my favorite, leave all resource settings default and just document which datastore the virtual machine is stored.
Restrict Storage Load Balancing operations?
However due to the introduction of Storage DRS and its load balancing mechanisms, this recommendation requires some extra configuration to still use it. In my opinion DRS should not be limited in its load-balancing options, as disabling a specific virtual machine can effect other virtual machines as well. This focus purely concentrates on the compute level, but how should we threat the disk structure of vCenter? Should we restrict load-balancing operation of Storage DRS?
I think it depends on the configuration of the compute layer, if you do not restrict the movement of the VM at the compute cluster layer, its recommended to restrict the movement of virtual machine files. By disabling the automation level of the virtual machine in the datastore cluster, Storage DRS shall not move the virtual machine. Please be aware that datastore maintenance mode will fail until the virtual machine is migrated manually out of the datastore.
To ensure best performance, the vCenter virtual machine should receive more disk shares than other virtual machines.
Increase disk shares:
- Select the virtual machine and go to edit settings.
- Select the Resource Tab and select the option Disk.
- Select one of the three predefined Share levels or configure custom shares.
Disable migration:
- Select the datastores and Datastore Cluster view.
- Select the Datastore Cluster.
- Go to Edit Datastore Cluster.
- Select the Virtual Machine Setting menu option.
- Select the Manual or Disabled Automation level.
VMDK affinity rule
The virtual machine setting window also allows you to configure the VMDK affinity rule setting of the virtual machine. By default a VMDK affinity rule is applied to each virtual machine and this rule forces Storage DRS to place all disks and files from a VM to be stored on a single datastore. I am a strong opponent of using a VMDK anti-affinity rule for all virtual machines in a datastore cluster as it allows Storage DRS more granularity when it comes to load balancing. But for this particular scenario both configurations have merit.
The datastore where the working directory with the VMX file is placed is deemed the registered datastore. If an anti-affinity rule is applied to the VM, all VMDKs and the working directory are placed on a separate datastore. When Storage DRS needs to load balance it is very (extremely) rare that Storage DRS will move the working directory of a virtual machine. A working directory is very small compared to a VMDK and generates under normal operations very little IO. When will it move a working directory? When the VM swap file is very big, nearing or exceeding footprints of other VMDK files and/or when the swap file is generating a lot of I/O. Take this behavior into account when not selecting a manual or disabled automation level!
Using an affinity rule reduces complexity when it comes to troubleshooting. All files are on the registered datastore.
So next time when you set up and configure a virtualized vCenter, do not only think about DRS settings, think about the Storage DRS settings as well.