Performance Cloud VMware - How to shrink a disk for a virtual machine running Windows

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: 

  1. Download the Clonezilla's latest ISO from https://clonezilla.org/downloads/download.php?branch=stable

    Machine generated alternative text:
Downloads 
To download Clonezilla live, select the following CPU architecture file type repository then click the download button 
Release branch: stable, Clonezilla live version: 2 67-28 
1 Select CPU architecture: 
2 Select file type- 
3 Select repository: auto 
Download

  2. Login to the Performance Cloud VMware portal using your credentials.
     
  3. Use the following article to upload the Clonezilla's latest ISO into your catalog: https://helpdesk.sherweb.com/en/support/solutions/articles/67000661448-how-to-manage-a-catalog-to-create-add-templates-and-import-isos

  4. Login to the virtual machine using the disk to resize.
     
  5. Go to "Computer Management"

    Machine generated alternative text: Windows Accessories Windows Administrative Tools Component Services Computer Management Defragment and Opt-mize Drives Disk Cleanup Went VI ewer SCSI Initiator Local Security Policy Microsoft Azure Services

  6. In "Disk Management", right click on the volume you want to shrink, and choose "Shrink Volume…"

    Machine generated alternative text: Computer Management File Action View Help zfrll Computer Management (Local System Tools Task Scheduler Event Viewer Shared Folders Local Users and Groups Performance Device Manager Storage Windows Server Backup Disk Management ervvcesan pp Ions Volume (Disk O partition I) (Disk O partition 2) out Simple Simple Simple Basic Basic Basic File NTFS em Status Healthy (Boot, Page File, Crash Dump, Primary Partition) Healthy (Recovery Partition) Healthy (EFI System Partition) isk Management More Actions Open Explore Mark Partition as Active Change Drive Letter and Paths... Format... Extend Volume... Shrink Volume... Add Mirror... Delete Volume... Properties Help ash Dum , Prima Basic 99.98 Online NTFS Healthy (Boot, Pa e File, Healthy (EFI Sys Healthy (Recovery Pan

  7. Enter the amount of space to shrink and click "Shrink Volume".

    Machine generated alternative text: Shrink C: Total size before shrink in MB Size of available shrink space in MB: Enter the amount of space to shrink in MB: Total size after shrink in MB 101783 O You cannot shrink a volume beyond the point where any unmovable files are located See the "defrag" event in the Application log for detailed information about the operation when t has completed See "Shrink a basic volume" in Disk Management help for more information Shrink

  8. You should now see unallocated space on the disk.

    Machine generated alternative text: Basic 99.98 Online Healthy (Recox Healthy (E 37.95 NTFS Healthy (Boot, Page File, Cl 6145 Unallocated

  9. Right click the disk, and choose "Properties"

    Machine generated alternative text: — Disk O Basic Online DVD No Media New Spanned Volume... New Striped Volume... New Mirrored Volume... New RAID-5 Volume... Convert to Dynamic Disk... Convert to MBR Disk Offline Properties Help

  10. 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

    Machine generated alternative text: VMware Virtual disk SCSI Disk Device Properties General Policies Volumes Diver Details Events Disk Information Status Partition Ole Capacity Unallocated space: Reserved space: Disk O GUID Partition Table (GPT) 102384 MB E2S23 MB

  11. Shutdown the virtual machine.

  12. Go back to the Performance Cloud VMware portal and find your virtual machine.

  13. In the "Actions" menu of the target VM, choose "Insert Media".

    Machine generated alternative text: c Virtual Machine Microsoft Wi Powered off Memory 4096 MB Networks CTlONSv Suspend Shut Down Guest OS Power Off Power On Power Or and Force Recustomization Discard suspended state upgrade Virtual Hardware Versiorp Install VVware Tools Insert Media Eject Media Move to... Copy to... Create Snapshot Revert to Snapshot Remove Snapshot Launch Wei) Console


  14. Select the uploaded Clonezilla ISO and choose "Insert".

    Machine generated alternative text: Insert CD Select the media file to insert in the VM. Media available now: Name clonezilla-Iive-2_€ 7-28-amd64_iso Selected media: clonezilIa-live-26.7-28-amd64.iso Catalog Storage Used Created On •x I - Sof S media INSERT CANCEL


  15. Go to "Details" on the target VM.

    Machine generated alternative text: Virtual Machine Microsoft Windows Server 20„. Powered off Memory 4096 MB Networks ACTIONS v Lease Never Expires VMware Tools Snapshot DETAILS

  16. In the "General" section of the VM, check "Enter BIOS Setup"

    Machine generated alternative text: General Name Computer Name Description Operating System Family Operating System Boot Delay Storage Policy Virtual Data Center VMware Tools Virtual Hardware Version Enter BIOS setup 11265 H w 14 Windows Server 2019 Datacenter Template Microsoft Windows Microsoft Windows Sewer 2016 or later (64-bit) •Any

  17. In the "Hardware" section of the VM, click "Add" under "Hard Disks".

    Machine generated alternative text: ) General Hardware ) Guest OS Customization ) Guest Properties ) Advanced ACTIONS

    Machine generated alternative text: Hard Disks ADD Index Name

  18. Enter the result of the equation of step 7 under "Size". Choose LSI Logic SAS (SCSI) under "Bus Type".

    Machine generated alternative text: 89560 VM default policy LSI Logic SAS (SCSI)

  19. Go down the page and choose "Save".

    Machine generated alternative text: Guest OS Customization Guest Properties Advanced DISCARD CHANGES SAVE

  20. Wait until the task is completed.

    Machine generated alternative text: Recent Tasks Task Updating Virtual Machine Status Type

    Machine generated alternative text: Recent Tasks Task Updated Virtual Machine Status @ Succeeded Type

  21. In the VM's "Actions" menu, choose "Power On".

    Machine generated alternative text: General Name Computer Name Description ACTIONS Suspend Shut Dowr Guest OS Power Off Power On an Force Recustamizatian

  22. In the VM's "Actions" menu, choose "Launch Web Console".

    Machine generated alternative text: Virtual Machine Microsoft Wi Powered on Memory 4096 MB Networks ACTIONS v Power Or and Force Recustomization Reset Discard suspended state upgrade Virtual Hardware Versiorp Install VMware Tools Insert Media Eject Media Move to... Copy to... Create Snapshot Revert to Snapshot Sr-epshat Launch Web Console

  23. Using the arrows, go down to "Virtual IDE CDROM Drive" and hit "Enter".

    Machine generated alternative text: Boot normal lg Uindows Boot Manager EFI Uirtual disk (0.0) EFI Uirtual IDE CDROM Driue (IDE Networ EFI Uirtual disk (1.0) Enter setup Reset the system Shut down the system TEHoue Highl ight Boot Manager Deu ice Path: Pc iR00t /Pci , ) /Rta (Pr inarg , Master , OXO Entry

  24. Hit "Enter" on the default Clonezilla boot entry.

    Machine generated alternative text: *Clonezilla live (Default. settings, Clonezilla live (Speech sgnthesis) Other modes of Clonezilla live Local operating sgstem (if available) Network boot via iPHE uEFI firmware setup Clonezilla live 2.6.7-2B-amdS4 info GNU GRUB Beexsee) version 2.84-8 font 8T

  25. 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".

      Machine generated alternative text: Choose language Rhich language do gou prefer: Catalan Catalä ca_ES.UTF-B de_DE.UTF-B Deutsch German Hungarian Haggar _HU.UTF-B Spanish Espafiol es_ES.UTF-B French Franca is _FR.UTF-B it_1T.UTF-B Italian Italiano JP . UTF- B Japanese Brazilian Portuguese pt_BR.UTF-B Russian pyccKl.11.11 RU.UTF-B Slovak Slovenskü sk_SK.UTF-B Turkish Türkce tr_TR.UTF-B zh_CN.UTF-B Chinese (Simplif ied) zh_TH.UTF-B Chinese (Traditional) Portuguäs do Brasil

    • Choose to "Keep" the default keyboard layout. Hit "Enter".

      Machine generated alternative text: Kegboard conf iguration Change kegboard lagout? Kee the default ke board la out. Change Change kegboard lagout LIS ke board

    • Choose to "Start_Clonezilla". Hit "Enter".

      Machine generated alternative text: Start Clonezilla Start Clonezilla or enter login shell (command line)? Select mode: Start_Clonezilla Start Clonezilla Enter_shell Enter command line prompt (Cancel)

    • Using the arrows, go down to "device-device" and hit "Enter".

      Machine generated alternative text: Clonezilla Opensource Clone Sgstem (OCS) *Clonezilla is free (GPC) software, and comes Ilith RESOLUTELY ND HRRRRNTY* /// Hint! From noil on, if multiple choices are available, gou have to press space keg to mark gour selection. An asterisk Ilill be shown llhen the selection is done/ // Two modes are available, gou can (1) clone/restore a disk or partition using an image (2) disk to disk or partition to partition clone/restore. Besides, Clonezilla lite server and client modes are also available. You can use them for massive deplogment Select mode: dev ice-dev ice remote-dest lite-server lite-client art it ion l_oork directl from a disk or art it ion to a disk or destination mode of remote device cloning Enter Enter_Clonezilla_live_lite_server Enter_Clonezilla_live_lite_client (Cancel)

    • Using the arrows, go down to "Expert" and hit "Enter".

      Machine generated alternative text: Clonezilla Opensource Clone Sgstem (OCS) Choose the mode to run the following Ilizard about advanced parameters: (lÉkEert Expert mode: Choose gour o lin options (Cancel)

    • Choose "disk_to_local_disk" and hit "Enter".

      Machine generated alternative text: Clonezilla Opensource Clone Sgstem (OCS) *Clonezilla is free (GPC) software, and comes Ilith This software Ilill overwrite the data on gour hard target disk before gou cloning! *** disk_to_local_disk RESOLUTELY NO HRRRRNTY* drive Exit. llhen cloning! It is recommended to backup important files on the Enter command line prompt (Cancel)

    • Choose your source disk with the arrows and hit "Enter".

      Machine generated alternative text: Clonezilla Opensource Choose local disk as source. The disk name is the device name in GNU/ Linux. The I Isdbl . sda Clone first Sgstem (OCS) Mode: disk in the sgstem is Ilhdall or I Isdal the 2nd disk _ asoooc2Bb10Bd40bb8628SdB14BB648dS ObbSB (Cancel) "hdbl sdb 41.SGa_Virtual_disk_

    • Choose your target disk and hit "Enter".

      Machine generated alternative text: Clonezilla Opensource Clone Choose local disk as target (ALL DRTR ON THE ENTIRE DISK The disk name is the device name in GNU/ Linux. The first I Isdbl . sdb 41.SGa_Virtual_disk_ Sgstem (OCS) Mode: HILL BE LOST AND REPLACED! ! ) disk in the sgstem is Ilhdall or I Isdal the 2nd disk is ObbSB (Cancel) "hdbl

    • Use the space bar and arrows to select the advanced options as follow and hit "Enter"

      Machine generated alternative text: Clonezilla on-the-flg advanced extra parameters Set the advanced parameters (multiple choices available) . If gou have no idea, Reinstall grub on target hard disk boot sector -m keep the default value and do NOT change -j? -IUS -icds Rutomaticallg adjust filesgstem geometrg for a NTFS boot partition if exists sfdisk uses CHS of hard drive from EDD(for non-grub boot loader) Clone the hidden data between MER and 1st partition Resize the filesgstem to fit partition size of target partition use text output onlg, no TUI/GLII output use nuttcp instead of nc llhen cloning over network Force to use sector-bg-sector cogg (supports all filesgstem, but Do NOT clone boot loader Continue reading next one llhen disk blocks read errors Do not remove Linux udev hardware record after restoring. Do not update sgslinux-related files after restoring. Do not update initramfs file(s) on the restored GNU/ Linux. inefficient) Skip checking destination disk size before creating partition table Skip updating boot entries in EFI NVRRM after cloning Force to load the saved HD CHS value Run clone in batch mode (DANGEROUS!) Inspect checksum for files in device after cloning Show verbose information Pla sound llhen the •ob is done (Cancel)

    • Choose "Skip checking…" and hit "Enter".

      Machine generated alternative text: Clonezilla on-the-flg advanced extra parameters Mode: disk_to_local_disk Set the advanced parameters (multiple choices available) . If gou have no idea, keep the default value and do NOT change -fsck-g Ski checkin 're airin source file s stem Interactive lg check and repair source file sgstem before cloning Ruto (Caution!) check and repair source file sgstem before cloning (Cancel)

    • Choose "Use the partition table from the source disk" and hit "Enter".

      Machine generated alternative text: Clonezilla advanced extra parameters Mode: disk_to_local_disk Set advanced parameters. If gou have no idea, keep the default values and do NOT change angthing. Just press Enter. Choose the mode to create the partition table on the target disk : TO CREATE R NEH PARTITION TABLE ON THE TARGET DISK. ALL THE DRTR ON THE TARGET DEVICE HILL BE ERASED!!! (2) Clonezilla will not restore an image from a large disk (partition) to a smaller disk (partition). However, it can restore an image from a small disk (partition) to a larger disk (partition). (8) If gou do NOT llant Clonezilla to create a partition table, check -k: use the art it ion table from the source disk Do NOT create partition table on boot sector on target machine Create partition table proportional lg Enter command line prompt to create partition manual lg later (Cancel)

    • Choose "Choose reboot/shutdown/etc" and hit "Enter".

      Machine generated alternative text: The action to a choose -pa cmd -pa reboot -pa poweroff Mode: perform llhen evergthing is finished: Choose reboot/ shutdown/ etc llhen ever thin Enter command line prompt Reboot Shutdown (Cancel) is finished

    • Press "Enter" to continue…

      Machine generated alternative text: 'usr/sbin/ocs-ontheflg -el auto -e? -j? -r -icds -sfsck rhis command is also saved as this file name for later usi 'ress "Enter" to continue...

    • Confirm the disk in the warning is the disk you want to overwrite, and answer "y", then hit "Enter".

      Machine generated alternative text: HRRNING!!! HRRNING!!! HRRNING! THE EXISTING DRTR IN THIS HRRDDISK/PRRTITION(S) HILL LOST: sdb db (41. Are qou sure qou llant to continue? OVERHRITTEN EXISTING DRTR HILL

    • Confirm again with "y" and hit "Enter".

      Machine generated alternative text: Let me ask gou again. HRRNING!!! HRRNING!!! HRRNING! THE EXISTING Are qou sure qou llant HRRNING!!! DRTR IN THIS to continue? HARD 'PARTITION (S) HILL BE OVERHRITTEN! ALL EXISTING DRTR HILL BE LOST: sdb

    • Wait for the process to complete.

      Machine generated alternative text: Partclone Partclone v0.8.14 http://partclone.org Starting to back up device(/dev/sda4) to device(/dev/sdb4) Calculating bitmap... File sgstem: Device size: Please Loa it... Blocks 4S2SB04 Blocks Blocks Space in use: Block size: 4096 agte 14 . Elapsed: Remaining: 00:01:14 Current Block: 145801 Total Block: Data Block Process: Total Block Process:

    • With the arrows, choose "poweroff" and hit "Enter".

      Machine generated alternative text: Choose mode Noll gou can choose to: Dileroff Poweroff if mounted, Ilill be umounted) reboot cmd Reboot Enter command line prompt Start over (image repositorg / home/ part imag,

    • Hit "Enter"

      Machine generated alternative text: Please remove the live-medium, close the trag (if ang) and press ENTER to continue: _

  26.  Close the Web Console and go back to the Performance Cloud VMware portal in "Virtual Machines".

    Machine generated alternative text: vCloud Director All datacenters Compute vApps Virtual Machines Affinity Rules Networking



  27. In the VM's "Actions" menu, choose "Eject Media".

    Machine generated alternative text: Virtual Machine Microsoft Wi Powered off Memory 4096 MB Networks ACTIONS v Suspend Shut Down Guest OS Power Off Power On Power Or and Force Recustomization Discard susrjended state upgrade Virtual Hardware Versiorp Install VVware Tools Insert Media Eject Media Move to... Copy to... Create Snapshot Revert to Snapshot Remove Snapshot Launch Wei) Console

  28. Go in the VM "Details".

    Machine generated alternative text: Virtual Machine Microsoft Windows Server 20„. Powered off Memory 4096 MB Networks ACTIONS v Lease Never Expires VMware Tools Snapshot DETAILS

  29. Expand the "Hardware" section.

    Machine generated alternative text: ) General ) Hardware ) Guest OS Customization ) Guest Properties ) Advanced ACTIONS

  30. 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.

    Machine generated alternative text: Index Name Size 102400 39560 Policy VM default policy VM default policy Bus Type LSI Logic SAS (SCSI) LSI Logic SAS (SCSI) Bus Number Unit Number

  31. Click "Save" down the page.

    Machine generated alternative text: Guest Properties Advanced DISCARD CHANGES SAVE

  32. From the VM's "Actions" menu, choose "Power On".

    Machine generated alternative text: General Name Computer Name Description Suspend Shut Dowr Guest OS Power Off Power On on and Force Recustamizatian

  33. From the VM's "Actions" menu, choose "Launch Web Console".

    Machine generated alternative text: Virtual Machine Microsoft Wi Powered on Memory 4096 MB Networks ACTIONS v *'cyner Power Or and Force Recustomization Reset Discard suspended state upgrade Virtual Hardware Versiorp Install VMware Tools Insert Media Eject Media Move to... Copy to.. Create Snapshot Revert to Snapshot Sr-apshat Launch Web Console

  34. Go to "Computer Management" from the start menu.

    Machine generated alternative text: Indows ministrative Component Services Computer Management Defragment and Opt-mize Drives Disk Cleanup Went VI ewer SCSI Initiator Local Security Policy Microsoft Azure Services

  35. Go to "Disk Management" and confirm your Disk 0 is the smaller disk and C: is on this disk.

    Machine generated alternative text: Storage Disk Management ervvces an pp Icatlons — Disk O Basic 38.62 Online •o Disk 1 Basic gg.ge Offline CD-ROM O 499 MB Healthy (Recovel Healthy (EF 37.95 NTFS 82 MB oat, age File, Crash Unallocatet ea 6145 Unallocated 499 MB Healthy (Reco 37.95 Healthy (I

  36. You can right-click on the C: partition and choose "Extend Volume".

    Machine generated alternative text: NTFS Healthy (Boot, Pa e Open Explore Mark Partition as Active Change Drive Letter and Paths... Format... Extend Volume... Shrink Volume... Add Mirror...

    Machine generated alternative text: Welcome to the Extend Volume Wizard This wizard helps you increase the size of simple and spanned volumey You can extend a volume by adding space from one or more additional disks o continue click Next Next

    Machine generated alternative text: Dsks You can use space on one or more disks to extend the volume You can only extend the volume to the available space shown below becauseyour disk cannot be converted to dynamic or the volume being extended is a boot or system Available Total volume size in megabytes (MB) Maximum available space in MB Select the amount of space in MB Selected Disk Remo ve Remove Al

    Machine generated alternative text: Extend Volume Wizard Completing the Extend Volume Wizard You selected the follow'ng settings Disk selected: Disk O (80 MB) o close this wizard click finish Finish

  37. Your C: drive now uses all available disk space.

    Machine generated alternative text: Basic 38.62 Online 499 MB Healthy (Recovery Pi Healthy (EFI sy 38.03 NTFS Healthy (Boot, Page File, Crash Dump

  38. Shutdown your VM.

  39. Go back to vCloud Director under "Virtual Machines".

    Machine generated alternative text: vCloud Director ( All datacenters Compute vApps Virtual Machines Affinity Rules Networking

  40. Go under your VM's "Details".

    Machine generated alternative text: Virtual Machine Microsoft Windows Server 20„. Powered on Memory 4096 MB Networks ACTIONS v Lease Never Expires VMware Tools Snapshot DETAILS

  41. Expand the "Hardware" section.

    Machine generated alternative text: General Hardware ) Guest OS Customization ) Guest Properties ) Advanced ACTIONS

  42. You can now "delete" your source disk as you have confirmed the newly cloned disk boots fine.

    Machine generated alternative text: Hard Disks ADD Index Size 102400 39560 Policy VM default policy VM default policy Bus Type LSI Logic SAS (SCSI) LSI Logic SAS (SCSI) Bus Number Unit Number ULI Name

  43. Choose "Save" down the page.

    Machine generated alternative text: Guest OS Customization Guest Properties Advanced DISCARD CHANGES SAVE

  44. You can now "Power On" your VM through its "Actions" menu.

    Machine generated alternative text: General Hardware Compute Virtual CPUs ACTIONS Suspend Shut Dowr Guest OS Power Off Power On on and Force Recustamizatian

  45.  If disk/backup addons were temporary added, you can reduce the disk/backup addons in your account management portal Cumulus.