VMware Communities
KenMadsen
Enthusiast
Enthusiast
Jump to solution

Reduce disk size

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.

Reply
0 Kudos
1 Solution

Accepted Solutions
birdie
Expert
Expert
Jump to solution

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

Reply
0 Kudos
6 Replies
birdie
Expert
Expert
Jump to solution

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
Jump to solution

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.

Reply
0 Kudos
birdie
Expert
Expert
Jump to solution

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.

Reply
0 Kudos
KenMadsen
Enthusiast
Enthusiast
Jump to solution

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?

Reply
0 Kudos
birdie
Expert
Expert
Jump to solution

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.

Reply
0 Kudos
KenMadsen
Enthusiast
Enthusiast
Jump to solution

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.

Reply
0 Kudos