• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 40
  • Last Modified:

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?
0
giga797
Asked:
giga797
  • 9
  • 7
  • 2
2 Solutions
 
Schnell SolutionsSystems Infrastructure EngineerCommented:
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.
1
 
giga797Author Commented:
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?
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
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.
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
Schnell SolutionsSystems Infrastructure EngineerCommented:
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.

:(
0
 
giga797Author Commented:
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
so I can see you have two snapshots left 00001 and 00002, what files did you delete?

did you delete 0003 and 0004, we can try and merge what you have left, but the results may not what you desire and it depends how long the VM has been running on a snapshot.

I think a read of my EE Article could help

HOW TO: VMware Snapshots :- Be Patient
0
 
giga797Author Commented:
Good morning Andrew, i deleted the .vmsn files.  At this point anything is better than nothing at all.
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
okay, can you login at the console, or remotely via SSH ?

I've got some commands for you to run...
0
 
giga797Author Commented:
yes i can ssh
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
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.
0
 
giga797Author Commented:
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?
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
it's complaining about a missing file ? maybe a typo... let me check here
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
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

0
 
giga797Author Commented:
same error
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
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....
0
 
giga797Author Commented:
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).
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
okay, this confirms, you started the VM without it's snapshots.

and now you are going to have to repair the CID on them all.

see here

Resolving the CID mismatch error: The parent virtual disk has been modified since the child was created (1007969)

and when you've repaired the chain, and cids, then re-run those commands

then you will have a new virtual disk, add that to your VM, and power ON, but I warn you there could be corruption!
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
do you require any more help to close out this question?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

  • 9
  • 7
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now