dus2dus
Contributor
Contributor

Accidentally deleted VM from disk

Hi,

I am kind of a newbie to VMware. I accidentally deleted VM from disk. I recovered the files using a recovery software and added the VM back to VMware Workstation 15 Pro but now I am getting the error "The file specified is not a virtual disk".

If you need additional info, please let me know.

0 Kudos
20 Replies
a_p_
Leadership
Leadership

Welcome to the Community,

please provide some details, like a complete list of files in the VM's folder (e.g. the output of dir *.*).

By default, virtual disks consist of a small descriptor/header .vmdk file, and a number of data .vmdk files (e.g. <vmname>-s00x.vmdk). Please check whether all of these files exist.

André

0 Kudos
dus2dus
Contributor
Contributor

I've checked the files and all of them seem presents in the folder. Keep in mind that these files are located on an external drive that i have recovered the deleted data to. I've also attached the list of files.

0 Kudos
dus2dus
Contributor
Contributor

One more file.

0 Kudos
a_p_
Leadership
Leadership

From a first look at the screenshots, it looks like multiple files are missing.

Please run dir *.* > filelist.txt in the VM's folder, then compress/zip the filelitst.txt along with the VM's .vmx, and .log files and attach the resulting .zip archive to a reply post.

André

0 Kudos
dus2dus
Contributor
Contributor

Here is the zip folder with requested files

0 Kudos
a_p_
Leadership
Leadership

Let's see if we can fix the virtual disk's files so that you can at least open/mount it to backup important files. If you are really lucky, it may even be possible to run the VM again. Anyway, the first step that I strongly recommend is to backup the VM's current files, so that we can always revert to the current state.

What needs to be done first is to re-create the base disk's .vmdk descriptor/header file, and chain it with the snapshots. To be able to create that file, please compress/zip the three .vmdk files without "-s00x" in their names, and attach the .zip archive to your next reply.

There are also two definitely corrupted .vmdk slices (the ones with zero bytes sizes) which need to be replaced. Assuming that the "_0" files have been created by the recovery software, we can try to replace the 0 Bytes .vmdk files with their "_0.vmdk" equivalent.

If - after backing up, and fixing the obvious issues - the virtual disk can still not be accessed, we can try to check the files' metadata.

One more question: When did you last backup the VM's files? Maybe this can help with rebuilding the VM.

André

0 Kudos
dus2dus
Contributor
Contributor

Okay, all files have been backed up. 4 .vmdk files have been attached. I don't have no recent back up of the VMs. I was working on converting these VMs to ESXi when i accidentally deleted this VM instead of another.

0 Kudos
a_p_
Leadership
Leadership

Attached you will find the two recreated .vmdk files, that you need to replace the corrupted ones.

With the corruption in the so far presented files, I'm afraid that there's corruption in other files too.

With the two attached files in place, try to mount the virtual disk (File -> Map virtual disks ...) to your host in Read-Only mode. Note that the current snapshot is "Test - CubeNet-Hub-000002.vmdk", so that's the one you want to select.

André

0 Kudos
dus2dus
Contributor
Contributor

Morning, I have tried to map the file as instructed and got the same error. I've attached a screenshot. Please tell me there is another option.

0 Kudos
a_p_
Leadership
Leadership

Ok, so let me just put the things together that were done so far:

  • you do have a backup of the VM's current folder/files
  • "Test - CubeNet-Hub-000001.vmdk", and "Test - CubeNet-Hub-000002.vmdk" are replaced with the re-created files
  • "Test - CubeNet-Hub-000001-s003.vmdk" is replaced with "Test - CubeNet-Hub-000001-s003_0.vmdk"
  • "Test - CubeNet-Hub-000002-s012.vmdk" is replaced with "Test - CubeNet-Hub-000002-s012_0.vmdk"

When you open the VM's settings, does it display the virtual disk's size (600GB), and its current file name "Test - CubeNet-Hub-000002.vmdk"?

If the size is displayed, you may try to create another snapshot, and then power on the VM. Even if it does not power on correctly, a new vmware.log file should be created. Please attach this file to your next reply.


André

0 Kudos
dus2dus
Contributor
Contributor

