VMware Cloud Community
accutalk
Contributor
Contributor

The parent virtual disk has been modified since the child was created...

I really screwed myself here. I was at a good point on a VM and decided to "Delete All" in the snapshot manager. Now I can't turn on the VM... I get the error "... The parent virtual disk has been modified since the child was created." I was under the impression that if you deleted all of the snapshots it would bring leave you where you are but that would be your new "base" and you couldn't go back to any snapshots... is that true?

I looked around on the forums and ran into a place that said I should point the .vmx file to the .vmdk file that doesn't have -00000X.vmdk. I tried that and it boots fine but ALL of my changes are GONE! I am going to be up a creek if I can't figure this out.

Here's a list of the directory:

# ls -l

total 157328256

-rw------- 1 root root 309248 Jan 7 16:42 NIX-BOX-000001-delta.vmdk

-rw------- 1 root root 233 Jan 7 16:42 NIX-BOX-000001.vmdk

-rw------- 1 root root 17086464 Jan 7 16:42 NIX-BOX-000007-delta.vmdk

-rw------- 1 root root 226 Jan 7 16:42 NIX-BOX-000007.vmdk

-rw------- 1 root root 161061273600 Jan 7 17:18 NIX-BOX-flat.vmdk

-rw------- 1 root root 8684 Jan 7 17:18 NIX-BOX.nvram

-rw------- 1 root root 18436 Jan 7 16:42 NIX-BOX-Snapshot8.vmsn

-rw------- 1 root root 400 Jan 7 17:17 NIX-BOX.vmdk

-rw------- 1 root root 2453 Jan 7 16:42 NIX-BOX.vmsd

-rwxr-xr-x 1 root root 1435 Jan 7 17:26 NIX-BOX.vmx

-rw------- 1 root root 263 Dec 8 15:08 NIX-BOX.vmxf

-rw-rr 1 root root 22615 Jan 7 17:23 vmware-10.log

-rw-rr 1 root root 28555 Nov 30 19:09 vmware-5.log

-rw-rr 1 root root 29480 Dec 1 23:12 vmware-6.log

-rw-rr 1 root root 75875 Jan 7 16:42 vmware-7.log

-rw-rr 1 root root 22614 Jan 7 16:56 vmware-8.log

-rw-rr 1 root root 24765 Jan 7 17:18 vmware-9.log

-rw-rr 1 root root 21693 Jan 7 17:27 vmware.log

#

Please help... I'm freaking out about this.

0 Kudos
6 Replies
kjb007
Immortal
Immortal

Everytime your vm boots, it updates what is called the CID chain. The CID chain contain the links that tell the snapshots which files are its parents, so you can keep track of the parent/child relationship.

Since you pointed back to the original vmdk, the CID chain no longer matches.

The steps here need to be followed carefully or you can damage your config even more. If you are not comfortable with this, I would strongly suggest opening an SR with vmware so they can walk you through every step.

Here goes:

First thing to do is to make sure the vm is shutdown. If you don't make changes, then you should be able to recover your data.

Next would be to read your vmsd file and see the snapshot structure. Hopefully, all of your existing delta files are in order and you're not missing any delta files.

Each of the vmdk files that don't have delta in their names are descriptors and they are text files. Make a backup copy of each, just in case something goes wrong. Inside of them, they will have fields that tell you that disk's CID, and its parentCID. You basically need to figure out which snapshot was first, and which is last by mapping the CID/parentCID's of each of the snapshots.

When you find out which snapshot is 1st, you will need to take the parentCID that you see in that snapshot's descriptor, and then edit the CID field in the file NIX-BOX.vmdk

That should restore your CID chain, so that starting from the base NIX-BOX.vmdk, you can track the CID/parentCID chain through all of your snapshots.

-KjB

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB
0 Kudos
accutalk
Contributor
Contributor

My snapshots were linear. With seeing my file structure do you think I can recreate the vmsd file? Here is my current one:

snapshot.lastUID = "8"

snapshot.numSnapshots = "1"

snapshot.current = "8"

snapshot0.uid = "8"

snapshot0.filename = "NIX-BOX-Snapshot8.vmsn"

snapshot0.displayName = "Consolidate Helper- 1"

snapshot0.description = "Helper snapshot for online consolidate."

snapshot0.createTimeHigh = "286700"

snapshot0.createTimeLow = "1043709584"

snapshot0.numDisks = "1"

snapshot0.disk0.fileName = "NIX-BOX-000007.vmdk"

snapshot0.disk0.node = "scsi0:0"

snapshot1.uid = "6"

snapshot1.filename = "NIX-BOX-Snapshot6.vmsn"

snapshot1.parent = "1"

snapshot1.displayName = "before apache upgrade"

snapshot1.description = "Trying to get the site to play nice"

snapshot1.createTimeHigh = "285961"

snapshot1.createTimeLow = "1718754689"

snapshot1.numDisks = "1"

snapshot1.disk0.fileName = "NIX-BOX-000005.vmdk"

snapshot1.disk0.node = "scsi0:0"

snapshot2.uid = "6"

