?
Solved

Can't boot VMWare virtual mchine after resizing disk

Posted on 2011-10-06
25
Medium Priority
?
634 Views
Last Modified: 2012-06-21
Using the instructions provided by VMWare, I increased the size of one of my virtual machines from 100Gb to 120Gb using the command line (Running VMWare server on a Windows 2003 Server host).  I have 4 other VM's running on this server, and I only increased the size on one of them.  The "Growth" ran successfully, but when I go to start the VM now, I get the following error:

Cannot open <myfilename>-00005.vdmk or one of the snapshot disks it depends on. Reason: The parent virtual disk has been modified since the child was created.

So, it looks like it's trying to open the latest snapshot and is having issues.  I thought I removed all the snapshots before running the resize command, but maybe not.  What can I do to fix the issue?
0
Comment
Question by:tenover
  • 12
  • 8
  • 5
25 Comments
 
LVL 24

Expert Comment

by:Luciano Patrão
ID: 36925543
Hi

How did you increase the size?? Editing the settings and just change the Gb value??

If you have snapshots(and you have) you cannot change that.

Jail
0
 

Author Comment

by:tenover
ID: 36925573
I used these instructions:

To increase the virtual disk from the command line:

    Open a command prompt. For more information, see Opening a command or shell prompt (1003892).
    Navigate to the product's installation directory. For more information, see Locating a VMware product's installation directory (1003897).
    Type vmware-vdiskmanager -x 100Gb vm.vmdk and press Enter.

    Note: Replace 100Gb with the actual size of virtual disk that you want. You can also specify Kb and Mb.
     
    Follow the steps in Increasing the size of a disk partition (1004071) so the guest operating system is aware of the change in disk size.

I just need to know what I have to do to be able to get this machine up and running again, either with the old or new disk size.
0
 
LVL 24

Expert Comment

by:Luciano Patrão
ID: 36925581
Hi

I think now you need to change the CID to go backup and run the normal vmdk.

Check here how:

http://kb.vmware.com/kb/1007969

Also if not, you need to recreate the descriptor file for disk.

Check here:

http://kb.vmware.com/kb/1004232

Changing the CID I have done this a couple of times, but never need to recreate the file.

Jail
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 125

Accepted Solution

by:
Andrew Hancock (VMware vExpert / EE MVE^2) earned 1336 total points
ID: 36925584
You did not start this Virtual Disk on another machine, that was not aware it had a snapshot?

Here is your fix:- (or restore from backup before you changed the size!)

http://kb.vmware.com/kb/1007969

http://edgylogic.com/driveactivated/recovering-vmware-snapshot-after-parent-changed/

0
 

Author Comment

by:tenover
ID: 36925669
It appears that there are 4-5 snapshots...Can I somehow boot from a snapshot that was taken before I increased the size of the .vdmk?
0
 
LVL 125

Assisted Solution

by:Andrew Hancock (VMware vExpert / EE MVE^2)
Andrew Hancock (VMware vExpert / EE MVE^2) earned 1336 total points
ID: 36925684
No, you need to repair the VMDK as instructed above, or you risk losing all the data, since the snapshot was Taken.

A snapshot is NOT a backup of a VM; that is a gross misconception.  

A snap shot is a way to preserve a point in time when the VM was running OK before making changes. A snapshot is NOT a way to get a static copy of a VM before making changes.  When you take a snapshot of a VM what happens is that a delta file gets created and the original VMDK file gets converted to a Read-Only file.  There is an active link between the original VMDK file and the new delta file.  Anything that gets written to the VM actually gets written to the delta file.   The correct way to use a snapshot is when you want to make some change to a VM like adding a new app or a patch; something that might damage the guest OS. After you apply the patch or make the change and it’s stable, you should really go into snapshot manager and delete the snapshot which will commit the changes to the original VM, delete the snap, and make the VMDK file RW. The official stance is that you really shouldn’t have more than one snap at a time and that you should not leave them out there for long periods of time. Adding more snaps and leaving them there a long time degrades the performance of the VM.  If the patch or whatever goes badly or for some reason you need to get back to the original unmodified VM, that’s possible as well.  

I highly recommend reading these 2 articles on snaps:

Understanding Snapshots - http://kb.vmware.com/kb/1015180
Snaphot Best Practices - http://kb.vmware.com/kb/1025279

Also check out the following Snapshot Articles by Eric Siebert

Pt.1- http://is.gd/Lajg4p
Pt.2- http://is.gd/NdKQWC
Pt.3- http://is.gd/tp2vEK
0
 

Author Comment

