How to fix a VMWare disk of a broken machine that has snapshots

snapshotvirtualizationvmware-esxi

A guest on VMWare ESXi 4 is not booting anymore and I want to attach its disk to another machine. Both are almost identical ubuntu 64 bit server instances.

But the broken machine had snapshots, so vSphere client offers me to add from 2 vmdk files:

  • redmine-alt-clon.vmdk 4GB
  • redmine-alt-clon-000003.vmdk 257MB

This is a screenshot of the situation on the harddrive:

enter image description here

So is it fine to just add the first one that vSphere finds (redmine-alt-clon.vmdk) and I get the drive contents from yesterday?

(This would mean the other small file with -000003 and the delta file contains the old state or the difference makes the old state that I no longer need.)

Or if it is not that simple, what can I do to get yesterdays state of the drive without starting the vm or reverting the snapshot.

I would rather avoid reverting the snapshot from vSphere client because the broken vm is no longer available with all files.


EDIT: What I found out after some time is that more delta files like 00002-delta are missing (the parents, as there were more snapshots in the chain) and so it was not possible to fix the issue for me. But the different answers below should help in similar cases if all necessary snapshot files do still exist (and they should normally).

Best Answer

A snapshot is a delta of the hd from N until NOW, where N is when the snapshot was actively "taken." So, this looks like the -00003-delta contains the info that was changed since the beginning of the snapshot. My suggestion, make a back up. You can even copy these suckers down to a workstation and use VMWare or VirtualBox to mess around

What do you "bad news?" Just copy all those files down, and you'll have a full vmdk with a snapshot. The info files should contain information about the snapshots etc.