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?
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.
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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...
I've got some commands for you to run...
ASKER
yes i can ssh
okay, so the command you need to run is
this command will create a new virtual machine disk, with ALL the snapshots merged, this will then be used in your VM.
vmkfstools -i <most recent snapshot file name> /vmfs/volumes/<temp folder name>/<newfilename.vmdk>
this command will create a new virtual machine disk, with ALL the snapshots merged, this will then be used in your VM.
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.vm dk /vmfs/volumes/viex10/viex1 0.vmdk i also tried vmkfstools -i VIEXCH.vie.local-000001-de lta.vmdk /vmfs/volumes/viex10/viex1 0.vmdk. what am i doing wrong?
this is what i typed vmkfstools -i VIEXCH.vie.local-000001.vm
it's complaining about a missing file ? maybe a typo... let me check here
the last snapshot is VIEXCH.vie.local-000002.vm dk
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
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
ASKER
same error
try this ?
vmkfstools -i VIEXCH.vie.local-000002.vm dk VIEXCH.vmdk
and this will try and verify the snapshot files
Vmkfstools –t0 –v10 VIEXCH.vie.local-000002.vm dk
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....
vmkfstools -i VIEXCH.vie.local-000002.vm
and this will try and verify the snapshot files
Vmkfstools –t0 –v10 VIEXCH.vie.local-000002.vm
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....
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.v mdk': 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).
Failed to open 'VIEXCH.vie.local-000002.v
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
do you require any more help to close out this question?
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.