[libvirt] default storage pool will not start

Long ago I had a VM that used a qcow image that was in the default directory-based storage pool. Since then the VM and the image have been deleted. But now libvirt will not start without the image file: Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/host.py", line 586, in start_pool pool.start() File "/usr/share/virt-manager/virtManager/storagepool.py", line 67, in start self.pool.create(0) File "/usr/lib64/python2.6/site-packages/libvirt.py", line 1039, in create if ret == -1: raise libvirtError ('virStoragePoolCreate() failed', pool=self) libvirtError: cannot open volume '/var/lib/libvirt/images/gstable.qcow2': No such file or directory If I simply "touch" the file, then the pool starts. But I don't want it around. No other vm's reference this file. I've tried deleting and re-creating the pool. I've tried removing all the files in the pool, removing the directory, mkdir'ing the directory and then re-creating the pool, but it still will not start without that file. I've grepped /etc/libvirt for the existence of that filename but it doesn't exist. For the life of me I can't figure out where libvirt is getting this information from and why it thinks it needs this file.

On 07/31/2010 10:06 PM, Albert Hopkins wrote: <snip>
If I simply "touch" the file, then the pool starts. But I don't want it around. No other vm's reference this file. I've tried deleting and re-creating the pool. I've tried removing all the files in the pool, removing the directory, mkdir'ing the directory and then re-creating the pool, but it still will not start without that file. I've grepped /etc/libvirt for the existence of that filename but it doesn't exist.
For the life of me I can't figure out where libvirt is getting this information from and why it thinks it needs this file.
Hi Albert, No worries. As a start, so we have some idea of your set up and what might be happening: + Which Linux distribution (and version) is this happening on? + Which version(s) of libvirt is installed? If you're running on Fedora or RHEL, can you please do this and include the output in your reply? $ sudo ls -laR /etc/libvirt /var/lib/libvirt/ On (recent) Fedora or RHEL, that will generally show the main files of interest, so help reduce the back-and-forth emailing. :) Also, is there a "default.xml" anywhere on your system? $ sudo locate default.xml | grep virt /etc/libvirt/storage/default.xml /etc/libvirt/storage/autostart/default.xml $ sudo ls -la /etc/libvirt/storage/default.xml /etc/libvirt/storage/autostart/default.xml lrwxrwxrwx 1 root root 32 Jun 14 20:31 /etc/libvirt/storage/autostart/default.xml -> /etc/libvirt/storage/default.xml -rw------- 1 root root 378 Jun 14 20:31 /etc/libvirt/storage/default.xml $ ??? (Btw, the "sudo" is important for the "locate" command. It won't otherwise display files that are only accessible to the root user, thereby missing out on many libvirt ones.) Regards and best wishes, Justin Clift

