Thursday, June 17, 2010

VMWare ESXi 4 increase IDE drive size

I was trying to increase the size of an ide drive I have associated with a VM and the option was greyed out. See image below.


I found this option to change the ide device to a scsi on the VMWare knowledgebase.

But the problem is, how do I get a text editor to let me change the vmdk file? Well, that is where you need to access the server from a console or ssh into the box. See website below for more information.

Allowing ssh access to your esxi server.

Now that we have access to the esxi server via ssh, Below are the steps needed to increase the virtual drive size.

  1. find the vmdk you are trying to increase and the “ide” option to lsilogic, per the knowledge base article above.
  2. Remove and reload the vmdk in the vSphere Client settings for the particular virtual machine you want to make the adjustment on.
  3. Now the drive shows up as an scsi device and you can increase the size of the drive. Now if you are using windows XP, you will probably get the blue screen of death when you try and boot the VM.
  4. So go back to the ssh prompt and edit the vmdk file again and change “lsilogic” back to “ide”.
  5. Go back into the vSphere Client and remove and reload the drive. Now it reads as an IDE device in the vSphere Client.
  6. When you reboot the VM, you will only see the old harddrive size, you need to expand the virtual drive.
  7. I use Gparted, go here and download the iso file.
  8. Mount the gparted iso file under the vm and reboot and make sure that the bios for the vm has the boot order set to boot from a cd-rom before a harddrive.
  9. After gparted loads, increase the size of the virtual disk and then reboot.
  10. Make sure to dismount the gparted iso image.
  11. Now you should have a newly expanded IDE virtual drive.

Good luck. Hope all that makes sense.