Extending the Hard Drive on ESX Guest VM


Extending the hard drive on a guest virtual machine seems to be pretty easy. The only problem is that the system drive cannot be extended and you need to attach it to another VM. Let’s call them “Target VM” (on which hard drive needs to be increased) and “Work VM” (which is used for this increase).

  1. Shutdown both VMs
  2. Make a backup copy of all the files of the Target VM. You may need it, see Note below for details.
  3. Detach the hard drive you want to increase from the Target VM
  4. Attach the hard drive you want to increase from the Work VM
  5. Increase the hard drive size in the Work VM settings
  6. Start the Work VM
  7. Open the command prompt window and type DiskPart. This is the Microsoft utility for disk management.
  8. Type list disk to get the list of disks. Type Select Disk=<DiskNumber>, where <DiskNumber> is the number of the disk you want to extend. You will get the messageDisk <DiskNumber> is now the selected disk.
  9. Type list volume to get the list of volumes. Type select volume=<Volume Number>, where <Volume Number> is the number of the volume you want to extend. You’ll get the messageVolume <Volume Number> is the selected volume.
  10. Type  extend. The process will take a little while and then you will get the messageDiskPart successfully extended the volume.
  11. Type Exit to quit the DiskPart utility and shut down the Work VM.
  12. Detach the hard drive you have increased from the Work VM. You can start the Work VM now
  13. Attach the hard drive to the Target VM. Start the Target VM

Note

Sometimes for unknown reason you can get the following message after running the extend command in DiskPart.

DiskPart successfully extended the volume but failed to extend the file system.
To retry this operation use the DiskPart command EXTEND FILESYSTEM.

In this case the extend filesystem command will not help. What you have now is the extended partition without extended volume. To fix this you need to restore your Target VM from a backup, from the beginning of the process to the step 6 and use EASEUS Partition Master on the Work VM. I really dislike to do it this way, but it works. You can download EASEUS Partition Master Home Edition from here just to test it, or you can buy the Professional Edition for just $39.95

Advertisements

3 Responses to Extending the Hard Drive on ESX Guest VM

  1. Is there a way to hide any HD PARTITION frm any User Profile koz of DATA Security or Privacy Reasons . . ? « Free Software Download says:

    […] Extending the Hard Drive on Guest VM « Notes of Windows Admin Tags: Data, hide, partition, Privacy, Profile, reasons, Security, there, User […]

    • akarmadanov says:

      I do not know about hiding the partition, however, you can modify the NTFS permissions for the volume root folder. This way you can prevent users from accessing the volume

  2. sutton bcn says:

    sutton bcn…

    […]Extending the Hard Drive on ESX Guest VM « Notes of Windows Admin[…]…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: