?
Solved

Cleaning up VMDK files

Posted on 2009-07-08
6
Medium Priority
?
1,882 Views
Last Modified: 2012-05-07
I'm running tight on space on a ESX box that has 2 virtual servers running, I had some snapshots but when I tried to clean them down the box frooze for a very long time and needed a reboot, now my snapshot manager only shows 1 snapshot on each server but one server still has 000001.vmdk, 000002.vmdk and 000004.vmdk as per screen shot attached.

Can I clear down these files without causing any issues?
vmdk-issue.JPG
0
Comment
Question by:ggntt
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 19

Expert Comment

by:deroode
ID: 24802801
First, check your .vmx to see if these files don't belong to the VM.

After verifying that you can move them to a different directory. If they are still in use (e.g. they are still snapshot files of some sort) you will not be able to move them because they are in use.
If you can move them, and your VM's don't suffer then you can delete them.
0
 

Author Comment

by:ggntt
ID: 24803433
Thanks deroode, I checked the VMX file and no mention of 2 of those files, I was able to move them without impacting the vm, but I can't delete them from teh new folder, when I try and delete I get General failure error.
0
 
LVL 42

Expert Comment

by:paulsolov
ID: 24803604
Per VMware support if you have issues cleaning up snapshots the easiest workaround is to use vConverter to do a V2V which will consolidate the VM for you and you can delete the source VM once you're done.  

I've had this happen multiple times and this is an easy fix for it.
0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 10

Expert Comment

by:dnilson
ID: 24819519
One way to prevent this from happening is to not reboot while removing snapshots.

Removing snapshopts from the GUI instead of the commandline is problematic.  If you keep the snapshot just long enough to test a change (a few hours)no big deal, but if you are removing days of snapshot the GUI simply will not wait for the OS to finish before it gives up and says "failed".

DONT BELIEVE IT.

The snapshot is still being incorported back into the base disk, and I've sen this take 8-9 hours on occasion, bu left alone, it finishes and does a proper cleanup.

Rebooting while this is happeneing, especially on some SANS can render the files undeletable, or worse.

The best way to remove snapshots is from a putty session using the Commandline tools from VMware.  That way you can simply watch for the command to end, long after VI/VC has given up and proclaimed a failure.

A good script to remove ALL snapshots o na host is:

time vmware-cmd -l | while read x; do printf "$x"; vmware-cmd "$x" removesnapshots; done

0
 
LVL 8

Expert Comment

by:JT92677
ID: 24820101
How about cloning the machine to a new subdirectory. It moves only the needed files and leaves out all the unnecessary snapshots. Then use the cloned machine, and delete the original?

Or am I missing something?  I use clone a lot to clean up directories once a machine is stable and in a state I want to save.

Jeff
0
 
LVL 1

Accepted Solution

by:
ionut19 earned 2000 total points
ID: 26361929
i had the same issue in the past, what you can do to clean them is delete all the snapshots, if the operation times out you should created a new snapshot and then commit all snapshots to disk again. This is from vmware technical support

also take a look at this:

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1014249
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When rebooting a vCenters 6.0 and try to connect using vSphere Client we get this issue "Invalid URL: The hostname could not parsed." When we get this error we need to do some changes in the vCenter advanced settings to fix the issue.
Giving access to ESXi shell console is always an issue for IT departments to other Teams, or Projects. We need to find a way so that teams can use ESXTOP for their POCs, or tests without giving them the access to ESXi host shell console with a root …
Teach the user how to install ESXi 5.5 and configure the management network System Requirements: ESXi Installation:  Management Network Configuration: Management Network Testing:
Teach the user how to configure vSphere Replication and how to protect and recover VMs Open vSphere Web Client: Verify vsphere Replication is enabled: Enable vSphere Replication for a virtual machine: Verify replicated VM is created: Recover replica…
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question