Recover VM Disk of running VM

gbecker

Active Member
May 18, 2018
4
0
41
51
hello everyone,

I accidentally deleted the disk of one of the vms. The vm is still running. I retrieved its pid via the

lsof | grep "vmid"

and tried to restore it but without success.

cp /proc/vmid/fd/"vmid" /restore_path/

Maybe my way of doing things is not good, is there anything else to try before restoring a backup ?

I would like to avoid losing a day of work.

Thanks
 
Copy your work from inside the VM to another place (via the virtual network)?
I don't know but maybe you can use dd instead of cp (if you have a handle to the delete disk)?

EDIT: Maybe recreate the issue on another VM to test various options? But maybe not on the same storage.
 
Last edited: