Pages

Saturday, May 7, 2011

Virtual Disk Issues in Vmware ESX


I have found that most of us have struggled a lot when it comes to converting physical System to Virtual (P2V), Due to the IDE disk which VMware is struggling to understand. Generally we see such issues with windows XP, windows 2000 and windows 2003(64-bit).
Most of my colleagues have complains about.....  
  • Virtual machine contains an IDE virtual disk does not detect after P2V conversion.
  • Virtual machine fails to boot with a black screen after P2V conversion with just blinking underscore on the black screen.
  • Or with some errors like “disk error occurred, press ctrl+alt+del to restart” after P2V, the virtual machine fails to boot. 

I have found a very simple solution and for all of these case it worked well.

Resolution

        We must convert the IDE disk to SCSI to get our newly creating Virtual machine get going. If its xp,2000 prof or 2003 (64-bit) for all these cases below method works.

To Note: The typical SCSI adapter type for newer versions of Windows and Linux OS guests is the LSI Logic controller type.

To convert the IDE disk to SCSI:
  1. Locate the datastore path where the virtual machine resides. For example:

    /vmfs/volumes/datastore_name/vm_name/
  2. From the ESX Service Console, open edit the primary disk (.vmdk) in a text editor.
#vi /vmfs/volumes/datastore_name/vm_name/vm_name.vmdk
  1. Look for the line:

    ddb.adapterType = "ide"   
  2. To change the adapter type to LSI Logic change the line to:

    ddb.adapterType = "lsilogic"


  3. Or in some case we might need to use bus Logic. Then change the adapter type to Bus Logic
Change the line to:

ddb.adapterType = "buslogic"
  1. Save the file.
  2. From VMware Infrastructure or vSphere Client
    1. Click Edit Settings for the virtual machine.
    2. Select the IDE virtual disk.
    3. Choose to Remove the Disk from the virtual machine.
    4. Click OK.

      Caution: Make sure that you DO NOT choose Remove from disk.
  3. From the Edit Settings menu for this virtual machine:
    1. Click Add > Hard Disk > Use Existing Virtual Disk.
    2. Navigate to the location of the disk and select to add it into the virtual machine.
    3. Choose the same controller as you selected in previous Step 4 or 5 as the adapter type. The SCSI ID should read SCSI 0:0.
  1. If a CDROM device exists in the virtual machine it may need to have the IDE channel adjusted from IDE 0:1 to IDE 0:0. If this option is greyed out, remove the CDROM from the virtual machine and add it back. This sets it to IDE 0:0.
You are done... 
Cheers,

All the Best ..... :)

2 comments: