Link to home
Start Free TrialLog in
Avatar of John Achille
John AchilleFlag for United States of America

asked on

how do i fix a Snapshot that did not complete and now the vm shows up as unknown (invalid)

The vm is being hosted on a windows server 2003 which is running vmware server 2.0. Tried to create a snapshot which failed. The I removed the vm but didnt delete the files then re-added the vm to only get the following:

The selected virtual machine is not recognized on this system. The cause of this problem may be that the virtual machine's .vmx file is corrupted, or that the virtual machine version is newer than is recognized by the host. You can remove the virtual machine from the inventory if you believe that it is not recoverable.Click the link below to remove the virtual machine from the inventory.Remove Virtual MachineTo help diagnose the issue, you can check the virtual machine files at their last known location: "[server] server.vmx"

I have removed the lck & log files from the datastore and restarted the services to no avail. This is our finance server and I need to get it back up quick. please advise
Avatar of Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Flag of United Kingdom of Great Britain and Northern Ireland image

The issue that you have is by removing the Virtual Machine from the Inventory, has removed reference to the fact that the VM has a snapshot attached, when you added it back again to the inventory.

Can you screenshot the list of files that you have, and upload here.

some background on Snapshots, read my EE Article

HOW TO: VMware Snapshots :- Be Patient
Avatar of John Achille

ASKER

added the files back so you can see them all
error.bmp
was going to apply a patch to our finance application but it never completed then it failed. when I tried to restart the services i got the unknown (invalid). we were going to apply the patch then move it to our vcenter infrastructure. now Im stuck.
tried going to your: Part 3 : Troubleshooting VMware snapshots , but the link failed on me.
restarted the services and re-added the vm again and its trying but I see its already called it vm instead its name
the vm adding has remained at 0% for almost an hour
Okay, I've had a look a the screenshot is this a two disk VM?

if so you have snapshots attached to both virtual disks.
yes it is. how do i fix?
also i noticed that the snapshot is from the failed one yesterday
Okay, what you are going to have to do is create a new virtual disk, by merging the existing snapshots into the parent disk as follows

If you want to commit the data to the base disk you can use  vmware-vdiskmanager to convert the disk. Close the VMware Server  Console first.

To commit the changes to the disk we first have to convert the disk to  another disk format, the following command converts the disk (including  the snapshot) to a new monolithicFlat disk named newtest.vmdk.

vmware-vdiskmanager -r test-000001.vmdk -t 2 newtest.vmdk

so you would use the following commands on both your virtual disks

vmware-vdiskmanager -r Jamis-000002.vmdk -t 2 JamisNew.vmdk

vmware-vdiskmanager -r Jamis-0-000003.vmdk -t 2 JamisNew0.vmdk

the above commands will create new virtual disks, which you can then add to a virtual machine. BUT, you must ensure you have enough disk space to complete the above operation.
ok i dont have the vmware-vdiskmanager. VMware server 2.0 doesnt have it. or is that something I download? and are the commands you listed done in a specific directory?
it should be in the VMware Server Program Files folder?
On my install, it is located at C:\Program Files\VMware\VMware Server.
going to make a copy of the files first then commit. should I stop all vmwar services?
i get failed to convert disk: A file was not found (0x1900000004). Im guessing but since my vm are in a directory other than the default I have notate in the commands?
change to the directory containing the vmdk, and use full path reference to vdisk....
tried the following:

C:\Program Files (x86)\VMware\VMware Server>vmware-vdiskmanager -r d:\vm\jamis\J
amis-000002.vmdk -t 2 d:\vm\jamis\JamisNew.vmdk
Creating disk 'd:\vm\jamis\JamisNew.vmdk'
Failed to convert disk: The called function cannot be performed on partial chain
s. Please open the parent virtual disk (0x500003e83).
do you have a clear idea why the snapshot has failed?
you could try the following in the VMX

change the disk reference to

Example:

ide0:0.fileName = "Jamis-0.vmdk "


would become

ide0:0.fileName = "Jamis-0-000003.vmdk"

this is provided the snapshot chain is intact
i dont believe so. Ive included a snapshot
error2.JPG
it looks like none. when I compare the back files to files i just tried to shrink they seem the same
as instructed here are the commands Im trying to use:

C:\Program Files (x86)\VMware\VMware Server>vmware-vdiskmanager -r d:\vm\jamis\J
amis-000002.vmdk -t 2 d:\vm\jamis\JamisNew.vmd

should i not start with the jamis.vmdk?
ok maybe I shoudve just read what you wrote earlier. Sorry.
I have included the vmx unchanged in this posting. The question I have is that the ide 0 is set to: ide0:0.filename = "auto detect" & the scsi0:1filename = "Jamis-0-000003.vmdk". should set the scsi0:1filename to "auto detect" as I change the ide0:0 "auto detect" to Jamis-0-000003.vmdk?
when I am in the directory that has the vmdk i get:

D:\vm\Jamis>C:\Program Files (x86)\VMware\VMware Server>vmware-vdiskmanager -r D
:\vm\Jamis\Jamis-000002.vmdk -t 2 D:\vm\Jamis\JamisNew.vmdk
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
I'm just checking to see if you can convert any of the snapshots.

okay, you are using SCSI disks, so just check the disks names are correct, they should be pointing to the last snapshot filename

e.g. Jamis-0-000003.vmdk

you need to use quotes

"C:\Program Files (x86)\VMware\VMware Server\vmware-vdiskmanager" -r D
:\vm\Jamis\Jamis-000002.vmdk -t 2 D:\vm\Jamis\JamisNew.vmdk
Snapshot files are difficult to work with. If this does not work, you best course of action would be to esclate a call to VMware Support to see if they can assist, to rectify this issue quickly.
ok so the command works but I am getting the following:

D:\vm\Jamis>"C:\program Files (x86)\VMware\VMware Server\vmware-vdiskmanager" -r
 D:\vm\Jamis\Jamis-000002.vmdk -t 2 D:\vm\Jamis\JamisNew.vmdk
Creating disk 'D:\vm\Jamis\JamisNew.vmdk'
Failed to convert disk: The called function cannot be performed on partial chain
s. Please open the parent virtual disk (0x500003e83).
also I can see that Jamis-000002.vmdk has a new modify date of today and correct time stamp.
I did and I think their response we dont support vmware server 2.0 anymore. now Im scared
were trying data recovery by getdata now
other alternatives are to investigate Disaster Recovery specialists

Kroll Ontrack
http://www.krollontrack.com/
ASKER CERTIFIED SOLUTION
Avatar of Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
on the data to copy should I leave it to its default setting?
I am sure the time on will changebut it read everything fine is now Im waiting fo rthe 1 hour & 6 minutes for the convert...
okay, good because this will leave you with a new VM, with merged snapshots.
do you think the sql data and financial application will survive the convert intact? tried this once before with a diff version for a diff vm and it was not good. been reading your articles and how-to's and its more informative than what Ive been getting from sourcespring (education division from VMware). And in fact this is a horrible work experience were going thru but the learning experience is the best I could have asked for. Kinda of boot camp
if the VM is OFF, P2V, V2V, should be no issues, providing the data is not corrupt in the source.
very awesome. Start teaching bro.
ok so now the server is booting up in the remote console on the host and I am logged in & verified data. Were good. I guess the lesson here dont screw with VMware during the frickN snapshot even if it looks like its hanging @ 95%! My next question is going to be how to (next posting) mover everything my vcenter. thanx again.
what vmware couldnot  hanccocka could