I do not understand the vmdk files.
I have vmware workstation 7.1 running on Window 7. I have a Windows 7 client running under the workstation. The directory containing the Win7 VM is over 200GB! For the life of me I can not figure out why and more importantly how to reduce it. It is continuing to grow and I am almost out of harddrive space on the host.
Some of the relevant info on the client are:
Memory = 2048M
Processors 1
Harddrive (IDE): Current size = 46.6 GB, System free: 26.9 GB, Maximum size 596.2 GB.
I currently show two snap shots.
In the host's folder(directory) for this VM I see vmem and vmsn snap shot files with dates that match the snap shots displayed in the snapshot manager. They contain the words "Snapshot8" and "Snapshot13" in the filenames so I assume those are for those snapshots and they are #8 and #13.
But it is three .vmdk files that are the big ones.
Please can anyone help me figure how to shrink this monsters?
Mike
Below is a listing of the directory contents:
C:\Users\Mike\Documents\Virtual Machines\Mike-Win7-VM1>dir /n
Volume in drive C is OS
Volume Serial Number is 7C4E-86D4
Directory of C:\Users\Mike\Documents\Virtual Machines\Mike-Win7-VM1
10/10/2014 12:52 PM <DIR> .
10/10/2014 12:52 PM <DIR> ..
10/10/2014 12:07 PM 2,147,483,648 564d81bf-ed4e-65d6-7286-6b3bcd18f9fd.vmem
10/10/2014 12:07 PM <DIR> 564d81bf-ed4e-65d6-7286-6b3bcd18f9fd.vmem.lck
10/24/2011 03:30 PM <DIR> caches
10/10/2014 12:08 PM 50,647,138,304 Mike-Win7-VM1-000002.vmdk
10/10/2014 12:07 PM <DIR> Mike-Win7-VM1-000002.vmdk.lck
05/07/2014 07:55 AM 51,001,622,528 Mike-Win7-VM1-000004.vmdk
10/10/2014 12:07 PM <DIR> Mike-Win7-VM1-000004.vmdk.lck
02/19/2014 03:21 PM 2,147,483,648 Mike-Win7-VM1-Snapshot13.vmem
02/19/2014 03:19 PM 170,515,294 Mike-Win7-VM1-Snapshot13.vmsn
05/09/2012 08:04 AM 2,147,483,648 Mike-Win7-VM1-Snapshot8.vmem
05/09/2012 08:04 AM 214,696,250 Mike-Win7-VM1-Snapshot8.vmsn
05/07/2014 06:30 AM 114,296,422,400 Mike-Win7-VM1.vmdk
10/10/2014 12:07 PM <DIR> Mike-Win7-VM1.vmdk.lck
10/10/2014 12:02 PM 928 Mike-Win7-VM1.vmsd
10/10/2014 01:18 PM 3,932 Mike-Win7-VM1.vmx
10/10/2014 12:52 PM <DIR> Mike-Win7-VM1.vmx.lck
11/07/2013 02:43 PM 268 Mike-Win7-VM1.vmxf
10/10/2014 12:02 PM 8,684 nvram
10/10/2014 12:04 PM 916,296 vmware-0.log
08/29/2014 05:27 PM 580,844 vmware-1.log
07/14/2014 04:16 PM 150,211 vmware-2.log
10/10/2014 12:07 PM 153,903 vmware.log
16 File(s) 222,774,660,786 bytes
8 Dir(s) 28,237,348,864 bytes free
To clarify, I am asking why the three .vmdk files are each bigger than the entire size of the disk used by my VM? And what can I do about it. The three files are:
10/10/2014 12:08 PM 51,035,242,496 Mike-Win7-VM1-000002.vmdk
05/07/2014 07:55 AM 51,001,622,528 Mike-Win7-VM1-000004.vmdk
05/07/2014 06:30 AM 114,296,422,400 Mike-Win7-VM1.vmdk
3 File(s) 216,333,287,424 bytes
From within the VM, my C drive says 31.7 GB used. VM settings says 47.5 GB is current size (I assume later includes the "recovery partition" where as the former does not)?
Also the Disk information indicates that "Disk space is not preallocated for this hard disk."
Mike
Well you have yourself in a situation! You cannot shrink the disk because it has Snapshots and you can't delete the Snapshots because you do not have adequate free disk space on the Host to perform such operations. You'll need to temporarily copy the Virtual Machine to a disk that has adequate adequate free disk space on the Host to perform such operations and then after testing it you can copy it back. Once you copy the VM to another disk that has adequate adequate free disk space, the amount of free disk space will need to be a little bit more then what is shown taken up by the Guest OSes Filesystem from within the Guest OS. You know, some extra room besides what's actually needed, a few extra GB doesn't hurt.
There is also another way to consolidate the .vmdk files by create a new one base on the chain of .vmdk files using vmware-vdiskmanager to another location and then swap out the disks. Although that said if you didn't understand what I just said in the last sentence do what was first mentioned.
WoodyZ,
Thank you for your help. I don't quite follow...
1) Are you saying I need to delete my snapshots before I can shrink? If so I did not know that.
2) Are you saying I can not delete snapshots without having more disk space on the host?
If I understand, I need to move the entire folder to a different drive and then do the shrink? And how do I do a "shrink"? I shut the VM down, went to settings, selected the harddrive and under Utilities I see Map, Defrag, Expand and Compact. If I try Compact I get an error: "One of the parameters supplied is invalid."
Again - thank you very very much for your help.
Mike
How in the heck did I end up in this situation to start with!!?!?!?
1) Are you saying I need to delete my snapshots before I can shrink? If so I did not know that.
I'm not sitting at a system I can test however IIRC a VM with Snapshots cannot be shrunk, they need to be deleted first however in your case, using monolithicSparse disk of the current size it is with the amount of free Host disk space it's not adequate to do either, hence the catch 22.
2) Are you saying I can not delete snapshots without having more disk space on the host?
If I understand, I need to move the entire folder to a different drive and then do the shrink?
You cannot do anything with that VM on the current Host Disk because it does not have adequate free disk space on the to perform such operations.
How in the heck did I end up in this situation to start with!!?!?!?
Possibly by not keep an eye on things! This is the draw back with using monolithicSparse disks vs, twoGbMaxExtentSparse type disks however when using such a large max capacity, in your case 596.2 GB, using a twoGbMaxExtentSparse type disk with to many Snapshots can have issues with having to many file handles open in the Host OS in some cases. So if one doesn't need a 500 GB vDisk then use a much smaller disk if going to use g monolithicSparse disks. With the twoGbMaxExtentSparse type disk one only needs a bit more then 2 GB free as it process one Extent at a time unlike the monolithicSparse disk where it the whole disk (snapshot disk) at a time.
You cannot shrink the disk because it has Snapshots and you can't delete the Snapshots because you do not have adequate free disk space on the Host
...and can't use VM / Manage / Clean Up Disks, either, which works with snapshots and doesn't require spare disk space on the host. But I think the command was introduced (in v9 maybe?) later than v7.1 which is OP's version.
I don't know much about vmdk internals or format compatibility across versions but, assuming it hasn't changed since v7.1, it might be technically possible to install a v10 trial, run Clean Up Disks, then revert to v7.1 and hope nothing broke in the process. ( Loud disclaimer: it's not something I've tried, and wouldn't dream trying it without having a full backup handy in case planets don't align. )
Liviu