On Sun, 2010-08-01 at 12:21 +1000, Justin Clift wrote:
No worries. As a start, so we have some idea of your set up and what might be happening:
Thanks for the reply. Here is the info you requested.
+ Which Linux distribution (and version) is this happening on?
Gentoo Linux x64 (Gentoo doesn't really have "versions" per-se)
+ Which version(s) of libvirt is installed?
libvirt 0.8.2 virt-manager 0.8.4
If you're running on Fedora or RHEL, can you please do this and include the output in your reply?
$ sudo ls -laR /etc/libvirt /var/lib/libvirt/
/etc/libvirt: total 40 drwxr-xr-x 5 root root 4096 Jul 14 06:54 . drwxr-xr-x 79 root root 4096 Jul 31 22:34 .. -rw-r--r-- 1 root root 10231 Jul 14 06:53 libvirtd.conf drwxr-xr-x 2 root root 4096 Jul 30 19:47 nwfilter drwxr-xr-x 4 root root 4096 Jul 28 22:00 qemu -rw-r--r-- 1 root root 6693 Jul 14 06:54 qemu.conf drwxr-xr-x 3 root root 4096 Jul 31 22:48 storage /etc/libvirt/nwfilter: total 68 drwxr-xr-x 2 root root 4096 Jul 30 19:47 . drwxr-xr-x 5 root root 4096 Jul 14 06:54 .. -rw-r--r-- 1 root root 92 Jul 30 19:47 allow-arp.xml -rw-r--r-- 1 root root 841 Jul 30 19:47 allow-dhcp-server.xml -rw-r--r-- 1 root root 695 Jul 30 19:47 allow-dhcp.xml -rw-r--r-- 1 root root 100 Jul 30 19:47 allow-incoming-ipv4.xml -rw-r--r-- 1 root root 94 Jul 30 19:47 allow-ipv4.xml -rw-r--r-- 1 root root 667 Jul 30 19:47 clean-traffic.xml -rw-r--r-- 1 root root 1193 Jul 30 19:47 no-arp-spoofing.xml -rw-r--r-- 1 root root 290 Jul 30 19:47 no-ip-multicast.xml -rw-r--r-- 1 root root 216 Jul 30 19:47 no-ip-spoofing.xml -rw-r--r-- 1 root root 269 Jul 30 19:47 no-mac-broadcast.xml -rw-r--r-- 1 root root 161 Jul 30 19:47 no-mac-spoofing.xml -rw-r--r-- 1 root root 247 Jul 30 19:47 no-other-l2-traffic.xml -rw-r--r-- 1 root root 121 Jul 30 19:47 no-other-rarp-traffic.xml -rw-r--r-- 1 root root 584 Jul 30 19:47 qemu-announce-self-rarp.xml -rw-r--r-- 1 root root 432 Jul 30 19:47 qemu-announce-self.xml /etc/libvirt/qemu: total 52 drwxr-xr-x 4 root root 4096 Jul 28 22:00 . drwxr-xr-x 5 root root 4096 Jul 14 06:54 .. -rw------- 1 root root 1432 Jul 27 23:16 TeamPlayer.xml drwxr-xr-x 2 root root 4096 Jan 26 2010 autostart -rw------- 1 root root 1039 Mar 5 19:22 centos54.xml -rw------- 1 root root 1419 Mar 24 21:43 centos54mm.xml -rw------- 1 root root 1683 Jul 30 21:01 gentoo-base.xml -rw------- 1 root root 1542 Jul 11 10:41 gnome.xml -rw------- 1 root root 1538 Jul 11 10:48 kde.xml -rw------- 1 root root 1546 Jul 28 08:42 lodgeit.xml -rw------- 1 root root 1116 Apr 8 19:26 mm2.xml drwxr-xr-x 3 root root 4096 Mar 13 22:19 networks -rw------- 1 root root 1550 Jul 30 21:02 vmbuilder.xml /etc/libvirt/qemu/autostart: total 8 drwxr-xr-x 2 root root 4096 Jan 26 2010 . drwxr-xr-x 4 root root 4096 Jul 28 22:00 .. /etc/libvirt/qemu/networks: total 16 drwxr-xr-x 3 root root 4096 Mar 13 22:19 . drwxr-xr-x 4 root root 4096 Jul 28 22:00 .. drwxr-xr-x 2 root root 4096 Jul 30 19:47 autostart -rw-r--r-- 1 root root 334 Mar 5 15:36 default.xml /etc/libvirt/qemu/networks/autostart: total 8 drwxr-xr-x 2 root root 4096 Jul 30 19:47 . drwxr-xr-x 3 root root 4096 Mar 13 22:19 .. lrwxrwxrwx 1 root root 14 Jul 30 19:47 default.xml -> ../default.xml /etc/libvirt/storage: total 20 drwxr-xr-x 3 root root 4096 Jul 31 22:48 . drwxr-xr-x 5 root root 4096 Jul 14 06:54 .. drwxr-xr-x 2 root root 4096 Jul 31 07:49 autostart -rw------- 1 root root 378 Jul 31 07:49 default.xml -rw------- 1 root root 450 Jul 30 19:29 sda8.xml /etc/libvirt/storage/autostart: total 8 drwxr-xr-x 2 root root 4096 Jul 31 07:49 . drwxr-xr-x 3 root root 4096 Jul 31 22:48 .. lrwxrwxrwx 1 root root 32 Jul 31 07:49 default.xml -> /etc/libvirt/storage/default.xml lrwxrwxrwx 1 root root 29 Jul 30 19:29 sda8.xml -> /etc/libvirt/storage/sda8.xml /var/lib/libvirt/: total 28 drwxr-xr-x 7 root root 4096 Jul 31 07:35 . drwxr-xr-x 30 root root 4096 Jul 29 10:31 .. drwxr-xr-x 2 root root 4096 Jan 27 2010 boot drwxr-xr-x 2 root root 4096 May 3 19:27 dnsmasq drwxr-xr-x 2 root root 4096 Jul 31 08:13 images drwxr-xr-x 2 root root 4096 Jul 31 22:44 network drwxr-xr-x 4 root kvm 4096 Jul 31 22:50 qemu /var/lib/libvirt/boot: total 8 drwxr-xr-x 2 root root 4096 Jan 27 2010 . drwxr-xr-x 7 root root 4096 Jul 31 07:35 .. /var/lib/libvirt/dnsmasq: total 8 drwxr-xr-x 2 root root 4096 May 3 19:27 . drwxr-xr-x 7 root root 4096 Jul 31 07:35 .. /var/lib/libvirt/images: total 9175980 drwxr-xr-x 2 root root 4096 Jul 31 08:13 . drwxr-xr-x 7 root root 4096 Jul 31 07:35 .. -rw-r--r-- 1 root kvm 127598592 Jul 31 21:09 base.qcow -rw-r--r-- 1 root kvm 269418496 Apr 28 21:46 centos54.qcow2 -rw-r--r-- 1 root root 508690432 Mar 29 22:47 centos54_x64-mm1.qcow2 -rw-r--r-- 1 root root 677904384 May 11 16:19 centos54mm.qcow2 -rw-r--r-- 1 root kvm 543752192 Jul 31 22:51 gnome.qcow -rw-r--r-- 1 root kvm 655622144 Jul 31 21:04 kde.qcow -rw-r--r-- 1 root root 159449088 Jul 28 08:50 lodgeit.qcow -rw-r--r-- 1 root kvm 153354240 Apr 16 15:29 lodgeit.qcow2 -rw-r--r-- 1 root kvm 5695275008 Jul 28 16:08 mm2.qcow2 -rw-r--r-- 1 root kvm 59113472 Mar 31 18:26 pypy.qcow -rw-r--r-- 1 root root 569507840 Jul 30 09:29 teamplayer.qcow /var/lib/libvirt/network: total 12 drwxr-xr-x 2 root root 4096 Jul 31 22:44 . drwxr-xr-x 7 root root 4096 Jul 31 07:35 .. -rw------- 1 root root 312 Jul 31 21:19 default.xml /var/lib/libvirt/qemu: total 16 drwxr-xr-x 4 root kvm 4096 Jul 31 22:50 . drwxr-xr-x 7 root root 4096 Jul 31 07:35 .. srwxr-xr-x 1 root kvm 0 Apr 28 20:51 centos54.monitor srwxr-xr-x 1 root kvm 0 Mar 30 08:10 centostest01.monitor srwxr-xr-x 1 root kvm 0 Mar 30 08:10 centostest02.monitor srwxr-xr-x 1 root kvm 0 Mar 30 08:10 centostest03.monitor srwxr-xr-x 1 root kvm 0 Mar 30 08:11 centostest04.monitor srwxr-xr-x 1 root kvm 0 Jul 31 20:11 gentoo-base.monitor srwxr-xr-x 1 root kvm 0 Jul 10 20:29 gentoo.monitor srwxr-xr-x 1 root kvm 0 Jul 31 22:50 gnome.monitor srwxr-xr-x 1 root kvm 0 Jul 31 15:05 kde.monitor srwxr-xr-x 1 root kvm 0 Jul 28 15:14 mm2.monitor srwxr-xr-x 1 root kvm 0 Mar 31 16:45 pypy.monitor drwxr-xr-x 2 root kvm 4096 Jul 29 08:12 save drwxr-xr-x 2 root kvm 4096 May 3 19:33 snapshot /var/lib/libvirt/qemu/save: total 8 drwxr-xr-x 2 root kvm 4096 Jul 29 08:12 . drwxr-xr-x 4 root kvm 4096 Jul 31 22:50 .. /var/lib/libvirt/qemu/snapshot: total 8 drwxr-xr-x 2 root kvm 4096 May 3 19:33 . drwxr-xr-x 4 root kvm 4096 Jul 31 22:50 ..
On (recent) Fedora or RHEL, that will generally show the main files of interest, so help reduce the back-and-forth emailing. :)
Also, is there a "default.xml" anywhere on your system?
$ sudo locate default.xml | grep virt /etc/libvirt/storage/default.xml /etc/libvirt/storage/autostart/default.xml
/etc/libvirt/storage/default.xml /etc/libvirt/storage/autostart/default.xml /etc/libvirt/qemu/networks/default.xml /etc/libvirt/qemu/networks/autostart/default.xml /var/lib/libvirt/network/default.xml
$ sudo ls -la /etc/libvirt/storage/default.xml /etc/libvirt/storage/autostart/default.xml lrwxrwxrwx 1 root root 32 Jun 14 20:31 /etc/libvirt/storage/autostart/default.xml -> /etc/libvirt/storage/default.xml -rw------- 1 root root 378 Jun 14 20:31 /etc/libvirt/storage/default.x
lrwxrwxrwx 1 root root 32 Jul 31 07:49 /etc/libvirt/storage/autostart/default.xml -> /etc/libvirt/storage/default.xml -rw------- 1 root root 378 Jul 31 07:49 /etc/libvirt/storage/default.xml
ml $
???
(Btw, the "sudo" is important for the "locate" command. It won't otherwise display files that are only accessible to the root user, thereby missing out on many libvirt ones.)
Regards and best wishes,
Justin Clift

On 08/01/2010 01:15 PM, Albert Hopkins wrote: <snip>
Gentoo Linux x64 (Gentoo doesn't really have "versions" per-se)
Cool, no worries. It's been a while since I ran Gentoo, but I still remember the gist of it. :) Lets do some investigation, using the info you've provided. Looking at the previous listing, it seems like the "default" storage pool hasn't been changed much, and is still pointing to its default location (/var/lib/libvirt/images). Can you please cat it's definition file, so we can confirm: $ sudo virsh pool-dumpxml default Let's also check if any virtual machine thinks it's using the missing file. $ sudo grep -r "gstable.qcow2" /etc/libvirt/qemu If that doesn't shed any light, let's try a debugging approach. a) Stop the libvirt daemon b) Change into the superuser account (ie $ sudo su -) c) Turn on maximum logging environment variables for libvirt: # export LIBVIRT_DEBUG=1 # export LIBVIRT_LOG_FILTERS="1:default" # export LIBVIRT_LOG_OUTPUTS="1:file:/var/log/libvirt/libvirt_debug.log" Start the libvirtd daemon directly from the command line, so it picks up the environment variables # libvirt d) Wait a few seconds for it to start up properly and for the log file /var/log/libvirt/libvirt_debug.log to stop growing fast, then Control-C to terminate it. e) Do a grep in the log file for the image name, and see if this sheds any useful info: $ sudo grep gstable.qcow2 /var/log/libvirt/libvirt_debug.log Hoping that something in the above has helped find out what the problem is? Regards and best wishes, Justin Clift
participants (2)
-
Albert Hopkins
-
Justin Clift