Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Create a Full Copy of the Virtual Disk

  • Determine the VMware host the VM is on
  • Shutdown the VM
  • Log in to the VM host via SSH
  • Navigate to the VM's working directory _(under the VM Working Directory Path configured in the VM profile)

...

No Format
/vmfs/volumes/19873c05-fcd3d912/vclv99-77_1846-v14 # vmkfstools -i vmwarewin7-Windows764bit1846-v14-000001.vmdk copy.vmdk -d thin
Destination disk format: VMFS thin-provisioned
Cloning disk 'vmwarewin7-Windows764bit1846-v14-000001.vmdk'...
Clone: 100% done.

Resize the Virtual Disk

Run the following command to resize the virtual disk. The -X argument should specify the total size you want the virtual disk to be, not the amount of space to add to it:

Tip
iconfalse

vmkfstools -X 50G copy.vmdk

Download Gparted Live CD

Download the GParted Live CD ISO image to one of the datastores mounted on the VM host.  The .iso file must reside on one of the datastores in order to be able to mount it on a VM.

Replace the VM's Hard Drive with the Full Copy

After the copy has been created, reconfigure the VM to use the copy of the disk instead of the original linked clone.

  • Open vSphere Client
  • Right-click on the VM and select Edit Settings...
  • Select Hard disk 1
  • Click Remove
  • Click Add...
  • Select Use an existing virtual disk
  • Navigate to the VM's working directory and select the .vmdk corresponding to the full copy of the virtual disk you created earlier (copy.vmdk)

Add a CD

...

Drive to the VM

...

Pointing to the

...

GParted Live CD ISO File

  • Click Add...
  • Select CD/DVD Drive
  • Use ISO image
  • Navigate to the Gparted ISO image you downloaded earlier
  • Make sure Connect at power on is selected

Use GParted to Reconfigure the Partitions

Simply increasing the partition:size of the virtual disk does not cause the amount of usable space within the VM to increase.  The partitions within the virtual disk need to be reconfigured to use all of the available space.  This cannot be done from the OS of the image stored on the virtual disk.  You must boot the VM using a live CD containing a partition reconfiguration utility.  The GParted Live CD is free and easy to use.

  • Power on the VM and boot to the CD drive.
  • Use GParted to increase the size of the partition to use all of the space.
  • Reboot the VM

...