The parent virtual disk has been modified since the child was created
I googled and found a lot of people had this problem, but the solutions weren't very easy to decipher. It seemed like most people were getting a fix by adjusting the disk geometry written in the vmdk file to pre-expansion mode, or adjusting the CID's of vmdk files to match the new values.
The root of the problem, by the way, is that I expanded the disk while I had a snapshot available.
I looked at CID's first, because that's the easy fix. Unfortunately, my CID's matched.
Next up was C/H/S disk geometry. My old nemesis. I did not have a backup available, and not only that, I never have found a way to come up with magic C/H/S numbers. I delved a little further into my own system. I found two entries in log files that looked promising.
Within my vmware.log file, I saw the following:
vmx| DISKLIB-LINK : Attach: the capacity of each link is different (52428800 != 20971520)
Within my session log, I found:
Using log file /tmp/vmware-root/vdiskmanager.log
Grow: 100% done.
The old geometry C/H/S of the disk is: 16383/16/63
The new geometry C/H/S of the disk is: 16383/16/63
Oh joy, no change in the C/H/S.
So I went back and fgrep'ed for references to those two numbers - 52428800 and 20971520. I found reference in the snapshot file to my original disk size, but frankly I was a little wary of just making an edit in that file - it's binary and you never know how a change to a file like that will affect things.
Doing a little math - I realized that (52428800 / 2048)/1024 = 25 - the new size of my disk in GB. That really didn't get me anywhere, but it did put me on the right path. I took another look at my master vmdk file, and noticed the following:
RW 4193792 FLAT "Windows XP Professional-f001.vmdk" 0 RW 4193792 FLAT "Windows XP Professional-f002.vmdk" 0 RW 4193792 FLAT "Windows XP Professional-f003.vmdk" 0 RW 4193792 FLAT "Windows XP Professional-f004.vmdk" 0 RW 4193792 FLAT "Windows XP Professional-f005.vmdk" 0 RW 2560 FLAT "Windows XP Professional-f006.vmdk" 0 RW 4193792 FLAT "Windows XP Professional-f007.vmdk" 0 RW 4193792 FLAT "Windows XP Professional-f008.vmdk" 0 RW 4193792 FLAT "Windows XP Professional-f009.vmdk" 0 RW 4193792 FLAT "Windows XP Professional-f010.vmdk" 0 RW 4193792 FLAT "Windows XP Professional-f011.vmdk" 0 RW 4193792 FLAT "Windows XP Professional-f012.vmdk" 0 RW 4193792 FLAT "Windows XP Professional-f013.vmdk" 0 RW 2100736 FLAT "Windows XP Professional-f014.vmdk" 0
All those numbers add up to 52428800, and if I look at the numbers up to 2560, they add up to 20971520.
I made a quick edit, cut out the disks below 2560 and pasted them into a new file. Voila - I can go into "edit virtual machine settings" and see the original 10GB disk without any errors.
Now, rather than just boot up the machine and try cloning via vmware-converter, I decided to take it a step further. I used the GUI to remove the snapshot. This takes a while. Once the snapshot is removed, I copied the lines back into the vmdk file, then booted for the first time.
Worked like a charm. I can't believe nobody (at least that I could google) in 4 years figured that one out.
Quick review:
Don't expand a disk when there is a snapshot
If you have, like I did, using:
vmware-vdiskmanager -x 25GB ./something.vmdk
And you are running vmware server 1.x (ESX I know is different, 2.x, I have no idea)
- Cut out the extra disks in your vmdk to a new file. (probably the ones after the first small #
- Using the server console, remove the snapshot
- Wait until that is done...
- Copy back in the extra disks
- boot
If you didn't understand all of this, don't try it.
Increasing disk space in VMWare Feedback
