How to shrink a disk for a virtual machine running Windows with Performance Cloud VMware (NSX-T)
Important Notes:
The shrink can be performed by cloning the disk.
Please ensure you have enough free disk space in your virtual datacenter before attempting to clone the disk to shrink.
Please consider adding temporary disk and backup addons through your account management portal Cumulus.
Please make sure to have a valid and recent virtual machine backup before proceeding with the disk shrink.
The procedure may not work for all scenarios. Screenshots may be different per the version in use.
Please follow this article at your own risks. Sherweb will not provide any type of support for the use of the mentioned tool or any other 3rd party software for a disk resize or with post resize issues. Please refer to the software vendor's support website for any support requests.
Procedure:
- Download the Clonezilla's latest ISO from https://clonezilla.org/downloads/download.php?branch=stable
- Login to the Performance Cloud VMware portal using your credentials.
- Use the following article to upload the Clonezilla's latest ISO into your catalog
- Login to the virtual machine using the disk to resize.
- Go to "Computer Management"
- In "Disk Management", right click on the volume you want to shrink, and choose "Shrink Volume…"
- Enter the amount of space to shrink and click "Shrink Volume".
- You should now see unallocated space on the disk.
- Right click the disk, and choose "Properties"
- In the "Volumes" tab, take a note of "Capacity", "Unallocated space" and "Reserved space". Note the result of the following equation: Capacity + Reserved space - Unallocated space
- Shutdown the virtual machine.
- Go back to the Performance Cloud VMware portal and find your virtual machine.
- In the "Actions" menu of the target VM, choose "Insert Media".
- Select the uploaded Clonezilla ISO and choose "Insert".
- Go to "Details" on the target VM.
- In the "General" section of the VM, check "Enter BIOS Setup"
- In the "Hardware" section of the VM, click "Add" under "Hard Disks".
- Enter the result of the equation of step 7 under "Size". Choose LSI Logic SAS (SCSI) under "Bus Type".
- Go down the page and choose "Save".
- Wait until the task is completed.
- In the VM's "Actions" menu, choose "Power On".
- In the VM's "Actions" menu, choose "Launch Web Console".
- Using the arrows, go down to "Virtual IDE CDROM Drive" and hit "Enter".
- Hit "Enter" on the default Clonezilla boot entry.
- Wait for Clonezilla to boot. You might see warnings such as "SMBus base address uninitialized" or "Failed unmounting /run/live/medium". Disregard those and wait for it to boot.
- Choose the default en_US language. Hit "Enter".
- Choose to "Keep" the default keyboard layout. Hit "Enter".
- Choose to "Start_Clonezilla". Hit "Enter".
- Using the arrows, go down to "device-device" and hit "Enter".
- Using the arrows, go down to "Expert" and hit "Enter".
- Choose "disk_to_local_disk" and hit "Enter".
- Choose your source disk with the arrows and hit "Enter".
- Choose your target disk and hit "Enter".
- Use the space bar and arrows to select the advanced options as follow and hit "Enter"
- Choose "Skip checking…" and hit "Enter".
- Choose "Use the partition table from the source disk" and hit "Enter".
- Choose "Choose reboot/shutdown/etc" and hit "Enter".
- Press "Enter" to continue…
- Confirm the disk in the warning is the disk you want to overwrite, and answer "y", then hit "Enter".
- Confirm again with "y" and hit "Enter".
- Wait for the process to complete.
- With the arrows, choose "poweroff" and hit "Enter".
- Hit "Enter"
- Choose the default en_US language. Hit "Enter".
- Close the Web Console and go back to the Performance Cloud VMware portal in "Virtual Machines".
- In the VM's "Actions" menu, choose "Eject Media".
- Go in the VM "Details".
- Expand the "Hardware" section.
- Switch the source and target disks "Bus Number" and "Unit Number" so that the target disk is on "bus Number" 0 and "Unit Number" 0, and the source disk is "Bus Number" 1 and "Unit Number" 0.
- Click "Save" down the page.
- From the VM's "Actions" menu, choose "Power On".
- From the VM's "Actions" menu, choose "Launch Web Console".
- Go to "Computer Management" from the start menu.
- Go to "Disk Management" and confirm your Disk 0 is the smaller disk and C: is on this disk.
- You can right-click on the C: partition and choose "Extend Volume".
- Your C: drive now uses all available disk space.
- Shutdown your VM.
- Go back to vCloud Director under "Virtual Machines".
- Go under your VM's "Details".
- Expand the "Hardware" section.
- You can now "delete" your source disk as you have confirmed the newly cloned disk boots fine.
- Choose "Save" down the page.
- You can now "Power On" your VM through its "Actions" menu.
- If disk/backup addons were temporary added, you can reduce the disk/backup addons in your account management portal Cumulus.