VMware Communities
dschlic1
Contributor
Contributor

Smaller virtual disk files

Is there any way to limit the size of t he files that make up a virtual disk? I would like to limit their size to under 1 Gb.

Reply
0 Kudos
2 Replies
a_p_
Leadership
Leadership

I'm afraid you can't do this out of the box. VMware only supports 2GB spare files, i.e. a maximum size of ~2GB for each .vmdk file.

What you can do as a workaround is to create a 1GB virtual disk (using the 2GB sparse format) and resize/grow it a couple of times, by adding 1GB each time.

André

Reply
0 Kudos
WoodyZ
Immortal
Immortal

To add to what André said, you'd use vmware-vdiskmanager as shown in the example below.

First command creates a 1GB virtual hard disk.

vmware-vdiskmanager -c -s 1024MB -a scsi -t 1 Virtual_Disk_with_1_GB_Extents.vmdk

The following commands grow disk 1GB at a time.

vmware-vdiskmanager -x 2048MB Virtual_Disk_with_1_GB_Extents.vmdk

vmware-vdiskmanager -x 3072MB Virtual_Disk_with_1_GB_Extents.vmdk

vmware-vdiskmanager -x 4096MB Virtual_Disk_with_1_GB_Extents.vmdk

vmware-vdiskmanager -x 5120MB Virtual_Disk_with_1_GB_Extents.vmdk

The attached Virtual_Disk_with_1_GB_Extents.zip contains the output of those commands.

Reply
0 Kudos