ARSB
Contributor
Contributor

How to Recover a deleted folder and .vmdk file

Jump to solution

Dear all,

I accidentally deleted the .vmdk file and its folder by removing the Inventory from the virtual machine. How can I recover the Folder and the .vmdk file?

I have also found Knowledge Base relating to recovery of .vmdk file. It does not, however, mentioned on recovery of missing Folder.

Assistance much needed. Thanks in advance.

Clement

1 Solution

Accepted Solutions
continuum
Immortal
Immortal

This was a tricky one !

All the VMFS metadata for the VM was gone.

I had to carve out the missing VMDK from the datastore.

The vmdk had  two partitions - a smaller one with 560gb used for C: of a Win2008 R2 and a larger one with about a TB of data used as 😧

The first 600 gb of the vmdk was found in one piece and so we could use that to rebuild the bootdisk.

The missing 😧 could then be populated with data from a few weeks old backup.

Do you need support with a recovery problem ? - send a message via skype "sanbarrow"

View solution in original post

0 Kudos
27 Replies
Gidrakos
Hot Shot
Hot Shot

Do you mean you deleted the actual underlying files/folder for the VM? If you've done that, then the only way to retrieve the files would be if you had a backup of the datastore they were stored on.

ARSB
Contributor
Contributor

Unfortunately yes. I accidentally click "Remove From Disk" rather than "Remove From Inventory" on vSphere Client.

Anyway to recover?

0 Kudos
Gidrakos
Hot Shot
Hot Shot

Unfortunately, "Remove From Disk" completely deletes the files. The only way to get them back would be if the storage space itself was backed up somewhere. vCenter does not keep a copy of those files.

ARSB
Contributor
Contributor

Thanks Gidrakos​ for your advise.

Feeling very very sad though. 😞 😞 😞

0 Kudos
Gidrakos
Hot Shot
Hot Shot

I know the feeling from experience. Hopefully it wasn't anything too important, but now you'll know to be extra careful in the future and potentially look into a means to back it up - VMs are just files, so it's very easy to copy them elsewhere for safe keeping Smiley Happy

0 Kudos
continuum
Immortal
Immortal

Which VMFS version do you use ?

With VMFS 6 your chances are not that good.

With VMFS 5 you actually have a decent chance to recover your files.

The vmx file and the vmdk-descriptorfiles are actually quite easy to recover.

Create a VMFS header dump like I describe here

Create a VMFS-Header-dump using an ESXi-Host in production | VM-Sickbay

The flat vmdks are more tricky - it depends on the provisioning type you used.

Thin vmdks are almost never recoverable with VMFS 6.

Eager zeroed vmdks on the other hand can be recovered with some luck.

Send a dump and I can tell you more

Ulli

Do you need support with a recovery problem ? - send a message via skype "sanbarrow"
continuum
Immortal
Immortal

> Unfortunately, "Remove From Disk" completely deletes the files.

Thats not correct. The flat.vmdk will not be removed or overwritten by the delete operation.

Ot will only remove the info about where that flat.vmdk is actually located - you can still find it if it is written in one piece

Ulli

Do you need support with a recovery problem ? - send a message via skype "sanbarrow"
Gidrakos
Hot Shot
Hot Shot

Only provided they are running VMFS, which is unlikely given that they don't have any backups of the datastore on which they placed the VM. Even then, the chances of recovering the files are slim.

"Remove From Disk" (or rather) "Delete From Disk" as opposed to "Remove From Inventory" will delete the files because that's its intended purpose. I've just tested and verified it on both local and NFS storage and there's no trace of any files remaining.

0 Kudos
continuum
Immortal
Immortal

The purpose of "delete from disk" is not to completely remove the file but to make the used space available again - and that is a big difference.

Do you need support with a recovery problem ? - send a message via skype "sanbarrow"
ARSB
Contributor
Contributor

Hi continuum​,

Thank you for your input and really excited into hearing possibility of recovering the file. However, I am not comfortable in resolving the issue myself. I can contact you (via PM preferred) and connect you through TeamViewer to resolving the issue? What would your charges be?

p.s. I can brief you further on how I lost the file in more detail.

0 Kudos
lgio
Contributor
Contributor

Hello i need support

Are you help me?

0 Kudos
lgio
Contributor
Contributor

Hello i need support

Are you help me?

continuum

0 Kudos
continuum
Immortal
Immortal

read my signature and call me on skype

Ulli

Do you need support with a recovery problem ? - send a message via skype "sanbarrow"
0 Kudos
ARSB
Contributor
Contributor

Problem solved. Many thanks to continuum​ for all the help rendered. Without your assistance I might not have recovered the data so soon or at all.

0 Kudos
continuum
Immortal
Immortal

You are welcome.

Regards Ulli

Do you need support with a recovery problem ? - send a message via skype "sanbarrow"
tosaad
Contributor
Contributor

Hi Ulli,

i'm having the same issue can you help me?

Thanks,

0 Kudos
continuum
Immortal
Immortal

Hi

I can try ...

call me via skype "sanbarrow"

Ulli

Do you need support with a recovery problem ? - send a message via skype "sanbarrow"
0 Kudos
tosaad
Contributor
Contributor

Hi Ulli,

I'm calling you now.

Thanks

0 Kudos
continuum
Immortal
Immortal

This was a tricky one !

All the VMFS metadata for the VM was gone.

I had to carve out the missing VMDK from the datastore.

The vmdk had  two partitions - a smaller one with 560gb used for C: of a Win2008 R2 and a larger one with about a TB of data used as 😧

The first 600 gb of the vmdk was found in one piece and so we could use that to rebuild the bootdisk.

The missing 😧 could then be populated with data from a few weeks old backup.

Do you need support with a recovery problem ? - send a message via skype "sanbarrow"

View solution in original post

0 Kudos