Wednesday, November 19, 2014

Advanced Topic: How to Resize a Virtual Machine Using an IDE Disk in VMWare 5.X

Standard practice when creating virtual machines is to attach SAS drives which can easily be resized at any time.  Adding space at any time is just one of the many great features of using virtual machines in your environment.  The ability to resize disks provides the freedom to allocate storage as needed and increase overall storage capacity whenever necessary.  Unfortunately, resizing a virtual machine with an IDE disk assigned to it is not as direct a process.  Sometimes standard practice is not possible, or perhaps the environment was inherited, whatever the circumstance, resizing disk space for a virtual machine with an IDE disk is possible with the following steps:
  1. Remove any existing snapshots for the virtual machine.  Always make sure your data is backed up in case there are any issues.


  2. Go to the properties of the virtual machine.  Add a new temporary disk to be configured as a LSI Logic SAS disk of any size.  This disk is simply to get the operating system to install the appropriate drivers before changing the boot disk from the existing IDE disk to a resizable SCSI disk.


  3. Reboot the virtual machine so the operating system will install the LSI Logic SAS drivers.
  4. Shutdown the virtual machine.
  5. Go to the properties of the virtual machine.  Remove the new temporary disk but leave the LSI Logic SAS Controller.
  6. Make note of the location of the existing IDE disk to convert.


  7. Remove the disk from the virtual machine.  Use caution to select "Remove from virtual machine" and NOT "Remove from virtual machine and delete files from disk".  NOTE:  It is imperative to select the correct option at this stage.
  8. Connect to the ESXi host using SSH.
  9. Change directories to get to the location of the location of the .vmdk file noted in step 6.
  10. Open the .vmdk file in vi.
  11. Find the line listing the ddb.adaptorType="ide", and replace"ide" with "lsilogic" so the line reads ddb.adaptorType="lsilogic".
  12. Save the changes to the .vmdk file and exit vi.  (Press the escape key, type :, then w, q and press enter.)
  13. Go to the properties of the virtual machine and add the disk back to the virtual machine by adding hardware and choosing "Use an existing virtual disk".


  14. Browse to the location noted in step 6 and select the existing .vmdk file.
  15. Make sure the disk is added with the SCSI ID of (0:0) to make sure it is the first disk.  If you already have a CDROM drive or other disk set as (0:0), change it to another SCSI ID such as (0:1).  Save these changes to the virtual machine.


  16. Boot the virtual machine.
  17. Once the virtual machine boots, you can resize the virtual disk online at any time like any other SAS virtual machine.

The steps above may seem like quite a process, but in reality do not take long to complete.  Following the steps to change an IDE disk assigned to a virtual machine so it can later be resized proves much more efficient than creating a new virtual machine, configuring it, and making it live.  Also, once the process is complete, it never has to be done again for the virtual machine it was performed on and disk resizing can be modified at any time for whatever needs arise.

No comments:

Post a Comment