snapshot2.filename = "NIX-BOX-Snapshot6.vmsn"

snapshot2.parent = "5"

snapshot2.displayName = "before apache upgrade"

snapshot2.description = "Trying to get the site to play nice"

snapshot2.createTimeHigh = "285961"

snapshot2.createTimeLow = "1718754689"

snapshot2.numDisks = "1"

snapshot2.disk0.fileName = "NIX-BOX-000005.vmdk"

snapshot2.disk0.node = "scsi0:0"

snapshot3.uid = "6"

snapshot3.filename = "NIX-BOX-Snapshot6.vmsn"

snapshot3.parent = "5"

snapshot3.displayName = "before apache upgrade"

snapshot3.description = "Trying to get the site to play nice"

snapshot3.createTimeHigh = "285961"

snapshot3.createTimeLow = "1718754689"

snapshot3.numDisks = "1"

snapshot3.disk0.fileName = "NIX-BOX-000005.vmdk"

snapshot3.disk0.node = "scsi0:0"

snapshot4.uid = "6"

snapshot4.filename = "NIX-BOX-Snapshot6.vmsn"

snapshot4.parent = "5"

snapshot4.displayName = "before apache upgrade"

snapshot4.description = "Trying to get the site to play nice"

snapshot4.createTimeHigh = "285961"

snapshot4.createTimeLow = "1718754689"

snapshot4.numDisks = "1"

snapshot4.disk0.fileName = "NIX-BOX-000005.vmdk"

snapshot4.disk0.node = "scsi0:0"

snapshot5.uid = "6"

snapshot5.filename = "NIX-BOX-Snapshot6.vmsn"

snapshot5.parent = "5"

snapshot5.displayName = "before apache upgrade"

snapshot5.description = "Trying to get the site to play nice"

snapshot5.createTimeHigh = "285961"

snapshot5.createTimeLow = "1718754689"

snapshot5.numDisks = "1"

snapshot5.disk0.fileName = "NIX-BOX-000005.vmdk"

snapshot5.disk0.node = "scsi0:0"

snapshot.needConsolidate = "TRUE"

I am going to open a case first thing tomorrow because I only have 8-5 support. I'd just like to sleep better tonight. How did this happen anyways? Did I use the "delete all" functionality correctly?

0 Kudos
kjb007
Immortal
Immortal

Delete all should not have caused this type of issue, if your snapshots finished committ'ing. Did you wait long enough for that to happen? With large delta files, this could take hours.

Don't mess with the vmsd file, it is fine. You need to restore the chain, and you can use the vmsd file to point you in the right direction, as well as use the hints within the vmdk descriptor files. The problem that you're in right now is that your vm is pretty much back to the point of your first snapshot, which is why all your changes are gone.

Again, as long as you didn't try to do any work when you booted with the original disk, you should be able to get your data back whole.

-KjB

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB
0 Kudos
Texiwill
Leadership
Leadership

Hello,

Moved to Virtual Machine and Guest OS forum.


Best regards,

Edward L. Haletky

VMware Communities User Moderator

====

Author of the book 'VMWare ESX Server in the Enterprise: Planning and Securing Virtualization Servers', Copyright 2008 Pearson Education.

Blue Gears and SearchVMware Pro Blogs: http://www.astroarch.com/wiki/index.php/Blog_Roll

Top Virtualization Security Links: http://www.astroarch.com/wiki/index.php/Top_Virtualization_Security_Links

--
Edward L. Haletky
vExpert XIV: 2009-2023,
VMTN Community Moderator
vSphere Upgrade Saga: https://www.astroarch.com/blogs
GitHub Repo: https://github.com/Texiwill
0 Kudos
accutalk
Contributor
Contributor

Well... I just got off the phone with the support team. He changed some CIDs around in the vmdk's and booted the VM. The data was inconsistent and is lost after a fsck. What a worthless "feature". I just lost a 150G VM.

0 Kudos
Texiwill
Leadership
Leadership

Hello,

THis is to be expected actually.... I had a similar issue and fixed the CIDs, then deleted the snapshots... lost about 15MBs of data, but at least I was able to boot the VM and restore from backup.

Snapshots have their uses, but when you do use them, you need to manage them properly. specifically you should not really be running an VMs with snapshots for very long. I use them only for doing backups and that is it. Long term snapshots should not exist on my systems.....

I would consider running snaphunter (vmprofessional.com)/snapalert (xtravirt.com) periodically to find snapshots and commit them.


Best regards,

Edward L. Haletky

VMware Communities User Moderator

====

Author of the book 'VMWare ESX Server in the Enterprise: Planning and Securing Virtualization Servers', Copyright 2008 Pearson Education.

Blue Gears and SearchVMware Pro Blogs: http://www.astroarch.com/wiki/index.php/Blog_Roll

Top Virtualization Security Links: http://www.astroarch.com/wiki/index.php/Top_Virtualization_Security_Links

--
Edward L. Haletky
vExpert XIV: 2009-2023,
VMTN Community Moderator
vSphere Upgrade Saga: https://www.astroarch.com/blogs
GitHub Repo: https://github.com/Texiwill
0 Kudos