Ask Your Question
1

How do I retrieve missing VMs?

asked 2014-04-12 13:29:06 -0600

Soumya Koduri gravatar image

updated 2014-04-12 14:01:09 -0600

remjg gravatar image

Hi,

I am new to linux world. I am using Fedora20 machine. Using KVM (virt-manager) I created two VMs. Everything was working fine till yesterday.

For some reason, my laptop ran out of battery and got shut down unexpectedly. And today when I opened the virt-manager GUI, it doesn't list those VMs.

Initially opening virt-manager gave an error - "system policy prevents management of local virtualized systems" and prompts for admin password. After googling a bit, I re-installed lib-virt hoping it would solve the problem. It did solve partially. I do not get that error message but the VM's are still missing :( :( .

I have lots of my work stored in those VMs. Yesterday I have installed libxm2/libxml2-devel and python-devel packages. I am not sure if installing these packages or unexpected shut down had caused this issue.

[root@skoduri redhat]# virsh list --all
Id    Name                           State
----------------------------------------------------

[root@skoduri redhat]# ls  /var/log/libvirt/qemu/
rhel6.log  rhel6-vm1.log  rhel6-vm2.log  rhel6-vm3-clone.log  rhel6-vm3.log  rhel6-vm4.log
[root@skoduri redhat]# cat /etc/libvirt/qemu/
cat: /etc/libvirt/qemu/: Is a directory
[root@skoduri redhat]# ls /etc/libvirt/qemu/
networks  rhel6-vm2.xml  rhel6.xml
[root@skoduri redhat]# 

Kindly help me out in restoring those VMs.

Thanks, Soumya

edit retag flag offensive close merge delete

Comments

ls /var/lib/libvirt/images/

marcindulak gravatar imagemarcindulak ( 2014-04-12 13:38:36 -0600 )edit
[root@skoduri redhat]# ls /var/lib/libvirt/images/
[root@skoduri redhat]#

It doesn't list any images. :(

Soumya Koduri gravatar imageSoumya Koduri ( 2014-04-12 13:46:14 -0600 )edit

I just realised that instead of using default FS location (/var/lib/libvirt/images), I added new storage path to store the VM images

([root@skoduri redhat]# ls -al /home/virt_mngr_storage/storage_1/
total 7870908
drwxr-xr-x. 2 root root       4096 Feb 27 21:14 .
drwxr-xr-x. 3 root root       4096 Jan  8 14:22 ..
-rw-------. 1 qemu qemu 8591507456 Apr 11 22:57 vm1_storage.img
-rw-------. 1 qemu qemu 8591507456 Apr 11 22:57 vm2_storage.img
[root@skoduri redhat]# 
Soumya Koduri gravatar imageSoumya Koduri ( 2014-04-12 13:51:34 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-04-12 17:45:08 -0600

Rabin gravatar image

you can try and re-define the VM, from the files in /etc/libvirt/qemu/, e.g

virsh define /etc/libvirt/qemu/rhel6-vm2.xml
edit flag offensive delete link more

Comments

I get the below error

virsh # define /etc/libvirt/qemu/rhel6.xml 
error: Failed to define domain from /etc/libvirt/qemu/rhel6.xml
error: XML error: unknown target type 'serial' specified for character device

virsh # 
virsh # define /etc/libvirt/qemu/rhel6-vm2.xml 
error: Failed to define domain from /etc/libvirt/qemu/rhel6-vm2.xml
error: XML error: unknown target type 'serial' specified for character device

virsh #

Soumya Koduri gravatar imageSoumya Koduri ( 2014-04-13 09:12:02 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2014-04-12 13:29:06 -0600

Seen: 1,694 times

Last updated: Apr 12 '14