expand "C" partition in vmware VM the EASY way

jimbo45

New Member
VIP Member
Guru
Messages
4,373
Location
Hafnarfjörður IS
Hi there

(For Windows VM's).

Sometimes running a VM you get short of space particularly on the "C" drive

There are many ways of doing this - some more complicated than others but IMO the absolute EASIEST way is the following (If you are using VMWARE).

1) Before powering on the VM go to settings
2) click / double click the virtual HDD you want to enlarge
3) utilities==>expand virtual disk --enter the new size. NOTE THE ORIGINAL PARTITION SIZE IS NOT CHANGED BY THIS.
4) Now edit VM again and choose an iso as the CD drive. Ensure it's GPARTED.
5) in Power on choose BOOT to BIOS so you can set the VM to boot from the CD drive.
6) Power on
7) choose default GPARTED options and simply slide the partition size to the new size you want. THIS INCREASES THE PARTITION SIZE.
8) power off the VM
9) set to boot normally --uncheck the iso image
10) power on -- your VM has now got its larger C drive. !!!

For REDUCING the size - the only way I can see is to dump the VM image with something like acronis (also boot from the ISO and ensure the VM can "see" external drives so it can save / restore the image.)

Create a new VM with the HDD size you want.
Boot again with acronis and restore.

Cheers
jimbo
 

My Computer

System One

  • OS
    Linux Centos 7, W8.1, W7, W2K3 Server W10
    Computer type
    PC/Desktop
    Monitor(s) Displays
    1 X LG 40 inch TV
    Hard Drives
    SSD's * 3 (Samsung 840 series) 250 GB
    2 X 3 TB sata
    5 X 1 TB sata
    Internet Speed
    0.12 GB/s (120Mb/s)
Here are some pictures to show the facility

2015-01-16_1523.png


2015-01-16_1524.png
 

My Computer

System One

  • OS
    Vista and Win7
    System Manufacturer/Model
    2xHP, 2xGateway, 1xDell, 1xSony
    Hard Drives
    5 SSDs and 12 HDs
Good tips Jimbo!

As mentioned, there are many ways to do this.

Here are some minor variations for step 7 that may speed things up a bit.

jimbo45 said:
7) choose default GPARTED options and simply slide the partition size to the new size you want. THIS INCREASES THE PARTITION SIZE.

On Linux VMs we can spare a reboot if Gparted is installed in the guest OS. But then again, Gparted is the way to go.
For Windows however, no need to reboot with Gparted if you run diskmgmt.msc (as admin) and EXTEND the volume for the needed disk.

jimbo45 said:
For REDUCING the size - the only way I can see is to dump the VM image with something like acronis (also boot from the ISO and ensure the VM can "see" external drives so it can save / restore the image.)

Agreed. The acronis method will work in all cases but might take a while to complete on slower machines. Though today it all goes all pretty fast.

Other ways to do this , maybe, but it might get tricky:
I was thinking at REDUCING the size of a virtual disk by running diskmgmt.msc again and SHRINK the volume of the needed disk to a new size of your choice. You may need to defragment the disk first in case fragmented files don't allow to shrink beyond a certain size. But what do we do with the unallocated space? Cloning the disk with the CloneVDI tool might work but it will create a VirtualBox HDD that, in case of VMware will need to be re-converted again.

One KB article at VMware recommends converting, shrinking and expanding using an all-in-one tool, the VMware Converter. I didn't tried the vm converter personally but it should go faster than a bare Acronis backup in a VM (the backup needs to be restored later). In my experience with CloneVDI, large disks are already duplicated and expanded in minutes. Similar results are expected from the VMware Converter as well.

Regards,
Hopachi
 

My Computer

System One

  • OS
    Windows 10 x64
    Computer type
    Laptop
    System Manufacturer/Model
    HP Envy DV6 7250
    CPU
    Intel i7-3630QM
    Motherboard
    HP, Intel HM77 Express Chipset
    Memory
    16GB
    Graphics Card(s)
    Intel HD4000 + Nvidia Geforce 630M
    Sound Card
    IDT HD Audio
    Monitor(s) Displays
    15.6' built-in + Samsung S22D300 + 17.3' LG Phillips
    Screen Resolution
    multiple resolutions
    Hard Drives
    Samsung SSD 250GB + Hitachi HDD 750GB
    PSU
    120W adapter
    Case
    small
    Cooling
    laptop cooling pad
    Keyboard
    Backlit built-in + big one in USB
    Mouse
    SteelSeries Sensei
    Internet Speed
    slow and steady
    Browser
    Chromium, Pale Moon, Firefox Developer Edition
    Antivirus
    Windows Defender
    Other Info
    That's basically it.
The way I shrink them is with vmware converter.
 

My Computer

System One

  • OS
    Windows 7
    System Manufacturer/Model
    Self-Built in July 2009
    CPU
    Intel Q9550 2.83Ghz OC'd to 3.40Ghz
    Motherboard
    Gigabyte GA-EP45-UD3R rev. 1.1, F12 BIOS
    Memory
    8GB G.Skill PI DDR2-800, 4-4-4-12 timings
    Graphics Card(s)
    EVGA 1280MB Nvidia GeForce GTX570
    Sound Card
    Realtek ALC899A 8 channel onboard audio
    Monitor(s) Displays
    23" Acer x233H
    Screen Resolution
    1920x1080
    Hard Drives
    Intel X25-M 80GB Gen 2 SSD
    Western Digital 1TB Caviar Black, 32MB cache. WD1001FALS
    PSU
    Corsair 620HX modular
    Case
    Antec P182
    Cooling
    stock
    Keyboard
    ABS M1 Mechanical
    Mouse
    Logitech G9 Laser Mouse
    Internet Speed
    15/2 cable modem
    Other Info
    Windows and Linux enthusiast. Logitech G35 Headset.
The way I shrink them is with vmware converter.

Hi there

That shrinks the Virtual disk size but it doesn't actually shrink the partition within the VM. I assume say if you have a Windows partition defined as 75GB, and only using say 35 GB you might want to shrink the partition to say 50GB as well as reducing the Virtual disk size.

(The latest version of the VMware converter might have changed so it does work but the last time I tried that I think it didn't reduce the partition size within the VM which is why I suggested my original procedure).

Cheers
jimbo
 

My Computer

System One

  • OS
    Linux Centos 7, W8.1, W7, W2K3 Server W10
    Computer type
    PC/Desktop
    Monitor(s) Displays
    1 X LG 40 inch TV
    Hard Drives
    SSD's * 3 (Samsung 840 series) 250 GB
    2 X 3 TB sata
    5 X 1 TB sata
    Internet Speed
    0.12 GB/s (120Mb/s)
Back
Top