Solved

Cleaning up VMDK files

Posted on 2009-07-08
6
1,878 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
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
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 500 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In this article, I will show you HOW TO: Suppress Configuration Issues and Warnings Alert displayed in Summary status for ESXi 6.5 after enabling SSH or ESXi Shell.
In this article, I will show you HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, using the VMware Host Client. The virtual machine has Windows Server 2016 instal…
Teach the user how to use configure the vCenter Server storage filters Open vSphere Web Client:  Navigate to vCenter Server Advanced Settings: Add the four vCenter Server storage filters: Review the advanced settings: Modify the values of the four v…
Teach the user how to join ESXi hosts to Active Directory domains Open vSphere Client: Join ESXi host to AD domain: Verify ESXi computer account in AD: Configure permissions for domain user in ESXi: Test domain user login to ESXi host:

724 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