Shrink Hard Drive in VMware

tonymarcus

New Member
Member
Messages
145
Location
Suffolk , England
Hello Guys,

I've created a "Powered on machine" virtual installation of my Windows 8 on VMware VCentre Convertor to run in VMware Player, the size of the Hard drive was about 130GB, in the virtual machine I've deleted all my media files and uninstalled the large programs. The size of the C: drive is now 40GB which is more manageable for a Virtual Install which will be used to tweaking experimentation before I do it to my real Windows 8 installation.

How do I shrink the Virtual Hard drive from 130GB to say 45GB, I have installed the VM Tools and reading on the VMware website it saying you go to the VM Tools in the ghost install by right clicking it in the system tray or going to control panel on the ghost install and click on shrink. I have the icon in the system tray but the only right click options are about and help and there is nothing in control panel.


I have tried the "compact" option in the virtual machine settings by right click my Windows 8 virtual machine from the VMware player but it doesn't shrink the volume, it wirred away for an hour but the hard drive stayed the same size.

IF anyone has Win 8 Pro 64bit in Wmware Player could they look to see if the shrink option is there on the Virtual install of Win 8 by right clicking VM tools in the system tray and clicking settings or options.


Thanks

Tony
 

My Computer

System One

  • OS
    Windows 8.1 Pro 64 Bit
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Home Built System
    CPU
    Intel Core 2 Quad Q9450 2.66Ghz, Overclocked to 3.3Ghz
    Motherboard
    Gigabyte GA-EX38-DS5
    Memory
    8GB XMS2 4GB DDR2 PC2-8500
    Graphics Card(s)
    Gigabyte 660GTX 2GB
    Monitor(s) Displays
    Samsung SMS27B970D
    Screen Resolution
    2560x1440
    Hard Drives
    1xSAMSUNG SSD 840 Pro Series Basic 2.5" - 512 GB - Boot drive
    2xSamsung Spinpoint F1 750GB
    PSU
    Corsair 520HX
    Case
    Antec P182
    Cooling
    Zalman 9700NT
    Internet Speed
    12Mb/s
    Other Info
    I did a fresh format and install of Windows 8 64 Bit Pro. Sorry but I couldn't live without a start button so I have installed the Start8 start menu which is great. I try sometimes not to use it but find metro frustrating to find programs as I have many. I will use Metro for apps only and desktop of serious computing.
I'm firing up a Windows 8 box under VMWare Player 4.04 right now on my test box at work. I usually use VMWare Workstation 8.x as I have a license for it at work. In that version, when you right click on the VMWare Tools icon you have an option to launch the VMWare Tools. Shrink is a tab within that version.

Compact just frees up white space within the file so it can be re-used. But as you discovered, it does not reduce the size of the .vmdk.

I'll post back here shortly.


Edit: Ok, under Windows 8, when I right click on the VMWare Tools icon from within my Windows 8 VM, my options are
1). Open VMWare Tools
2). Disable Icon
3). Exit

So, I click on Open VMWare Tools, hit the Shrink tab, click on my C drive, click on Prepare to Shrink and the process starts. It ran for a bit and said it was ready to start the shrink. It then performed the shrink which took 10-15 minutes and it dropped my .vmdk from 13.9GB to 6.0GB.
 
Last edited:

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.
Thanks for looking, I reckon the shrink feature is not available on the free VMware player, shame as it about 80GB's bigger than it needs to be. I wonder if I could run VMware Vcentre convertor from within my virtual machine and create another powered on machine then copy the folders to my main windows 8 install.

What do you think?

Cheers

Tony
 

My Computer

System One

  • OS
    Windows 8.1 Pro 64 Bit
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Home Built System
    CPU
    Intel Core 2 Quad Q9450 2.66Ghz, Overclocked to 3.3Ghz
    Motherboard
    Gigabyte GA-EX38-DS5
    Memory
    8GB XMS2 4GB DDR2 PC2-8500
    Graphics Card(s)
    Gigabyte 660GTX 2GB
    Monitor(s) Displays
    Samsung SMS27B970D
    Screen Resolution
    2560x1440
    Hard Drives
    1xSAMSUNG SSD 840 Pro Series Basic 2.5" - 512 GB - Boot drive
    2xSamsung Spinpoint F1 750GB
    PSU
    Corsair 520HX
    Case
    Antec P182
    Cooling
    Zalman 9700NT
    Internet Speed
    12Mb/s
    Other Info
    I did a fresh format and install of Windows 8 64 Bit Pro. Sorry but I couldn't live without a start button so I have installed the Start8 start menu which is great. I try sometimes not to use it but find metro frustrating to find programs as I have many. I will use Metro for apps only and desktop of serious computing.
