Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot consolidate virtual machine 1

Status
Not open for further replies.

aking

Technical User
Aug 11, 2002
112
GB
This morning in vCenter one of my VM's was flagged with a warning that it needed consolidating. I have been attempting to consolidate it without having any luck so far. I am running two Esx5.1 hosts.

First I tried to consolidate from snapshot manager and I got an error about locked files ("Unable to access file <unspecified filename> since it is locked."). Viewing the vm folder containing this VM on my San and I can see a lot of delta vmdk files, and a lot of ctk vmdk files. The first of these were last modified yesterday at 13:30, most of them were modified today at 13:30 (13:30 is when the backup runs for this particular VM).

Next I created a new snapshot (successful) and then tried to delete all snapshots (also successful) - but it did not remove any of the orphaned snapshots in the vm folder.
I tried restarting the mgmt. services on the ESX host.
I have restarted the VM today - it restarts fine, windows is working ok on it, and I know it is definitely still ok as it is the DC and my network is still running ok!
I have opened a support call with my virtual backup vendors (Veeam) as I thought the issue might have been caused by a backup that did not complete correctly (veeam backup uses the VMware snapshots), but the veeam backups are running with no errors, they are creating a snapshot for the backup and then deleting it at the end of the job - the veeam backup for that server ran ok today at 13:30.

I have looked at the VMware.log for the vm I'm concerned about, I don't understand it fully - but I can't see any errors, or any mention of locked files.
From google I can only find one mention of locked files which sounds like mine: - and I have already tried all the fixes in this support doc.
All other mentions of vmare and locked files seem to be talking about vm's that don't turn on - in this case the vm is running and seems to be fine (I installed 4 windows updates this morning and restarted
before I realised it had a VMware error).

Does anyone have any ideas of how to fix this? I'm not sure what to try next....
 
I occasionally get this when my Commvault backups fail (for whatever reason) when snapping my VMs. I worked with support to determine whether the snapshots were actually being used or not. In my case they were not and we were able to use the command line to remove the snapshots. You can wait for VMWare or you can try it out on your own but follow this KB to determine if your snapshot is live:
If the files are not active, as mine were not, you are safe to delete the snapshot files. You can also follow this:
Whatever you use make sure you keep a log of what you did so next time you won't have to wait for support. Good luck!

Cheers
Rob

The answer is always "PEBKAC!
 
Hi ArizonaGeek

Thanks for the reply, sorry for the delay - I've been on other sites.
I'd already done everything from the 1st link, that 2nd link looks really good though - I'm gonna run thru that tomorrow.
I had a call open with Veeam support - they say it is not their snapshots - and I have to admit the veeam backups are running each night without a hitch.
Meanwhile this server is now running on snapshot 52!
Don't get much VMware support - apart from the forums - right now I'm wishing I did, but hopefully that adminsys link will do it.

Thanks again.
 
Hi Again

Just to say that adminsys site sorted me out.
First I shut all the vm's down and restarted the host - no joy.
Then I migrated the host and the datastore - still had a ton of snapshots (up to 56), so I shutdown the veeam server and tried consolidating again.... and it finally worked.
The new folder for that server now has no snapshots and the hard disk is now pointing to the original vmdk file :)

One thing I notice - I have a vmdk file (servername-flat.vmdk) the size of the server (30GB) plus a couple of other smaller vmdk files left on the original host.
Normally I would just leave them there for a day or 2 to make sure everything is ok, but since I need to migrate this server back to its original host I am going to rename these now and then migrate the server back. Fingers crossed!


 
*-flat.vmdk is the actual virtual disk file itself. It is not visible from the datastore browser of the vSphere Client. The file that you see when you browse a datastore and see your servername.vmdk is just metadata about the virtual disk such as sector information, size, alignment etc. It appears to be the size of the vmdk (40GB or whatever) but in essence .vmdk is just a small text file of information and the hidden -flat.vmdk is where your data actually is.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top