How to restore a deleted VM

July 17, 2010 at 03:04:13
Specs: Linux i686, AMD 955
How folks,

KVM
host - Debian 5.0

Accidentally I deleted a VM on the VirtualMachineManager.

VM.xml is still in /etc/libvirt/qemu/VM.xml
VM.qcow2 still in /VM/VM.qcow2

Please advise how to add it back? TIA

B.R.
satimis


See More: How to restore a deleted VM

Report •

#1
July 18, 2010 at 15:49:57
Import or otherwise create a new VM and edit to the correct files.

I support the 'Everybody Draw Mohammed Day'. A religion doesn't deny my freedom.


Report •

#2
July 18, 2010 at 18:05:28
Hi jefro,

I can't create a new VM on the GUI Virtual Machine Manager like in Oracle VirtualBox. It always looks for ISO image. Finally I got it done with

$ sudo virsh define /path/to/VM.xml


Which file holds the relevant data? I wonder whether I can edit the file manually to do the job. Thanks

B.R.
satimis


Report •

#3
July 19, 2010 at 19:39:59
Part of the info is on the qemu sites. qcow2 is the virtual filesystem. Normally linux uses a script but look at the xml file. It may hold the vm settings such as ram and what files are used for the hard drives and cdroms.

Pretty sure they make gui front ends that work pretty easily.


I support the 'Everybody Draw Mohammed Day'. A religion doesn't deny my freedom.


Report •

Related Solutions

#4
July 20, 2010 at 07:04:47
Hi jefro,

The GUI which I found is Virtual Machine Manager. It can't restore the deleted guest from VM.xml nor from the image.

satimis


Report •

#5
July 21, 2010 at 12:47:39
You don't restore you just make a new one and then edit to the old file names.

I support the 'Everybody Draw Mohammed Day'. A religion doesn't deny my freedom.


Report •

Ask Question