I ran my test using the free VMWare Player product. Version 4.04.
 

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.
I'm running VMware player free version 5.0.1, the only options I get by right clicking the VM tool icon in the virtual machine is "about VMware tools, disable icon and exit ". I wonder why it's missing on my version
 

Attachments

  • ImageUploadedByEight Forums1360351063.386359.jpg
    ImageUploadedByEight Forums1360351063.386359.jpg
    17.3 KB · Views: 3,308

My Computer

System One

  • OS
    Windows 8.1 Pro 64 Bit
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Home Built System
    CPU
    Intel Core 2 Quad Q9450 2.66Ghz, Overclocked to 3.3Ghz
    Motherboard
    Gigabyte GA-EX38-DS5
    Memory
    8GB XMS2 4GB DDR2 PC2-8500
    Graphics Card(s)
    Gigabyte 660GTX 2GB
    Monitor(s) Displays
    Samsung SMS27B970D
    Screen Resolution
    2560x1440
    Hard Drives
    1xSAMSUNG SSD 840 Pro Series Basic 2.5" - 512 GB - Boot drive
    2xSamsung Spinpoint F1 750GB
    PSU
    Corsair 520HX
    Case
    Antec P182
    Cooling
    Zalman 9700NT
    Internet Speed
    12Mb/s
    Other Info
    I did a fresh format and install of Windows 8 64 Bit Pro. Sorry but I couldn't live without a start button so I have installed the Start8 start menu which is great. I try sometimes not to use it but find metro frustrating to find programs as I have many. I will use Metro for apps only and desktop of serious computing.
Perhaps it's a version 5.0.1 thing. Let me see about upgrading my version of Player and see what I get.
 

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.
Great that would be handy to know if it's version 5 that's causing the issue. On the cloned Virtual Machine version of my Win 8 it's lost its activation, will it completely stop working in the future or is it going to just keep warning me to activate?
 

My Computer

System One

  • OS
    Windows 8.1 Pro 64 Bit
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Home Built System
    CPU
    Intel Core 2 Quad Q9450 2.66Ghz, Overclocked to 3.3Ghz
    Motherboard
    Gigabyte GA-EX38-DS5
    Memory
    8GB XMS2 4GB DDR2 PC2-8500
    Graphics Card(s)
    Gigabyte 660GTX 2GB
    Monitor(s) Displays
    Samsung SMS27B970D
    Screen Resolution
    2560x1440
    Hard Drives
    1xSAMSUNG SSD 840 Pro Series Basic 2.5" - 512 GB - Boot drive
    2xSamsung Spinpoint F1 750GB
    PSU
    Corsair 520HX
    Case
    Antec P182
    Cooling
    Zalman 9700NT
    Internet Speed
    12Mb/s
    Other Info
    I did a fresh format and install of Windows 8 64 Bit Pro. Sorry but I couldn't live without a start button so I have installed the Start8 start menu which is great. I try sometimes not to use it but find metro frustrating to find programs as I have many. I will use Metro for apps only and desktop of serious computing.
Can probably drop out to elevated command prompt and run
slmgr.vbs -rearm. This will get you 30 days grace period. Can do that 3 times.
 

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.
Hello Guys,

I have tried the "compact" option in the virtual machine settings by right click my Windows 8 virtual machine from the VMware player but it doesn't shrink the volume, it wirred away for an hour but the hard drive stayed the same size.

Compact is better than shrink for the needed increase in size in the future.

