[Pkg-libvirt-maintainers] Bug#710836: libvirt-bin: Pools don't autostart
Daniel Bareiro
dbareiro at gmx.net
Sun Jun 2 21:21:42 UTC 2013
Package: libvirt-bin
Version: 0.9.12-11
Severity: normal
-- System Information:
Debian Release: 7.0
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: i386 (x86_64)
Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=es_AR.UTF-8, LC_CTYPE=es_AR.UTF-8 (charmap=UTF-8) (ignored:
LC_ALL set to es_AR.UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages libvirt-bin depends on:
ii adduser 3.113+nmu3
ii gettext-base 0.18.1.1-9
ii libavahi-client3 0.6.31-2
ii libavahi-common3 0.6.31-2
ii libblkid1 2.20.1-5.3
ii libc6 2.13-38
ii libcap-ng0 0.6.6-2
ii libdbus-1-3 1.6.8-1
ii libdevmapper1.02.1 2:1.02.74-7
ii libgcrypt11 1.5.0-5
ii libgnutls26 2.12.20-7
ii libnetcf1 0.1.9-2
ii libnl1 1.1-7
ii libnuma1 2.0.8~rc4-1
ii libparted0debian1 2.3-12
ii libpcap0.8 1.3.0-1
ii libpciaccess0 0.13.1-2
ii libreadline6 6.2+dfsg-0.1
ii libsasl2-2 2.1.25.dfsg1-6
ii libudev0 175-7.2
ii libvirt0 0.9.12-11
ii libxenstore3.0 4.1.4-3+deb7u1
ii libxml2 2.8.0+dfsg1-7+nmu1
ii libyajl2 2.0.4-2
ii logrotate 3.8.1-4
Versions of packages libvirt-bin recommends:
ii bridge-utils 1.5-6
ii dmidecode 2.11-9
ii dnsmasq-base 2.62-3+deb7u1
ii ebtables 2.0.10.4-1
ii gawk 1:4.0.1+dfsg-2.1
ii iproute 20120521-3+b3
ii iptables 1.4.14-3.1
ii libxml2-utils 2.8.0+dfsg1-7+nmu1
ii netcat-openbsd 1.105-7
ii parted 2.3-12
ii qemu 1.1.2+dfsg-6a
ii qemu-kvm 1.1.2+dfsg-6
Versions of packages libvirt-bin suggests:
ii policykit-1 0.105-3
pn radvd <none>
-- Configuration Files:
/etc/libvirt/qemu.conf changed:
-- no debconf information
Hi, all!
I'm trying virt-manager on Debian Wheezy and I noticed that it has
already defined a "default" pool. But if I run:
# /etc/init.d/libvirt-bin restart
I lose the definition of the pools. Actually, there are the definitions
of the pools; but these are not read after restarting libvirt.
ss01:/etc/libvirt/storage# ls -l
total 8
drwxr-xr-x 2 root root 4096 jun 1 09:36 autostart
-rw------- 1 root root 664 jun 1 13:46 default.xml
ss01:/etc/libvirt/storage/autostart# ls -l
total 0
lrwxrwxrwx 1 root root 32 may 24 07:24 default.xml -> /etc/libvirt/storage/default.xml
After restart libvirt:
virsh # pool-list
Name State Autostart
-----------------------------------------
This is what I see in libvirtd.log:
2013-06-02 01:05:29.709+0000: 19289: info : libvirt version: 0.9.12
2013-06-02 01:05:29.709+0000: 19289: error : virStorageDefParsePerms:613 : XML error: malformed owner element
2013-06-02 01:05:30.210+0000: 19289: error : virExecWithHook:424 : Cannot find 'pm-is-supported' in path: No existe el fichero o el directorio
2013-06-02 01:05:30.211+0000: 19289: warning : qemuCapsInit:949 : Failed to get host power management capabilities
2013-06-02 01:05:33.014+0000: 19289: error : virExecWithHook:424 : Cannot find 'pm-is-supported' in path: No existe el fichero o el directorio
2013-06-02 01:05:33.014+0000: 19289: warning : lxcCapsInit:77 : Failed to get host power management capabilities
2013-06-02 01:05:33.025+0000: 19289: error : virExecWithHook:424 : Cannot find 'pm-is-supported' in path: No existe el fichero o el directorio
2013-06-02 01:05:33.025+0000: 19289: warning : umlCapsInit:87 : Failed to get host power management capabilities
ss01:/etc/libvirt/storage# cat default.xml
<!--
WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE
OVERWRITTEN AND LOST. Changes to this xml configuration should be made
using:
virsh pool-edit default
or other application using the libvirt API.
-->
<pool type='dir'>
<name>default</name>
<uuid>3174232f-3d63-3167-aa25-3949671bf4c2</uuid>
<capacity unit='bytes'>0</capacity>
<allocation unit='bytes'>0</allocation>
<available unit='bytes'>0</available>
<source>
</source>
<target>
<path>/var/lib/libvirt/images</path>
<permissions>
<mode>0700</mode>
<owner>4294967295</owner>
<group>4294967295</group>
</permissions>
</target>
</pool>
It seems the problem is given by: "XML error: malformed owner element".
Owner and group should uid and gid of the images directory.
ss01:~# ls -ld /var/lib/libvirt/images
drwx--x--x 2 root root 4096 may 27 11:03 /var/lib/libvirt/images
So I adapted the permissions to this directory:
<permissions>
<mode>0700</mode>
<owner>0</owner>
<group>0</group>
</permissions>
After restarting libvirt, the pool was recognized:
virsh # pool-list
Name State Autostart
-----------------------------------------
default active yes
Then I went back to create another pool:
virsh # pool-define-as ISO dir - - - - "/space/isos"
Pool ISO defined
virsh # pool-start ISO
Pool ISO started
virsh # pool-autostart ISO
Pool ISO marked as autostarted
virsh # pool-list --all
Name State Autostart
-----------------------------------------
default active yes
ISO active yes
Files are created:
ss01:/etc/libvirt/storage# ll
total 12
drwxr-xr-x 2 root root 4096 jun 2 15:49 autostart
-rw------- 1 root root 646 jun 2 15:05 default.xml
-rw------- 1 root root 644 jun 2 15:48 ISO.xml
ss01:/etc/libvirt/storage/autostart# ll
total 0
lrwxrwxrwx 1 root root 32 may 24 07:24 default.xml -> /etc/libvirt/storage/default.xml
lrwxrwxrwx 1 root root 28 jun 2 15:49 ISO.xml -> /etc/libvirt/storage/ISO.xml
But it seems that the permissions are equally incorrect:
ss01:/etc/libvirt/storage# cat ISO.xml
<!--
WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE
OVERWRITTEN AND LOST. Changes to this xml configuration should be made
using:
virsh pool-edit ISO
or other application using the libvirt API.
-->
<pool type='dir'>
<name>ISO</name>
<uuid>3c7b9f44-c81a-13c7-47cc-f9f317e848a9</uuid>
<capacity unit='bytes'>0</capacity>
<allocation unit='bytes'>0</allocation>
<available unit='bytes'>0</available>
<source>
</source>
<target>
<path>/space/isos</path>
<permissions>
<mode>0700</mode>
<owner>4294967295</owner>
<group>4294967295</group>
</permissions>
</target>
</pool>
This have to do with a bug when using libvirt on a 32-bit operating system?
http://www.redhat.com/archives/libvir-list/2012-November/thread.html#01048
Thanks for your reply.
Regards,
Daniel
--
Ing. Daniel Bareiro - GNU/Linux registered user #188.598
Proudly running Debian GNU/Linux with uptime:
18:15:40 up 18 days, 4:39, 12 users, load average: 0.09, 0.08, 0.06
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-libvirt-maintainers/attachments/20130602/6980b859/attachment.pgp>
More information about the Pkg-libvirt-maintainers
mailing list