We had a small issue today with a virtual machine at one of our customer sites. We were unable to do a VMotion. The message we got was that there was an ISO image connected to the system.

Well, we tried all the standard things like being tenacious and clicking Yes on the question if I wanted to continue the VMotion (which failed ofcourse) and trying to edit it from within VirtualCenter. Unfortunately the option to edit was grayed out. Hmm..


Since I installed the VI Toolkit for PowerShell I tried it with that.
get-vm -name "ServerName" | get-cddrive | where {$_.ISOPATH -ne $null}|set-cddrive -nomedia
Ofcourse this also didn’t work. The message I got was

Set-CDDrive : 11/5/2008 1:46:51 PM Set-CDDrive The operation for the entity vm-253 failed with the following message: “The operation is not allowed in the current state.”

It looked like one of those things that make your heartbeat just rise a little.
From the commandline (vmware-cmd /vmfs/volumes/LUN/SERVER/SERVER.vmx disconnect ide0:0 ) it also ended in an error: Error executing the command “disconnect”.
It still looked like I did the right things to it.

Eventually I restarted the management services on the host itself (service mgmt-vmware restart).
It finally worked again.. I could disable the CD-ROM and VMotion the machine to another system.