by:tenover
ID: 36925758
Understood.  And I did make a fresh backup of the entire folder that houses this virtual machine before I increased the disk size.  Maybe that would be the easiest way to get the machine back up and running.....Just restore the .vdmk file that I increased the size on?
0
 
LVL 24

Assisted Solution

by:Luciano Patrão
Luciano Patrão earned 664 total points
ID: 36925861
Hi

If you have a backup, yes is easier and you should restore all the files.

Then delete the snapshots, and do the resizing again.

Jail
0
 
LVL 125
ID: 36925871
Yes, much easier.
0
 

Author Comment

by:tenover
ID: 36925904
One more thing.....Can I manually(SAFELY) delete all snapshots be just deleting any and all files with .0000x appended to them?
0
 
LVL 24

Expert Comment

by:Luciano Patrão
ID: 36926002
Hi

You should delete the files using the vSphere Client.

Jail
0
 

Author Comment

by:tenover
ID: 36926011
This is on a VMWare Server (not ESX, ESXi, etc...).
0
 
LVL 24

Expert Comment

by:Luciano Patrão
ID: 36926043
Hi

Upss sorry :)

I think is menu, VM, then Snapshot, inside you have snapshot manager. Inside you can delete all snapshots.

Jail
0
 

Author Comment

by:tenover
ID: 36931699
Well, this is just great. When trying to restore the files from backup, I'm running into errors. Plan B should be to try and change the CID I suppose?
0
 
LVL 125
ID: 36931744
Yes, fix the CID.
0
 

Author Comment

by:tenover
ID: 36931752
Thanks.  All the links you posted looks like they are for Linux/Vi.  I am running VMWare Server on a Windows 2003 machine.  Any idea how to change the CID from within Windows?
0
 
LVL 24

Expert Comment

by:Luciano Patrão
ID: 36931987
Hi

Is the same.

In your files you just edit the vmdk file and change the CID.

If is Linux you can use a WinSCP to edit the files, if is in Windows you can use a normal notepad to edit(I use Notepad++)

Jail
0
 
LVL 125
ID: 36932000
Edit files with Wordpad!
0
 

Author Comment

by:tenover
ID: 36932002
I'm not following you.  I can see the files in Windows Explorer.  If I right click and "Open With">Notepad, it is just a bunch of gibberish.  
0
 

Author Comment

by:tenover
ID: 36932005
There we go, WordPad allows me to see the CID.  Sure hope this works.  
0
 
LVL 24

Expert Comment

by:Luciano Patrão
ID: 36932030
Hi

Ahh ok, since I used my Nopead++ I tough that notepad basic will also see the CID.

But yes, when notepad doesn't work, WordPad works.

Jail
0
 

Author Comment

by:tenover
ID: 36932061
So I have the following files:
<name>.vdmk
<name>-000001.vdmk
<name>-000002.vdmk
<name>-000003.vdmk
<name>-000004.vdmk
<name>-000006.vdmk

Do I need to modify each one of these files or just the one (<name>-000006.vdmk) that throws out the error when trying to boot?

Sorry, this is just REALLY confusing.
0
 

Author Comment

by:tenover
ID: 36932107
Two of the .vdmk files appear to be too large to open in WordPad.....If I only need to change the latest .vdmk file, I can do that.  This file has the same CID and Parent CID.
0
 

Author Comment

by:tenover
ID: 36932194
I guess my question is now:

Can I change the parent CID of <filename>-000006.vdmk to match the CID of the base image(<filename>.vdmk)?
0
 
LVL 24

Expert Comment

by:Luciano Patrão
ID: 36933947
Hi

You need to change all CID that is not correct. Parent CID from file 002 must be equal to CID 003. Parent CID from 001 must equal to CID from 002(not parent the CID only).

You need to double check all files and see if parent and CID are correct.

Jail
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will show you how to create an ISO CD-ROM/DVD-ROM image (*.iso), and MD5 checksum signature, for use with VMware vSphere Hypervisor 6.5 (ESXi 6.5). It's a good idea to compare checksums, because many installations fail because of a corr…
If you need to complete a Physical to Virtual (P2V), Virtual to Virtual (V2V) conversion to a VMware product (VMware Workstation, Player or VMware vSphere (ESXi) ) for FREE, then there is some good news...
Teach the user how to configure vSphere Replication and how to protect and recover VMs Open vSphere Web Client: Verify vsphere Replication is enabled: Enable vSphere Replication for a virtual machine: Verify replicated VM is created: Recover replica…
Teach the user how to install log collectors and how to configure ESXi 5.5 for remote logging Open console session and mount vCenter Server installer: Install vSphere Core Dump Collector: Install vSphere Syslog Collector: Open vSphere Client: Config…
Suggested Courses

612 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question