Telephone: (480) 722-1227 Toll Free: (888) 722-1227
  Email - Contact
  Register Login   |   Knowledge Base  >  Knowledge Base Systems  >  Virtualization  >  snapshot problem   |   Saturday, July 31, 2010 search:    
snapshot problem
Last Post 11 Aug 2008 08:47 AM by Vigilant CIO. 1 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Chris MuenchUser is Offline
New Member
New Member
Posts:57

--
29 Jan 2008 01:50 PM  

We had a client who had a snapshot on one of their virtual machines.  The snapshot grew and grew and finally the datastore it was on ran out of space.  The end result of this was that the virtual machine wouldn't bootup as the log file didn't have neough space to grow. 

 

To resolve this problem I did the following. 

First I cd into the directory where the troubled virtual machine is

cd /vmfs/volumes/guest-os2/vm

cp vm.vmdk vm.vmdk.bak

cp vm.vmdk remotedatastore/folder/vm.vmdk

Now you made a back of this file.  Now do a cat on this file. You will see how it points to a file called vm-flat.vmdk.  Now what I did to free up space was copy this flat file to another datastore then change the links in order for the machine to boot.  That is what I'm going to describe here.

Also you must use the full path for the vmfs store and not the symlink shorthand.  To find this cd into your remote datastore and then do a pwd.

That will give you the full length name of the folder.I would also recomend making a folder inside the datastore so that you can organize your files.  It will take quite a long time to copy over this flat file if its any amount of size.

Next copy over the file named vm.vmsd

cp vm.vmsd /remotedatastore/folder/vm.vmsd

This is a snapshot file that hold config settings.  Open it in nano and edit the snapshot0.disk0.filename = "fullfilepathtovm.vmdk"(this is the remote datastore one)

Also edit snapshot1.disk0.filename = "filledupdatastore/vm-0000001.vmdk"

Then hit control -X then Y to save it.  Next we need to update the vm.vmdk that is the old datastore directory.  Their is a line in their called extent descrip0tion.  You need to change this to the full path of the remote volume.  Then hit control -X then y to save and you should be good to go. 

 

Don't act liek superman if you don't know what you are doing.  Call or email me cmuench@gmail.com or ask vmware.  Very very easy to screw something up.  Make backups of these files before you edit them.  This is probably not a support solution.  The recomend fix for this is to install convertor on the box and reimage the box.  I would NOT recomend deleting the snapshots.  If the drive only has a little bit of space lef tyou will be in trouble if it goes and tyries to consolidate the snapshots.

Vigilant CIOUser is Offline
Basic Member
Basic Member
Posts:353

--
11 Aug 2008 08:47 AM  

We have written a whitepaper on using snapshots in the virtual enviroment.... virtual

In short, snapshots should only be used during software upgrades and have a lifespan of 2-5 days. Anything beyond this will cause perfromance issues and stability issues. If you have old snapshots, the best way out is to clone the mahcine (using the vmware importer, Virtual Center or equvalent solution. (note; This is best done with the machine powered off using the converter)

You are not authorized to post a reply.

Active Forums 4.2
Copyright 2006 - 2010 Vigilant Support   |  Privacy Statement  |  Terms Of Use