Hi All,
I am looking for a way to recover data on a delta.vmdk file I have. Basically what has happened in the past week is a VM got whipped out and I had to restore from some files I had manually backed up. I didn't have all snapshots or delta.vmdk files but I was able to restore the data on the -flat.vmdk file. I ended up missing about 20gigs of data but I have the delta.vmdk file (20GB) that I would like to recover data from. I also have the most recent snapshot file manually backed up before the disaster. From what I have read, there is a way to create a new VM, mount the delta.vmdk (20GB) as a new harddrive and then just manually copy the folders and files off. How can I accomplish this?
Thanks!!
Well it seems you are missing two snapshots in the chain. However I prepared the attached descriptor file for the snapshot because it is missing (at least you did not add it to the zip file).
Add the descriptor file to the VM's folder then create a clone of the disk
The command to clone the disk is like:
vmkfstools -i /vmfs/volumes/old_datastore/vmdir/vm-00003.vmdk /vmfs/volumes/new_datastore/recover/vm-clone.vmdk
BTW: Did you try different things with the VM already? The VM is referencing a "ps-delta.vmdk" as the HDD file?
André
From what I have read, there is a way to create a new VM, mount the delta.vmdk (~20GB) as a new harddrive and then just manually copy the folders and files off
Sorry, that doesn't work without the flat file correctly chained with the snapshot(s).
How many snapshots did you have on this VM?
Which files were you able to recover?
Maybe I can help you to chain the snapshot to the flat file, but for this I need some data. If you don't have all the snapshots, it may work to recover some of the files, however some may be corrupted.
Please provide the following:
- a list of all the files you were able to recover
- the vmx file
- the vmsd file
- all log files
- all vmdk files (only the small descriptor/header files, not the flat or delta files of course)
Please add the files to your next post (preferably in a zip file).
André
Hey Andre,
All the files I have available, expect the original -flat.vmdk (80GB) and the server-000003-delta.vmdk (~23GB) file have been attached.
I actually spoke with VMWare Support this morning. They said it should be possible if I could chain the -flat file to the -delta file I have. I would then have to clone both disks together, thus creating a new large .vmdk. I could then mount the new .vmdk onto a test server as a new hard drive and recover the data. Anything I can pull off that delta file would be incredible.
PS - The support guys also taught me how to use snapshots so no more 20GB+ in the future Sorry about the bad file names as well!
Thanks!
Also, I forgot to mention I have the last snapshot taken before the disaster. Snapshot15.vsm
Well it seems you are missing two snapshots in the chain. However I prepared the attached descriptor file for the snapshot because it is missing (at least you did not add it to the zip file).
Add the descriptor file to the VM's folder then create a clone of the disk
The command to clone the disk is like:
vmkfstools -i /vmfs/volumes/old_datastore/vmdir/vm-00003.vmdk /vmfs/volumes/new_datastore/recover/vm-clone.vmdk
BTW: Did you try different things with the VM already? The VM is referencing a "ps-delta.vmdk" as the HDD file?
André
Yes I had tried a few things. It was giving me a hard time with the blank space in the file name so I renamed it ps.vmdk.
I will give this a shot and let you know how it goes.
Thanks so much
I'm moving the original files I have backed up to the datastore. It will be a few hours but hopefully this does the trick.
Thanks
As for the spaces in the name you should be able to use '/vmfs/.../My virtual machine.vmdk' or /vmfs/.../My\ virtual\ machine.vmdk
The easiest way is to use the TAB auto completion when typing the command, this should quote the spaces automatically.
André
Andre, Thank you very much for the help. The fully worked. I was reading over the next steps in the KB but still am a little confussed.
d.Detach the disk from the virtual machine using the VI Client.
e.Attach the new disk, /vmfs/volumes/new_datastore/recover/vm-disk2.vmdk to the virtual machine.
f.Power up the virtual machine and ensure data integrity (Event Viewer, SQL, E-mail, etc).
4.Delete the base disk and only its snapshot disks:
# grep -A2 parentFile vm_1-000002.vmdk | grep -v "#"
I can know see the vm-clone-flat.vmdk and the vm-clone.vmdk in the new directory I created.
As per step d. - How do I go about detaching the disk from the VM?
Thanks again
The KB assumes that you have all snapshots available and use the cloned vmdk instead of the "old" virtual disk files after doing the job.
Therefore you would now edit the settings of your VM and point the virtual HDD to the new, cloned vmdk file.
However since you have snapshot files missing, I would attach the cloned disk to a test VM as a second disk. That way none of the files are modified during boot and you can copy he needed files off this virtual disk.
Once the files are saved, you can add the cloned vmdk to the original VM and try to boot from it.
André
Hey Andre,
I had the clone disked added to a test VM once, then I got a message about the datastore being full so I hit abort. IWhen I did so the VM powered down. I cleaned up a lot of space on the datastore. The vm-clone-flat.vmdk is still in tact on the datastore. Since then I have removed and re-added the cloned disk to this and one other server but it never shows up. From what I saw, the cloned disk had all the data. Any ideas?
Thanks,
Are you running Windows? If so, power down the test VM, attach the cloned disk to the vm as a second disk and power up the VM.
If it doesn't show up in the explorer, open the disk manager. Does it show up there? Maybe you have to assign a drive letter.
André
Yup, that did the trick! Im copying all the data off it to an external drive and will start restoring. Thanks again for the help, I appreciate it!
You are welcome.
If you are going to boot from the cloned vmdk after backing up the files, I'd recommend to run a chkdsk for this drive while it is attached to the test VM. Because of the 2 missing snapshots there could be logical errors in the file system.
André
Andre (Brazilian, Portuguese, Spanish,????)
What's the best way to break a VM so I can try this recover procedure??? (Just want to learn really)
Cheers,
-
Somewhat learning VMware --- If you found the post useful please award correct/helpful points.
RedBaron,
What had happend with me was that I had lost two of my snapshot files. I was left with my server-flat.vmdk, server.vmdk, server.vmx and just server-000003-delta.vmdk file. I was missing server-000001-delta.vmdk and server-000002-delta.vmdk file.
Hope that helps!
@ sdietz: Great. I will replicate this by taking snapshots and "losing" 2 of them. As I am still learning this will be useful for me. Glad that you have been able to recover your VM/data
-
Somewhat learning VMware --- If you found the post useful please award correct/helpful points.
What's the best way to break a VM so I can try this recover procedure??? (Just want to learn really)
The best way: Hire me for a couple of hours and you'll be glad seeing me leave the building
There's no real need to break any systems for learning. Just try understanding the concepts, read manuals, blogs, KB articles and community posts and most of all - if possible - try the different things in a test environment. VMware made it easy to setup a test environment even on VMware Workstation, so there's no need for expensive hardware.
Greetings from Germany
André
EDIT: You can find a good documentation on snapshots at http://geosub.es/vmutils/Troubleshooting.Virtual.Machine.snapshot.problems/Troubleshooting.Virtual.M...
@ sdietz were you able to resolve the issue with VM regarding missing snapshot files ?
f10
VCP3,VCP4,HP UX CSA
What's the best way to break a VM so I can try this recover procedure??? (Just want to learn really)
The best way: Hire me for a couple of hours and you'll be glad seeing me leave the building
There's no real need to break any systems for learning. Just try understanding the concepts, read manuals, blogs, KB articles and community posts and most of all - if possible - try the different things in a test environment. VMware made it easy to setup a test environment even on VMware Workstation, so there's no need for expensive hardware.
Greetings from Germany
André
Andre,
You are 100% right. I will setup a VM, take snapshots and delete them and see what I can do. That is why I invested on a HW lab. Running on Worsktation was okay but I wanted something more "real". I hope I can delevop my VMware skills further and find a proper job :smileycool:
Prost, Cheers
-
Somewhat learning VMware --- If you found the post useful please award correct/helpful points.