LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 11-11-2012, 06:28 PM   #1
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,360

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
KVM: old working .img files no longer seen by virsh list cmd: how to recover?


Hi guys, setup 4 KVM VMs back in August.
Haven't played with them in a while, want to revisit/get myself current again.

Code:
 ls -lh  /var/lib/libvirt/images
total 8.7G
drwx------. 2 root root 16K Aug  5 11:01 lost+found
-rw-------. 1 root root 15G Aug 16 22:07 vm1.img
-rw-------. 1 root root 15G Aug 16 22:07 vm2.img
-rw-------. 1 root root 15G Aug 16 22:07 vm3.img
-rw-------. 1 root root 12G Aug 18 17:12 vm4.img

 ls -lh  /var/lib/libvirt/images
total 8.7G
drwx------. 2 root root 16K Aug  5 11:01 lost+found
-rw-------. 1 root root 15G Aug 16 22:07 vm1.img
-rw-------. 1 root root 15G Aug 16 22:07 vm2.img
-rw-------. 1 root root 15G Aug 16 22:07 vm3.img
-rw-------. 1 root root 12G Aug 18 17:12 vm4.img

 chkconfig --list|grep virt
libvirt-guests 	0:off	1:off	2:on	3:on	4:on	5:on	6:off
libvirtd       	0:off	1:off	2:off	3:on	4:on	5:on	6:off

 service libvirtd status
libvirtd (pid  6929) is running...

 service libvirt-guests status
started

 virsh list --all
 Id    Name                           State
----------------------------------------------------
ie everything is up and running, but virsh can't see the imgs anymore ...

I'd really like to re-activate the current images instead of re-creating.
in any case, I'm sure I'd learn a lot by solving this problem.


===================================================================================
UPDATED:
ok it appears when I got a new m/board (back then sometime) to get extra RAM, forgot to check Virtualisation was enabled in BIOS... It was 'Disabled' .. sigh
Rebooted, Enabled Virtualisation in BIOS et viola

Actually, same qn is still valid for vm4. ie
Code:
virsh list --all
 Id    Name                           State
----------------------------------------------------
 1     vm1                            running
 2     vm2                            running
 3     vm3                            running
so, 3 out of 4 are good to go.
Any ideas how I can 'debug' / enable / activate vm4 ?


=================================================================================

LAST Update
ok, used http://linux.dell.com/files/whitepap..._made_easy.pdf Section 2.1 to debug.
Turns out the 'disk' inside vm4 is totally blank / not partitioned.
Can't remember why; think I'll just delete vm4.

Hope these notes will be of some use to later readers

Last edited by chrism01; 11-12-2012 at 12:29 AM.
 
Old 11-23-2012, 04:57 AM   #2
r0b0
Member
 
Registered: Aug 2004
Location: Europe
Posts: 608

Rep: Reputation: 50
For me, sometimes virsh list --all doesn't actually show all the defined VMs. Is it an option for you to run virt-manager on the host? Or run it on another host (e.g. your workstation) and connect to libvirt on the server?

If you can't find the vm4 defined, then I suppose you can just define it as a new VM and add the existing disk image as a disk drive.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Increase size of KVM/QEMU .img virtual machine Nick_C Linux - Virtualization and Cloud 6 10-24-2012 05:28 PM
kvm: virsh create error: Unable to allow access for disk path ... chrism01 Linux - Virtualization and Cloud 1 10-08-2012 12:42 PM
libvirt/kvm: Enter passphrase during guest startup using virsh start <domain> druuna Linux - Virtualization and Cloud 0 09-29-2011 06:59 AM
kvm-qemu-img: qcow2 disk image format changes to raw format in RHEL-KVM 5.6 rajivdp Linux - Virtualization and Cloud 2 09-19-2011 11:23 AM
qemu/kvm virsh networking help zoran119 Linux - Virtualization and Cloud 2 12-02-2010 01:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 06:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration