[libvirt] [PATCH] Install default storage pool

Cole Robinson crobinso at redhat.com
Wed Aug 6 21:10:23 UTC 2008


The attached patch adds a default pool definition to install
with libvirt. The pool is a directory pool, hardcoded to use
/var/lib/libvirt/images, though this is replaced with
%{_localstatedir}/lib/libvirt/images if installing via rpm.

Since /var/lib/libvirt/images may not exist if installing
from tar.gz, the pool is set not to autostart by default
via that method.

This patch isn't ready to apply though, since there is one
issue I don't know how to solve. We don't want every rpm
upgrade to install the default pool, since we don't want
the default to continually resurrect itself if a user
explicitly deletes it.

The default network handles this by checking if libvirtd
has been installed. Since libvirtd and virtual network
support were introduced around the same time, this makes
sense. However for storage, I can't think of any simple
check we can make. If we used the same as the default
network, all f8 or f9 upgrades wouldn't install the
default pool.

I can't really think of anything to check, besides maybe
doing some sort of time comparison on when 
/usr/share/libvirt/storage/default.xml was accessed. This
code is just hardcoded to always add it.

Any ideas?

Thanks,
Cole
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libvirt-default-pool.patch
Type: text/x-patch
Size: 5824 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20080806/6f04f907/attachment-0001.bin>


More information about the libvir-list mailing list