Monday, June 18, 2012

I had an issue where I needed to put a machine in maintenance mode, but some VM's did not want to vMotion off of the host, because the VM's were busy doing a VMWare Tools installation. These machines needed a reboot to finish the installation, but my customer did not want to do that just yet.

I tried to do an "End VMWare Tools Install" via the menu, but this was greeted by the message "The operation is not allowed in the current state."

At first I thought I needed to wait for my customer to reboot the machines at his convenience, but a colleague of mine knew the solution:

  • Enable Remote Tech Support for the ESXi host where the machine is located (from Configuration > Security profile)
  • Connect via SSH with root account
  • Run the command: usr/bin/vim-cmd vmsvc/getallvms
  • Take the VMid of the VM with the hanging install and then use the second command to cancel it: /usr/bin/vim-cmd vmsvc/tools.cancelinstall vmid
  • Start an interactive VM tools installation and manually run it from the mounted CD
Hey presto, the VM's are able to be vMotioned off, and hosts are put in maintenance mode.
 
 Thanks Paul ;-)

No comments:

Post a Comment