Okay see response to the bullets below:

  • you do have a backup of the VM's current folder/files. Yes
  • "Test - CubeNet-Hub-000001.vmdk", and "Test - CubeNet-Hub-000002.vmdk" are replaced with the re-created files. Yes
  • "Test - CubeNet-Hub-000001-s003.vmdk" is replaced with "Test - CubeNet-Hub-000001-s003_0.vmdk". To accomplish this, i was suppose to delete "Test - CubeNet-Hub-000001-s003.vmdk" and rename "Test - CubeNet-Hub-000001-s003_0.vmdk" into "Test - CubeNet-Hub-000001-s003.vmdk"?
  • "Test - CubeNet-Hub-000002-s012.vmdk" is replaced with "Test - CubeNet-Hub-000002-s012_0.vmdk". To accomplish this, i was suppose to delete "Test - CubeNet-Hub-000002-s012.vmdk" and rename "Test - CubeNet-Hub-000002-s012_0.vmdk" into "Test - CubeNet-Hub-000002-s012.vmdk"?

Please clarify the above because I have not done so if that was what I was suppose to do.

0 Kudos
a_p_
Leadership
Leadership

You can do his either by renaming the "_0" files (as you explained), or by copying them. Since you do have a backup, renaming will be ok.


André

0 Kudos
dus2dus
Contributor
Contributor

Okay. I have done so and still same error when i map the "Test - CubeNet-Hub-000002.vmdk" file. And when i open the VM setttings i see the .vmdk file is mapped but the size does now show. it is blank.

0 Kudos
dus2dus
Contributor
Contributor

Hi,

Fortunately i found an instance of this same exact VM on one of my drives. It was last ran in Jan tho. Is it possible to use any files from this to recreate the most recent instance which we are working on right now?

0 Kudos
a_p_
Leadership
Leadership

It's good to know that there's at least an older backup available, but for the current content, we need the snapshot .vmdk files which contain changes blocks.

What I'd like to do, is to check the .vmdk files' metadata to find out how teir headers look like.

For this, please download dsfok.zip from http://faq.sanbarrow.com/index.php?action=artikel&cat=47&id=111&artlang=en, extract the executables, run the below command in the VM's folder, then compress/zip all "xxx-....bin" files and attach the .zip archive to a reply post.

for %i in (*.vmdk) do @dsfo.exe "%i" 0 1536 "xxx-%~ni.bin"

André

0 Kudos
dus2dus
Contributor
Contributor

Should i extract the files of dsfok.zip in the same VM folder?

0 Kudos
dus2dus
Contributor
Contributor

Here are the bin files

0 Kudos
a_p_
Leadership
Leadership

A quick check shows a couple of files with corrupted headers, and what I would like to do at this point, is to replace these files, to see whether this at least allows to access the virtual disk, and to backup important guest files.

The files with corrupted headers are:

  • Test - CubeNet-Hub-s001.vmdk -> Action: replace with a copy of your January backup
  • Test - CubeNet-Hub-000002-s025.vmdk -> Action: replace with attached file
  • Test - CubeNet-Hub-000002-s026.vmdk -> Action: replace with attached file
  • Test - CubeNet-Hub-000002-s028.vmdk -> Action: replace with attached file

Make sure that VMware Workstation (or at least the VM's tab) is closed, when you replace the files.

After replacing the files, check whether the VM's settings show the virtual disk size. Then try mounting the virtual disk to the host in read-only mode. If "Test - CubeNet-Hub-000002.vmdk" doesn't work, you may try "Test - CubeNet-Hub-000001.vmdk" and "Test - CubeNet-Hub.vmdk" as well.

André

0 Kudos
dus2dus
Contributor
Contributor

I have replace the files and it is showing the hard disk size of 600Gb. I attempted to map disk to "Test - CubeNet-Hub-000002.vmdk" and it says "Error reading volume information. Please select another disk file." I also tried to map "Test - CubeNet-Hub-000001.vmdk" and "Test - CubeNet-Hub.vmdk" and it throws VMware Workstation into a "Not Responding" mode once i click anywhere on the screen after mapping to the disks.

0 Kudos