chewbakkwa
Contributor
Contributor

Desperately need help restoring my VM

Jump to solution

My VM went bonkers after my Windows 10 host was shutdown without shutting down VM Workstation

Whether I power on or try to revert to a snapshot, I get the follow error in my vmware.log attached

 

2021-02-25T22:14:56.381+08:00| vmx| I005: DISK: OPEN scsi0:0 'D:\VM\Kali Linux for OSCP\Kali-Linux-2020.4-vmware-amd64-000006.vmdk' persistent R[]
2021-02-25T22:14:56.391+08:00| vmx| I005: DISKLIB-SPARSE: "D:\VM\Kali Linux for OSCP\Kali-Linux-2020.4-vmware-amd64-000006-s001.vmdk" : failed to open (14): Disk needs repair.
2021-02-25T22:14:56.391+08:00| vmx| I005: DISKLIB-LINK : "D:\VM\Kali Linux for OSCP\Kali-Linux-2020.4-vmware-amd64-000006.vmdk" : failed to open (The specified virtual disk needs repair).
2021-02-25T22:14:56.391+08:00| vmx| I005: DISKLIB-CHAIN : "D:\VM\Kali Linux for OSCP\Kali-Linux-2020.4-vmware-amd64-000006.vmdk" : failed to open (The specified virtual disk needs repair).
2021-02-25T22:14:56.391+08:00| vmx| I005: DISKLIB-LIB : Failed to open 'D:\VM\Kali Linux for OSCP\Kali-Linux-2020.4-vmware-amd64-000006.vmdk' with flags 0xa The specified virtual disk needs repair (14).
2021-02-25T22:14:56.394+08:00| vmx| I005: AIOWIN32C: Failed to open 'D:\VM\Kali Linux for OSCP\Kali-Linux-2020.4-vmware-amd64-000006-s014.vmdk' : Could not find the file (393219).
2021-02-25T22:14:56.394+08:00| vmx| I005: OBJLIB-FILEBE : FileBEOpen: can't open 'D:\VM\Kali Linux for OSCP\Kali-Linux-2020.4-vmware-amd64-000006-s014.vmdk' : Could not find the file (393218).
2021-02-25T22:14:56.394+08:00| vmx| I005: DISKLIB-SPARSE: "D:\VM\Kali Linux for OSCP\Kali-Linux-2020.4-vmware-amd64-000006-s014.vmdk" : failed to open (25): ObjLib_Open failed
2021-02-25T22:14:56.394+08:00| vmx| I005: DISKLIB-LINK : "D:\VM\Kali Linux for OSCP\Kali-Linux-2020.4-vmware-amd64-000006.vmdk" : failed to open (The system cannot find the file specified).
2021-02-25T22:14:56.394+08:00| vmx| I005: DISKLIB-CHAIN : "D:\VM\Kali Linux for OSCP\Kali-Linux-2020.4-vmware-amd64-000006.vmdk" : failed to open (The system cannot find the file specified).
2021-02-25T22:14:56.394+08:00| vmx| I005: DISKLIB-LIB : Failed to open 'D:\VM\Kali Linux for OSCP\Kali-Linux-2020.4-vmware-amd64-000006.vmdk' with flags 0x10d The system cannot find the file specified (25).
2021-02-25T22:14:56.394+08:00| vmx| W003: DISK: Cannot check disk: The system cannot find the file specified.

 

I've tried to do the repair on the disk as mentioned but I just keep getting errors

C:\Program Files (x86)\VMware\VMware Workstation>vmware-vdiskmanager -R "D:\VM\Kali Linux for OSCP\Kali-Linux-2020.4-vmware-amd64-000006.vmdk"
VixDiskLib: Failed to initialize PhoneHome library.

 

Please help! I've spent hours on this 😞

0 Kudos
1 Solution

Accepted Solutions
a_p_
Leadership
Leadership

The log shows two issues.

  1. The missing "Kali-Linux-2020.4-vmware-amd64-000006-s014.vmdk" file
    Assuming that the file got lost (i.e. not quarantined by your A/V) you can replace it with a stub file. This won't bring back the contents, but will allow to use the virtual disk again. For this copy "Kali-Linux-2020.4-vmware-amd64-000006-s012.vmdk" to "Kali-Linux-2020.4-vmware-amd64-000006-s014.vmdk"
  2. The corruption in "Kali-Linux-2020.4-vmware-amd64-000006-s001.vmdk"
    For this issue, extract the files from the attached .zip archive, and drag&drop "Kali-Linux-2020.4-vmware-amd64-000006-s001.vmdk" onto the extracted .cmd file. This will create some "Metadata-..." files. Please comress/zip these files, and attach the .zip archive to your next reply.

