VMware Communities
pjohn07
Contributor
Contributor

Files Taking 176GB. Error when trying to Delete Snapshots.

Ran out of space on my 250GB drive macbook today. Was surprised to find that what looks to be about 176GB of files (consisting of mostly vmdk, plus some vmdk.lck, vmsn, vmem) on my drive. I did configure Autoprotect to take a snapshot everyday, but I configured it to keep up to a max of 10 snapshots when I installed fusion 10 months ago. Anyone know what all of these files are for? Possibly unrelated, but when I try to delete the snapshots from the gui interface, the snapshot i'm trying to delete is removed from the gui list, but then I get the message "There was an error trying to delete the snapshot. Unable to clean up deleted files: The specified virtual disk needs repair." I don't think that most of these vmdk files have anything to do with snapshots tho?

I imagine rm -rf all of these older vmdk files is a bad idea? Should I completely uninstall and reinstall vmware fusion and try to keep my most recent snap?

Attached is a ls -ltr of my "/Users/Parker/Library/Parker's XP Pro Work VM" directory.

$ pwd

/Users/Parker/Library/Parker's XP Pro Work VM

$ du -hs

174G .

0 Kudos
6 Replies
Mikero
Community Manager
Community Manager

I would say the best thing to do is Power Off the VM (NOT suspend...) use vmware-vdiskmanager to convert everything to a single virtual disk, tell the VMX about it, and then trash the original virtual disks once everything works.

Also, Is there a specific need for using snapshots/AutoProtect? Be reminded that it is not a backup solution, and can fill your hard drive. Personally, I disable it, and just make a copy of the whole vmwarevm (when the VM is powered off, of course) on an external disk.

Reinstalling Fusion wouldn't do anything to your Virtual Disks, as they are 2 seperate things.

So, you already know how to get to where your vmdk and etc. files are (inside the vmwarevm)... the vmdk is your main disk. .lck files are locks, vmsn is a snapshot descriptor file which remembers stuff about the current state of your VM, vmem is the dump of whatever was in RAM when you suspended the VM.

Because snapshots are dependent on eachother, doing a rm -rf on your VMDK's will certainly hose your virtual machine...

Here's what you're looking for... firstly, Power Off (Not suspend) your VM

cd /Library/Application\ Support/VMware\ Fusion/

then: ./vmware-vdiskmanager

remember the ./

