[libvirt-users] Unable to autostart storage pool.

Matthias Bolte matthias.bolte at googlemail.com
Fri Aug 27 22:16:43 UTC 2010


2010/8/27 Sharad Mishra <snmishra at us.ibm.com>:
> Following xml file was used to create storage pool using 'virsh pool-create
> <xml>'
>
> <pool type='dir'>
> <name>my-diskpool</name>
> <uuid>2fbc894e-7619-6cda-a33c-b27fae5fbe8b</uuid>
> <capacity>136024670208</capacity>
> <allocation>11416657920</allocation>
> <available>124608012288</available>
> <source>
> <host name='localhost'/>
> </source>
> <target>
> <path>/var/lib/libvirt/images</path>
> <permissions>
> <mode>0700</mode>
> <owner>0</owner>
> <group>0</group>
> </permissions>
> </target>
> </pool>
>
> The command succeeds and a pool is created -
>
> # virsh pool-list --all
> Name State Autostart
> -----------------------------------------
> my-diskpool active no
>
>
> When I try to set it up for autostart, I get -
>
> # virsh pool-autostart my-diskpool
> error: failed to mark pool my-diskpool as autostarted
> error: invalid argument in pool has no config file
>
> Why is it failing to autostart?
>
> /etc/libvirt/storage has no xml file.
>

'virsh pool-create <xml>' creates a transient pool, that has no
persistent config on disk. Such a pool cannot be autostarted, because
it's gone when you call pool-destroy on it.

In order to have an autostartable pool you need to 'virsh pool-define
<xml>' the pool, this creates a pool with a persistent config in
/etc/libvirt/storage.

Matthias




More information about the libvirt-users mailing list