VMware Cloud Community
wannabegates
Contributor
Contributor

Recover accidentally deleted VMDK file to allow for migration of running VM

I have accidentally deleted my vmdk file from a running server that needs to be migrated off of it's host. However, for obvious reasons, the task errors out. I do have several snapshots of the machine to work with, and the server is running fine, however, it needs to be moved to a new host. Is there a way I can recover or rebuild the vmdk like this article Can you recover an accidentally deleted VMDK file?   (only in this scenario the server is down).

Any help with this would be greatly appreciated.

David

Reply
0 Kudos
6 Replies
continuum
Immortal
Immortal

You can not delete  a vmdk that is connected to a running VM - so please review your description of the problem.

If you delete a vmdk that was not connected to a running VM - read Create a VMFS-Header-dump using an ESXi-Host in production | VM-Sickbay


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

Reply
0 Kudos
a_p_
Leadership
Leadership

Welcome to the Community,

What may have been deleted in such a case are the descriptor .vmdk files, since these are not locked. To find whether this is the case, please run ls -lisa in the VM's folder, and post the output.


André

Reply
0 Kudos
wannabegates
Contributor
Contributor

Thanks for the quick response all... bad snow day here and a horrible VPN connection. Bare with me.

Reply
0 Kudos
Raj2216
Contributor
Contributor

I also facing the same problem, I logged on root and mistakenly click on delete instead of export and i lost my all VM and its VMDK from datastore also. is any soln to recover it. I only want a 30 mb backup which besides in the VM

Reply
0 Kudos
bbalido9
Contributor
Contributor

just checking if you have any storage/device snapshot prior vm deletion?

 

Reply
0 Kudos
BarryGrowler
Enthusiast
Enthusiast

Given the VM is still running and you have snapshots available, you can recover from the deleted VMDK by first consolidating these snapshots to create a new, current VMDK. Then, clone the VM to generate a complete set of VMDK files for the clone. This clone can then be migrated to a new host, effectively bypassing the issue caused by the deleted original VMDK. This method leans on the snapshots to rebuild and migrate the VM without the need for the deleted file.

Reply
0 Kudos