VMware Cloud Community
Jnormon
Contributor
Contributor

ESXi 5.5 snapshot problem

Hi Guys,

This week we updated a customer from ESXi 4.0 to 5.5 + we added a new datastore (they needed extra space). I ofcourse began with taking a livebackup of the servers. At tuesday night, the following morning i then went onsite but could not perform the update because of problems with the host (purple screen after ESXi 5.5 load). To minimize downtime i scheduled a new apointment with the customer at night, not knowing that the DC server was then running on a snapshot due to the live backup and did so for the rest of the day. That night the update was successfull. And i started to copy the DC from old datastore to the new one. After which i removed the old DC server from the inventory and added a new one with the original .vmdk file instead of the snapshot vmdk.My problem is now that they contacted me the follow day at the end. That hey were missing their data from the date on which te server was running on the snapshot. My question is the following: if i commit the snapshot from that day, will they lose their data that has been added afterwards?

Regards Joren,

0 Kudos
11 Replies
f10
Expert
Expert

"After which i removed the old DC server from the inventory and added a new one with the original .vmdk file instead of the snapshot vmdk."

Your above statement indicates that you did not use the delta.vmdk and used the base vmdk hence the data in the delta.vmdk is not available and customer is reporting missing data.

"if i commit the snapshot from that day, will they lose their data that has been added afterwards?"

Once you take a snapshot all writes are written on the snapshot disk however once you commit the snapshot all the data on the snapshot disk is written back to the base disk. Once the snapshot consolidation is complete all new data is written back to the base disk. In your case once you have powered on a VM (which has an active snapshot) using its base disk the VM will not report any new data on the snapshot. If no new writes have been written to this VM, you can power off the VM and change the VM.vmx file to point it to the new snapshot disk and also edit the CID/PID of the delta.vmdk accordingly.

My suggestion is that if new writes have been written to the power on VM then the best option would be to restore data from backup, let me know if you need more assistance on this.

-f10

Regards, Arun Pandey VCP 3,4,5 | VCAP-DCA | NCDA | HPUX-CSA | http://highoncloud.blogspot.in/ If you found this or other information useful, please consider awarding points for "Correct" or "Helpful".
0 Kudos
Jnormon
Contributor
Contributor

Hi,

Thanks for the quick reply! unfortunately for that day we do not have a backup. I was thinking the following: if i take a backup of the machine's folder on the datastore, containing all the necessary data. Could i create a new virtual machine in our test environment  pointing to the snapshot and also the vmx file containing the correct data for the snapshot, would i be able to start up the server in the state is was on the moment i turned it of to move it from datastore? So that i can extract the data from it that way?

Regards Joren

0 Kudos
f10
Expert
Expert

Yes, if you can get access to the VM files before copying only the base vmdk and if you also have the snapshot disk i.e. delta.vmdk then you can try to power on the VM:

Create a VM folder in the datastore and copy all the files i.e. vmx, vmdk, flat.vmdk, 00000.vmdk, delta.vmdk etc.

Now edit the VMX file so that the scsi0:0 point to the snapshot00000.vmdk. A good explanation about this is provided here VMware KB: Recreating a missing virtual disk (VMDK) descriptor file for delta disks

Edit the snapshot00000.vmdk so that the CID/PID & parent file matches with the base disk.

Now try to power on the VM

The result should be the VM with its base disk + snapshot

All  the best !!

Regards, Arun Pandey VCP 3,4,5 | VCAP-DCA | NCDA | HPUX-CSA | http://highoncloud.blogspot.in/ If you found this or other information useful, please consider awarding points for "Correct" or "Helpful".
0 Kudos
Jayden56
Enthusiast
Enthusiast

Hi

Welcome to the communities.

When you will commmit the snapsshot it will merger with previsou vhd and always recomended if doing any upgrade merge or delete all snapshot.

Take care!

0 Kudos
a_p_
Leadership
Leadership

From what you explained, I assume this is the only DC they have!? Otherwise reverting to a snapshot (unless it's Windows Server 2012 R2) would have most likely destroyed the AD.

Anyway, what I would do in this case is to copy all the .vmdk files to a PC/Laptop with VMware Workstation installed and fix the snapshot chain by setting the parentCID in the snapshot's .vmdk descriptor file to the value of the parents CID entry. Once the snapshot chain is fixed, mount the virtual disk to your host system using VMware Workstation's disk mount option and extract/copy the required files. Due to the changes already made in the base disk, you may end up with some file corruption though.

André

0 Kudos
Jnormon
Contributor
Contributor

Hi all,

Yes André its the only DC. Just my luck that it had to happen to the machine where they keep all their data. if it had happened on the terminal server it wouldn't been such a problem. Tonight at 5 i can take a backup of the complete DC folder on the datastore. Afterwards i'm gonna try to boot it with the snapshot on our test environment. I will let you know how it went.

Joren

0 Kudos
a_p_
Leadership
Leadership

Personally I would not try to boot the VM to avoid additional corruption due to overwrites, but rather use the mount option. If you want to do this anyway, I'd suggest you take another snapshot before powering on the VM. Also ensure you reload the VM after editing the ,vmx file (VMware KB: Reloading a vmx file without removing the virtual machine from inventory )

Good Luck.

André

0 Kudos
Jnormon
Contributor
Contributor

Hi Guys,

Sorry for the late reply. I managed to take a backup of the complete VM folder and copy it to our test environment. I then created a new vm and let it use the Original vmx file.

I also corrected the parent CID in the snapshot vmdk file. When i boot the machine, i get an error stating that it cannot found the xxxx-xxxxxx.vmdk file. So it is searching for it, but can't find it.

the snapshot is indeed present in the folder.

0 Kudos
a_p_
Leadership
Leadership

Please provide a complete list of files (e.g. ls -lisa from the command line) in the VM's folder, the vmware.log file as well as the small .vmdk descriptor files.

André

0 Kudos
Jnormon
Contributor
Contributor

Hi André,

If you go to the link below, you will be presented with a download containing all the information you asked for.

http://www.genius.be/public/snapshot-problem.rar

Best Regards,

Joren

0 Kudos
a_p_
Leadership
Leadership

The issue seems to be with the size of the virtual disk. It looks like you resized the VM's disk, and it's not possible to rr-chain the snapshot with the different size!? In your initial post, you mentioned that you removed the VM from the inventory (i.e. hopefully not deleted from disk!?). Do you still have the original virtual disks from the old datastore?

André

0 Kudos