Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Cleaning up VMDK files

Posted on 2009-07-08
6
Medium Priority
?
1,889 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:Paul Solovyovsky
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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

In this step by step tutorial with screenshots, we will show you HOW TO: Enable SSH Remote Access on a VMware vSphere Hypervisor 6.5 (ESXi 6.5). This is important if you need to enable SSH remote access for additional troubleshooting of the ESXi hos…
In this article, I will show you HOW TO: Create your first Windows Virtual Machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, the Windows OS we will install is Windows Server 2016.
This video shows you how to use a vSphere client to connect to your ESX host as the root user. Demonstrates the basic connection of bypassing certification set up. Demonstrates how to access the traditional view to begin managing your virtual mac…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

610 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