You don't get shrink options with player but compact works if applied properly:
(they should mention that in the user manual as VBox does: the compact alone doesn't work!)

(you need a drive wiper: it's said that the Windows Defragmenter works but I've didn't tested it yet)
-first you'll need for example to run CCleaner's drive wiper in the VM with this settings:
drivewiper.png

-after completion, shut down the VM and do the compact operation: this time it will work.

I've been using this for a few times and you don't need to shrink it because one you exceed a shrinked size, you need to expand again.

Compact works nice.
 

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.
Excellent, thanks for the tips, I'll give that a try
 

My Computer

System One

  • OS
    Windows 8.1 Pro 64 Bit
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Home Built System
    CPU
    Intel Core 2 Quad Q9450 2.66Ghz, Overclocked to 3.3Ghz
    Motherboard
    Gigabyte GA-EX38-DS5
    Memory
    8GB XMS2 4GB DDR2 PC2-8500
    Graphics Card(s)
    Gigabyte 660GTX 2GB
    Monitor(s) Displays
    Samsung SMS27B970D
    Screen Resolution
    2560x1440
    Hard Drives
    1xSAMSUNG SSD 840 Pro Series Basic 2.5" - 512 GB - Boot drive
    2xSamsung Spinpoint F1 750GB
    PSU
    Corsair 520HX
    Case
    Antec P182
    Cooling
    Zalman 9700NT
    Internet Speed
    12Mb/s
    Other Info
    I did a fresh format and install of Windows 8 64 Bit Pro. Sorry but I couldn't live without a start button so I have installed the Start8 start menu which is great. I try sometimes not to use it but find metro frustrating to find programs as I have many. I will use Metro for apps only and desktop of serious computing.
No need for external drive wiper

Sorry, maybe it is too late for the original requester, but maybe others will benefit. There is no need to install an external drive wiper, the Vmware player already has everything it needs. Just that it is commandline. So all you need to do is run a command in the Vmware tools installation folder:

VMwareToolboxCmd.exe disk shrink c:\

It zeroes the free space and then compacts the virtual disk. Of course, if you have several partitions inside the virtual machine, run the command for each one.
 

My Computer

System One

  • OS
    Windows 7
    Computer type
    Laptop
excellent , thanks, that will come in handy for the future!.

Tony
 

My Computer

System One

  • OS
    Windows 8.1 Pro 64 Bit
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Home Built System
    CPU
    Intel Core 2 Quad Q9450 2.66Ghz, Overclocked to 3.3Ghz
    Motherboard
    Gigabyte GA-EX38-DS5
    Memory
    8GB XMS2 4GB DDR2 PC2-8500
    Graphics Card(s)
    Gigabyte 660GTX 2GB
    Monitor(s) Displays
    Samsung SMS27B970D
    Screen Resolution
    2560x1440
    Hard Drives
    1xSAMSUNG SSD 840 Pro Series Basic 2.5" - 512 GB - Boot drive
    2xSamsung Spinpoint F1 750GB
    PSU
    Corsair 520HX
    Case
    Antec P182
    Cooling
    Zalman 9700NT
    Internet Speed
    12Mb/s
    Other Info
    I did a fresh format and install of Windows 8 64 Bit Pro. Sorry but I couldn't live without a start button so I have installed the Start8 start menu which is great. I try sometimes not to use it but find metro frustrating to find programs as I have many. I will use Metro for apps only and desktop of serious computing.
Hi there
Things like CCleaner IMO are not a good idea.

EASY way - especially if you back up your system anyway --you should be regularly be backing up your HOST OS in any case.

1) use from WITHIN the VM a backup tool to backup your existing VM. (Acronis / Free Macrium etc).

2) Delete the Virtual drive - if using VMware just choose delete VM otherwise delete with Windows / File explorer.

3) Now create new virtual machine with the wizard -- select install the OS later. Choose the NEW size of storage you need for the VM.

4) Set the VM to boot from a USB / DVD where you have the bootable recovery program (Free Macrium or whatever).

5) Now restore the VM to your new virtual disk -- you CAN restore to a smaller disk so long as it all fits on to the allocated space.

Easy -- job done and you've still got your original VM. Sometimes the "SHRINK DISK options don't allow flexible re-sizing.


Note - using something like Partition Wizard won't be any good in a VM -- although it CAN re-size the partitions it won't release the free space to Windows -- the free space will still be in the VHD (Allocated storage space in the Virtual Hard drive).

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)
Some explanation about compacting VM disks

First of all, CCleaner is fine for this purpose: wiping free space with a GUI program in order to prepare the disk for shrinking. You can compare the operation with VMware's tools own operation of preparing/wiping free space:
Shrinking Virtual Disks
Note that the link above describes WS 5 but in WS 9 we have to rely on command line tools (as mentioned by valipod: VMwareToolboxCmd.exe disk shrink c:\).

What we can do then is compacting from within the VM or from the host (after is turned off) in Player or WS VM storage settings -> disk -> compact.

There are actually 2 steps involved here: preparing/wiping free space (from within the VM) and compacting. Wasting time with extra steps is possible but not needed.

EDIT: after seeing all posts above, we can say that the problem can be solved in multiple ways. To each his preferred solution then.
:)
 

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.
Back
Top