[libvirt] Storage volume

Jaromír Červenka cervajz at cervajz.com
Fri Oct 1 03:43:39 UTC 2010


Thank you Justin. How could I forget "pool-refresh"!? I knew, that exists
some clean and easy solution :)

Jaromír.

Dne 30. září 2010 16:18 Justin Clift <jclift at redhat.com> napsal(a):

> On 09/30/2010 11:25 PM, Jaromír Červenka wrote:
>
>> Hello,
>>
>> is there any way, how to create storage volume from existing qcow2 image
>> file? I have XML description for this new volume and image which was used
>> without xml. But when I tried "vol-create" it automatically deleted this
>> file and created new one.
>>
>
> Hi Jaromír,
>
> If it helps, the way I normally do it is to copy the qcow2 image file into
> a new pool, then refresh the pool.
>
> When the pool is refreshed, it notices the new qcow2 file,
> automatically creating the internal XML for it and making it available.
>
> ie.  (this is just my typing from memory, so you may need to tweak it)
>
>  $ sudo cp myimage.qcow2 /var/lib/libvirt/images
>  $ sudo virsh pool-refresh default
>  $ sudo virsh vol-list default
>  <a list of volumes in the pool should be shown, including the new one>
>
> Does that achieve what you're after?
>
> Regards and best wishes,
>
> Justin Clift
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20101001/c37c5ba1/attachment-0001.htm>


More information about the libvir-list mailing list