André

View solution in original post

0 Kudos
12 Replies
a_p_
Leadership
Leadership

As a first step, please run dir *.* /oen > filelist.txt, then compress/zip filelist.txt, along with all the small descriptor .vmdk files (the ones without "-s00x" in their names), and attach the .zip archive to your next reply.

André

0 Kudos
chewbakkwa
Contributor
Contributor

Here you go, good sir. I am hoping for the best

0 Kudos
a_p_
Leadership
Leadership

The log shows two issues.

  1. The missing "Kali-Linux-2020.4-vmware-amd64-000006-s014.vmdk" file
    Assuming that the file got lost (i.e. not quarantined by your A/V) you can replace it with a stub file. This won't bring back the contents, but will allow to use the virtual disk again. For this copy "Kali-Linux-2020.4-vmware-amd64-000006-s012.vmdk" to "Kali-Linux-2020.4-vmware-amd64-000006-s014.vmdk"
  2. The corruption in "Kali-Linux-2020.4-vmware-amd64-000006-s001.vmdk"
    For this issue, extract the files from the attached .zip archive, and drag&drop "Kali-Linux-2020.4-vmware-amd64-000006-s001.vmdk" onto the extracted .cmd file. This will create some "Metadata-..." files. Please comress/zip these files, and attach the .zip archive to your next reply.

André

0 Kudos
chewbakkwa
Contributor
Contributor

Thank you so much Andre

I have attached the metadata files, and done step 1 as you described.

Should I power on the VM now?

0 Kudos
a_p_
Leadership
Leadership

>>> Should I power on the VM now?
Not yet, give me a minute to check the metadata files.

What you may do in the meantime - unless already done - is to backup the VM's folder/files.

André

0 Kudos
chewbakkwa
Contributor
Contributor

Got it,thank you. I have already copied/backup the entire folder

0 Kudos
chewbakkwa
Contributor
Contributor

>>> This won't bring back the contents, but will allow to use the virtual disk again. For this copy "Kali-Linux-2020.4-vmware-amd64-000006-s012.vmdk" to "Kali-Linux-2020.4-vmware-amd64-000006-s014.vmdk"

Which contents have I lost, by the way? I'm not very familiar with VM files. Am I still able to go back to my snapshots?

0 Kudos
a_p_
Leadership
Leadership

Ok, I've checked the metadata, and I didn't see an issue except for the "Unclean Shutdown" flag.

What you may do now is to take another snapshot, so that the current .vmdk files won't get modified. Then power on the VM, and check the guest OS for file system errors, and missing data that may have occurred due to the lost .vmdk  file.

If there's too much corruption, it may be an option to revert to a previous snapshot (depends on your latest changes.

If other errors pup up, please let me know.

André

0 Kudos
a_p_
Leadership
Leadership

>>> Which contents have I lost, by the way? I'm not very familiar with VM files. Am I still able to go back to my snapshots?
Excellent question, but since the file got lost, I can't help you much. You need to find out yourself by checking files that you've modified recently (after taking the latest snapshot).

André

0 Kudos
chewbakkwa
Contributor
Contributor

So it looks like the missing Kali-Linux-2020.4-vmware-amd64-000006-s014.vmdk was bad enough and I've lost most of my meaningful data. 

But does it mean that only Kali-Linux-2020.4-vmware-amd64-000006*** is affected? I'm assuming that reverting to an earlier snapshot uses another set of disks (not 000006), and they are not corrupted? 

0 Kudos
a_p_
Leadership
Leadership

That's what I assume too. It's usually only the current snapshot in the chain which becomes corrupted in a situation like yours, because it's open in read-write mode. All parent .vmdk files in the snapshot chain are opened in read-only mode.

André

0 Kudos
chewbakkwa
Contributor
Contributor

Got it. I'm still wrapping my head around the fundamental stuff like 000006 is a snapshot. Assuming others like 000005 or 000007 were not touched, then all I'd need to do is revert to the next previous snapshot, which in my case is 000002. And accept the day's work loss.

I was really worried because much as it seems that the previous snapshots are ok, I couldn't revert to them right at the start of the problem.

You're a lifesaver, Andre!

0 Kudos