KenMadsen
Enthusiast
Enthusiast

Reduce disk size

Jump to solution

I have 2 questions, both will help me in different situations

Is there a way to convert pre-allocated disks to sparse(growing) disks?

Can I reduce the disk space allocated if I really don't use it (when pre-allocation amount is higher than really is needed.

Others have created the images, but I would like to reduce the size to expedite copying images.

0 Kudos
1 Solution

Accepted Solutions
birdie
Expert
Expert

Have you bothered reading the doc I've pointed you at? Smiley Happy

-t [0|1|2|3|4|5] Specifies the virtual disk type. This option is required when you create or convert a 
                 virtual disk. Choose one of the following types:
                     0 – create a growable virtual disk contained in a single file (monolithic sparse).
                     1 – create a growable virtual disk split into 2GB files (split sparse).
                     2 – create a preallocated virtual disk contained in a single file (monolithic flat).
                     3 – create a preallocated virtual disk split into 2GB files (split flat).
                     4 – create a preallocated virtual disk compatible with ESX Server (VMFS flat).
                     5 – create a compressed disk optimized for streaming.

View solution in original post

0 Kudos
6 Replies
birdie
Expert
Expert

Is there a way to convert pre-allocated disks to sparse(growing) disks?

Create a growing disk, plug it into your VMWare and use any disk imaging application to copy your old partitions to a newer disk. Do not forget to copy MBR and mark the system partition as active and bootable. (My favorite is Acronis Disk Director Suite).

Can I reduce the disk space allocated if I really don't use it (when pre-allocation amount is higher than really is needed.

Fire up vmware tools (from the systray or from the Control Panel) and hit "Shrink". That's it.

KenMadsen
Enthusiast
Enthusiast

When it is pre-allocated, shrink is disabled. It was one of the characteristics listed in the Shrink tab to explain the reason for why shrink was disabled.

Thanks for the answers. The option to add a disk appears to be a solution, but quite a lot more effort than I was hoping to have to put into this.

0 Kudos
birdie
Expert
Expert

Everything is oh so much easier😉

vmware-vdiskmanager -r sourceDisk.vmdk -t 0 targetDisk.vmdk

This converts the disk from its original preallocated type to a growable virtual disk consisting of one VMDK 

file. Virtual Disk Manager reclaims some space in the virtual disk, so the VMDK needs to be only about as large 

as the data it contained at conversion time.

0 Kudos
KenMadsen
Enthusiast
Enthusiast

Yes, that seems much easier. I am concerned, however, that if it consolidates it into one file, then it will be larger than 2GB and then I'll have another problem transferring the VMs. Is there an option to let it do that conversion, but use 2GB segments?

0 Kudos
birdie
Expert
Expert

Have you bothered reading the doc I've pointed you at? Smiley Happy

-t [0|1|2|3|4|5] Specifies the virtual disk type. This option is required when you create or convert a 
                 virtual disk. Choose one of the following types:
                     0 – create a growable virtual disk contained in a single file (monolithic sparse).
                     1 – create a growable virtual disk split into 2GB files (split sparse).
                     2 – create a preallocated virtual disk contained in a single file (monolithic flat).
                     3 – create a preallocated virtual disk split into 2GB files (split flat).
                     4 – create a preallocated virtual disk compatible with ESX Server (VMFS flat).
                     5 – create a compressed disk optimized for streaming.

0 Kudos
KenMadsen
Enthusiast
Enthusiast

No I haven't. I will do so when I get the system up that I want to resize. Sorry for being in too much of a hurry. I very much appreciate your efforts to steer me to the right answer and the source docs.

0 Kudos