This will give you some examples and info about the vmware-vdiskmanager tool (it doesn't do anything unless you pass it arguments, like I will below)

The command you're going to want is:

./vmware-vdiskmanager -r sourceDisk.vmdk -t 1 destinationDisk.vmdk

The desination can be an external volume if you don't have enough room on your internal HD.

What this will do is Convert (-r) to a new Type (-t) of "growable virtual disk split in 2GB files". You could use 0 for a single growable disk if you wish, same syntax.

Once the disk is created you can test it by editing your .vmx file, to tell it about your newly converted disk.

There's a line: scsi0:0.fileName = "sourceDisk.vmdk"

You would edit this to read: scsi0:0.fileName = "destinationDisk.vmdk"

When you're ready (as in, your VM powers up using the new disk no problem...) , you can trash everything from the original vmwarevm folder except the .vmx and the .vmxf

Keep the vmwarevm file/folder and the vmx files in it, however... When I do this, I bring the newly created vmdk file into that same folder (to keep everything together)

Obviously, by sourceDisk and destinationDisk I'm referring to your actual disks, which I'm 100% positive are not named what i've written... 😜

Hopefully that makes sense! Let me know if you need any clarification. 😃

Message was edited by: Mikero: I said 'Port Off' instead of 'Power Off'... uhduh...

-
Michael Roy - Product Marketing Engineer: VCF
0 Kudos
pjohn07
Contributor
Contributor

That worked absolutely perfectly. Thanks so much for walking through exactly what steps needed to be taken. In addition, my VM appears to be running a lot faster.

0 Kudos
Mikero
Community Manager
Community Manager

Awesome, glad to help 😃

And yah, It's running alot faster because it doesn't have to talk to the large number of virutal disk slices and snapshots all at once, giving you back much of what is the biggest bottleneck on your system: Hard Disk I/O

-
Michael Roy - Product Marketing Engineer: VCF
0 Kudos
subseawss
Contributor
Contributor

Mikero,

I have had a similar situation which took place around 5 to 6 weeks ago. I then had a problem with a missing 000013.vmdk file which I did have a post on here. I was not able to restart the VM with the widows CD via the F6 function and then loading the virtual driver from the floppy it just went around in a continuos loop. Anyway Steve Gardner asked if I could start the VM from one of the other .vdmk files this happened to work with 000014.vmdk file and I got the VM to run and had and still have the VM running this way but not very efficent as I believe from further browsing the forums that this is basically running on an old snapshot. I have copied my VM's to an external hard drive that is a 500Gb as I only have 31GB left on my Mac drive, which still has the VM's on. Is it possible to get back disk space I have looked at my C drive properties within Windows Xp and the total space taken up is only 31GB, I initially set up a one time virtual drive of 60GB when XP was loaded.

I have had a look in the directory Library/Application Support/ on my MAC but there is no VMWARE folder or any VMWARE folder apart from that where the VM's are stored under Documents.

Does the vdiskmanager only come with the CD?

Anyway another issue is that since I loaded copied the VM to the external hard drive I believe that the VM is booting up from that but then writing to the VM on my Mac.

I have gathered the customer support information and attached the file.

Appreciate any assistance.

PS - Would it be a better option just to migrate the PC re-load windows and start a brand new VM?

Regards

Ali.G.

0 Kudos
WoodyZ
Immortal
Immortal

While the "Collect Support Information" command provides a fair amount of information it does not provide the entire picture and having a file listing of each Virtual Machine Package as described in the "Get a file listing of the .vmwarevm bundle" section of in conjunction with the "Collect Support Information" command provides a much better picture however at this point I'm not asking for the file listings and am mentioning this more for others that might read this thread.

Now I've reviewed the information collected by the "Collect Support Information" command and one of the Virtual Machine's running from the LaCie external drive is cross-linked with one in the Fusion default location (on the internal drive) as well as other issues I see in the information gathered and IMO the fastest and easiest solution is going to be making sure that your User Data is backed up off of the Virtual Machines and then either use VMware vCenter Converter Standalone to create new Virtual Machines or after your sure your User Data is backed up off of the Virtual Machines just delete them and clean build a new Virtual Machine and after you have it built out and with it shutdown, not suspended, and Fusion closed manually back up the Virtual Machine by making a copy of the Virtual Machine Package. This way you have a known good working copy to go back to without having to rebuild again anytime soon if need be.

Without getting into a bunch of details however based on information reviewed from the "Collect Support Information" command I will also add the following...

Other recommendations are to not use the AutoProtect feature as from many other posts in this forum it still appears to be buggy and problematic and I do not know if VMware has gotten a handle on it yet. AFAIC It is a poorly implemented and unnecessary feature if one is maintaining regular user data backups off system and have known good working copies of the virtual machines to recover from. Also use the Snapshot feature not as a long term backup type of feature as it's not meant to be used in that manner. Take a Snapshot when appropriate and then either delete it to save the changes back to the base disk or restore it to revert back to the previous state. In other words use it more as it was intended in that before making unsure changes or testing a new application, etc. but don't run a Virtual Machine where because of overuse of the Snapshot or AutoProtect features you have to many chained virtual disks that it becomes more easy to break the chain or manage the files that comprise the Virtual Machine's Package in the long run.

The last thing I'll mention is that unless one has adequate disk space to work with and maintain monolithic disks then use split disks and if one does use split disks and especially large split disks this is where it becomes important not to let Snapshots and or AutoProtect get out of hand.

0 Kudos
subseawss
Contributor
Contributor

Woody,

Appreciate the detailed response.

So basically you are asking me to make a brand new VM i.e with reloading Windows XP once I have that done shut down the VM and the basically open the xxxxx.vmdk with vdmkmounter and then transfer all my backed up user data into the xxxxx.vmdk. Is that the correct assumption that I'm making?

Regards

Ali.G.

0 Kudos