VMware Communities
AmmarSM
Contributor
Contributor

Disk Size of a VM

Hi

i created a 50 GB VM and choosed disk type as pre-alocated but when i check the file size on the Mac i found it 92 GB

how that happenned ? and is it possible to change a hard disk of type pre-alocated to grow type ?

0 Kudos
12 Replies
WoodyZ
Immortal
Immortal

To help figure out what is what the best way to provide comprehensive diagnostic information is to use the "Collect Support Information" command from the VMware Fusion (menu bar) > Help > Collect Support Information and then attach the .tgz file it created on your Desktop to a reply post.

0 Kudos
AmmarSM
Contributor
Contributor

Thanks i will do now but this information will be for all VMs or the selected one ?

and should it be running ?

0 Kudos
WoodyZ
Immortal
Immortal

Doesn't matter whether or not the Virtual Machine is running.

The "Collect Support Information' is as stated it provides comprehensive diagnostic information, so it will include information on all Virtual Machines.

Otherwise at a minimum, which is already included in the .tgz file, need to see a file listing of the target Virtual Machine Package in the format as shown in the Get a file listing of the .vmwarevm bundle section of Information Gathering for VMware Fusion.  Follow the directions in that section and then attach the filelist.txt file along with the .vmx (VMware virtual machine configuration) file and the vmware.log files (usually 4 of them).

Archive/Compress all of these files into a single .zip archive file and attach the .zip archive to a reply post.

0 Kudos
AmmarSM
Contributor
Contributor

This is the file you asked about ?

0 Kudos
WoodyZ
Immortal
Immortal

Okay, the "Windows 7 Developer" Virtual Machine has a twoGbMaxExtentFlat 50 GB virtual hard disk. This disk is a pre-allocated disk.  The Virtual Machine has 1 Snapshot and is currently using a twoGbMaxExtentSparse 50 GB disk for the Snapshot or Child virtual hard disk.  This Snapshot disk can grow as needed up to 50 GB.  Therefore as it stands currently the Virtual Machine has the potential to consume up to 100 GB of Host disk space just with the Base or Parent virtual hard disk and then the 1 Snapshot or Child virtual hard disk.  If you were to take another Snapshot then another Snapshot or Child virtual hard disk is created and then the potential used Host disk space increases +50 GB on top of what it already consumes at the time the next Snapshot is taken.

If you delete the Snapshot it will merge the contents of the Snapshot or Child virtual hard disk ("Windows 7 Developer-000001.vmdk") with the contents of the Base or Parent virtual hard disk ("Windows 7 Developer.vmdk") and then will only be using 50 GB of Host disk space for the virtual hard disk.

You could possibly further reduce the overall footprint by changing the pre-allocated virtual hard disk to a sparse or growable virtual hard disk and after the disk was shrunk using VMware Tools it with then initially only consume the amount of Host disk space in the amount of used disk space within the Guest's Filesystem and then continue to grow as needed up to the 50 GB current size limit.

As a general rule I do not run a Virtual Machine on a Snapshot for long periods of time.  Typically I will take a Snapshot prior to doing something that has potential to be problematic or when wanting to test something and then when the actions taken are without issues I then either restore to a previous Snapshot or delete the Snapshot.  If I do maintain a Snapshot I do so for short intervals of time and delete regularly so as to keep the overall size of the Virtual Machine Package smaller rather then larger and also decrease the time it takes to process the Snapshots.

0 Kudos
AmmarSM
Contributor
Contributor

Thank for your detailed replay, but how to change a pre located to a grow one ?

Cause at theVM settings the check box is disabled ?

Sincerely

Ammar S. Mitoori

Sent from my iPad

0 Kudos
WoodyZ
Immortal
Immortal

It's disabled because you have a Snapshot.  Once the Snapshot is deleted then you can change the type of disk it is.

BTW As a general rule I do not preform disk level operations such as this without having a backup of the Virtual Machine Package or at a minimum the User Data that resides within the Guest OSes Filesystem if not already backed up off of the Guest OSes Filesystem.

0 Kudos
AmmarSM
Contributor
Contributor

Thanks i removed the snapshot and changed the disk to grow now the size is 58 GB although smaller but yet bigger than the disk size

i chooses which is 50 GB the things is when i run the VM the 50 GB hard disk isn't full ?

0 Kudos
WoodyZ
Immortal
Immortal

Did you use VMware Tools to shrink the virtual hard disk?  How much space is reported as used in Disk Management?

0 Kudos
AmmarSM
Contributor
Contributor

i went to the machine setting and removed the checked mark from the pre-alocated option

dont know what tools you mean ? when i ran the VM used is around 40 GB and 10 GB free

0 Kudos
WoodyZ
Immortal
Immortal

Have a look at: VMware Fusion (menu bar) > Help > Search > type VMware Tools then select, Open the VMware Tools Control...

Then after reading the information in the VMware Fusion Help File, open the VMware Tools Control Panel in the Guest OS and go to the Shrink tab and go from there.

0 Kudos
AmmarSM
Contributor
Contributor

Hi

I did what you said now everything is fine the file size is 44 GB which is logical, i made a big mess Smiley Happy

thanks a lot

0 Kudos