vSphere host maintenance with instant clones
With the release of VMware Horizon View 7 we now have the ability to use instant cloning for virtual desktops. I tried instant cloning in my lab environment and I must say that it works really well. There are great articles describing on how to create a instant clone desktop pool so we won’t repeat that here (at least not in this article ;) ). In this article I want to draw some attention to the host maintenance with instant clones present.
When using instant clones each vSphere host, that is part of the resource pool for a instant clone desktop pool, will have a parent virtual machine. This vm is always powered on and used to quickly clone the virtual desktops on that host. So what would happen if you want to enter a host in maintenance mode?
Entering a host in maintenance mode will start as you expect, virtual machines are being moved to other hosts in the cluster. The virtual desktops move without a problem, but at some point the task will halt and stay at 2%. You will receive no warnings starting the process and there isn’t a real indicator as to why the task hangs at 2%.
But if you select your cluster and move to Monitor –> vSphere DRS –> Faults you will see an alert stating that the parent vm is pinned to the host.
To resolve this issue VMware has provided two ways, written down is this KB article. For this article I used the gui version to show what happens.
First open the annotations for the host that you want to enter in maintenance. Change the InstantClone.Maintenance value to 1 and close the window.
Give it some time and you should see a task that removes the parent vm. After the parent vm is deleted you should see a value of 2 for the InstantClone.Maintenance annotation.
Now you can enter your host into maintenance mode and the task should complete with any errors. When exiting the host from maintenance mode you need to clear the InstantClone.Maintenance annotation.
After that you simply have to wait for a new provisioning to happen. In my lab environment I forced this by increasing the number of desktops in the pool by one.
So there you go, you should now be able to discover what is preventing your host to go into maintenance mode in case you are using instant clones. And you can use this article in combination with the VMware KB article to resolve it.
- Horizon View: Virtual Disk Digest? by Sander Martijn
- VMware Virtual SAN best practices by Erik Scholten
- New release vSphere HTML5 Web Client fling by Sander Martijn
- Untangle the mess! Network issues with VMware VMs by Sander Martijn
- Barista as a Service with vRealize Orchestrator by Anne Jan Elsinga