Link to home
Start Free TrialLog in
Avatar of giga797
giga797

asked on

Power On VM that is missing snapshots

Last night while working on one of my servers, I was cleaning out old files from my datastore and deleted the snapshot files from one of my VMs.  Can I power on that vm without the snapshots?
Avatar of Ogandos
Ogandos
Flag of Canada image

Uppsssss.

What is going to happen is that your machine will start at the point in time when the oldest snapshot was done. If unluckily it was many months ago you will have a VM returned to that point in time. It will work, but that will be the drawback.

If it is necessary to recover your VM to the last point in time try to recover your snapshot files somehow before starting your VM (from backup, undeleting it, etc.).

If you start the VM using the normal virtual disk, and it receives changes, then it will not be possible to attached it any longer to the previous snapshots.
Avatar of giga797
giga797

ASKER

Thanks for the quick response, yes its necessary but I think I might have messed it up more.  Since it was not powering on I created a new vm and reused the vmdk but the normal virtual disk and I saw that the date was from 2 years ago.  I still have the other vmdks that its asking for.  is there any way to browse through content of those and grab the files I need so I can rebuild or moved them to the vm that is powering on?
You can power it on, but you WILL HAVE lost data, and this could lead to OS corruption.

This you have observed.

The snapshots are a chain....

parent vmdk + snapshot1 = snapshot2 + snapshot3 = virtual disk....

which snapshots did you delete, the ones at the end, in the middle or at the beginning ?

it may be possible with some work "to stitch" this back together, BUT as for the results.....there could be data lost for ever and corruption.

Do you have a backup, this would be the best course of action.

Can you let me have a screenshot, of what you have to work with, and I can help you stitch it back together.
If your base virtual disk file was modified, all the old snapshot files become useless as far as they cannot attach with that (modified) file anymore. In such a case, you will need to recover the original virtual disk file from a backup and then attach it to your snapshots.

:(
ASKER CERTIFIED SOLUTION
Avatar of Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of giga797

ASKER

Good morning Andrew, i deleted the .vmsn files.  At this point anything is better than nothing at all.
okay, can you login at the console, or remotely via SSH ?

I've got some commands for you to run...
Avatar of giga797

ASKER

yes i can ssh
okay, so the command you need to run is

vmkfstools -i <most recent snapshot file name> /vmfs/volumes/<temp folder name>/<newfilename.vmdk>

Open in new window


this command will create a new virtual machine disk, with ALL the snapshots merged, this will then be used in your VM.
Avatar of giga797

ASKER

Hi andrew i gave that a try but i get this error message  DiskLib_Check() failed for source disk The system cannot find the file specified (25).
 this is what i typed vmkfstools -i VIEXCH.vie.local-000001.vmdk /vmfs/volumes/viex10/viex10.vmdk i also tried vmkfstools -i VIEXCH.vie.local-000001-delta.vmdk /vmfs/volumes/viex10/viex10.vmdk.  what am i doing wrong?
it's complaining about a missing file ? maybe a typo... let me check here
the last snapshot is VIEXCH.vie.local-000002.vmdk

you are also missing the datastore1

so I've completed the command for you which will re-create the virtual disk, e.g. clone it to a file called.VIEXCH.vmdk in the same folder.

Make sure the VM is Powered OFF!

This command also checks the snapshot chain is correct, if it's corrupted, missing files it will FAIL!

so the command should be

vmkfstools -i VIEXCH.vie.local-000002.vmdk  /vmfs/volumes/datastore1/VIEXCH.vie.local/VIEXCH.vmdk

Open in new window

Avatar of giga797

ASKER

same error
try this ?

vmkfstools -i VIEXCH.vie.local-000002.vmdk  VIEXCH.vmdk

and this will try and verify the snapshot files

Vmkfstools –t0 –v10 VIEXCH.vie.local-000002.vmdk

make sure the file name is correct

can you screenshot your disk settings, if you edit the VM ? (right click VM, edit settings, scroll down to disk, and screenshot)

I think also you may have broken the snapshot chain, by powering ON without the snapshots attached.

So you will also need to do some work, to repair the chain....
Avatar of giga797

ASKER

ok that gave me the same error but it was doing that because i was not in the directory once i CD into it i was able to but now get this error
Failed to open 'VIEXCH.vie.local-000002.vmdk': The parent virtual disk has been modified since the child was created. The content ID of the parent virtual disk does not match the corresponding parent content ID in the child (18).
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
do you require any more help to close out this question?