Fix: Incompatible device specified for device ‘0’ when cold migrating VMware guest

I received the following error message when using the vSphere Client to cold migrate a VMware guest running on ESX 3.0.2 to a new datastore : 

Incompatible device specified for device ‘0’
The migration failed at 99%.  VMware KB 9105247 suggested the problem was an attached .ISO image file.  No .ISOs were showing as attached in the VI client, so I edited the guest’s .vmx file.  I found the following in the .vmx file:
ide0:0.fileName = “/usr/lib/vmware/isoimages/windows.iso”
So although the VI client did not indicate there was an .ISO file attached to the CD-ROM, the guest thought there was one.  I removed the CD-ROM from the guest’s configuration and re-added it, and the .vmx file was changed to the following:
ide0:0.deviceType = “cdrom-raw”
I then started the storage migration once more, and it completed successfully.

Script to gracefully power off a VM guest

You can use vmware-cmd to shut down a VMware guest.  The syntax is

vmware-cmd /vmfs/volumes/datastore1/guest1/guest1.vmx stop

Powering off a VM guest is often part of a larger script, so I need to know when the guest is really down before executing the remainder of my script.  The following code checks the guest’s state using getstate.  If the state=1, which means it’s still running, the script waits for the shutdown to complete.

# gently power off VM
vmware-cmd /vmfs/volumes/datastore1/guest1/guest1.vmx stop

# check VM state 
# If not powered off (state=0), sleep, and recheck VM state in 15 seconds
while [ ` vmware-cmd /vmfs/volumes/datastore1/guest1/guest1.vmx getstate|grep on|wc -l` -eq 1 ]
echo "Waiting for VM guest to shutdown...."
sleep 15

# check VM guest state 8 times
if [ $COUNT -eq 8 ]
echo "VM guest shutdown is taking too long. Cannot shut down guest VM."


Replace datastore1 with the name of and path to your datastore.  Replace guest1 with the name of your VMware guest.  Tested on Vmware ESX 3.0.2.

VMware Express Patch for ESX and ESXi 3.5 now available

Yesterday I wrote that VMware was promising a patch by noon PDT today to address their licensing issue that caused version 3.5 Update 2 ESX and ESXi machines not to power on, suspended machines not to leave suspended mode, and machines not be able to be migrated via Vmotion. 

Well, VMware has released patches for both systems ahead of schedule.  You can read about the patches here, or go directly to download the ESX or ESXi version of the patch.

You can read a huge thread on the VMware Communities forum about the experiences network administrators have had with this bug.  It’s currently 42 pages long, and lets just say many administrators who have tauted VMware’s software as the answer to high availability challenges have egg on their face today.  The thread is so lengthy the moderator has created new separate threads for technical and non-technical feedback.

You can also read a post from VMware CEO Paul Maritz  about this issue.

Free VMware ESXi licenses

VMware is now offering free licenses of it’s popular ESXi hypervisor.  Your license includes VMware ESXi, VMware Virtual SMP, and VMware VMFS.

VMware ESXi is a full fledged bare-metal hypervisor that fits into a 32MB footprint.  VMware ESXi is essentially VMware ESX without the server console.

You can run virtual machines created by Microsoft Virtual Server, Microsoft Virtual PC 7 or greater, VMware Server on VMware ESXi by using the free VMware Converterto import virtual machines.  VMware Converter also supports conversions from sources such as physical machines and certain 3rd party disk image formats.

Virtualizing servers is not a trend, but the future of the datacenter.  If you’re still maintaining all physical servers, now is the time to give virtualization solutions consideration.

Free ConfigCheck Utility for VMware ESX host security assesment

Tripwire has a free, Windows based security assessment tool called ConfigCheck for VMware ESX hosts.  It rapidly assesses the security of VMware ESX hypervisor configurations compared to the VMware Infrastructure 3 Security Hardening guidelines. According to the VMware website:

Tripwire ConfigCheckTMis a free utility you can use to rapidly assess the security of your VMware ESX host configurations, according to the VMware security hardening guidelines. Co-developed by VMware and Tripwire, ConfigCheck provides an immediate assessment of the server configuration to ensure VMware Infrastructure environments are properly configured.

Tripwire ConfigCheck is simple & easy to use. To properly install & start-up the utility, follow these steps or read the blog posting:

To install and run ConfigCheck:

  1. Download the file to a Windows machine that has Java Runtime Environment (JRE) version 1.5, or higher.
  2. Unzip the file
  3. Double click on the file configcheck.cmd
  4. Accept the license agreement
  5. Enter the ESX host and user credentials
  6. Click the “Check Configuration” button

Once the check is complete you can click the test results to view remediation steps and view the Tripwire ConfigCheck Remediation Guide.  You can also listen to the Tripwire Podcast Operationalizing VMware ESX Best Practices – Introducing Tripwire ConfigCheck.