Hi,

I've already asked this question on the libvirt-users mailing list but got no 
answer. I think because the answer to my question is not obvious. I hope I get 
some help here...

Currently, for making backups of my guests, I use external snapshots like this:
A) virsh snapshot-create-as --domain PCVIRTdra --disk-only --atomic --quiesce 
--no-metadata --diskspec vda,file=/srv/poolVMS/PCVIRTdra-ONDERHOUD

If I wanted to use a logical volume as destination behind the '--diskspec' 
option, can I do this like this?
B) virsh snapshot-create-as --domain PCVIRTdra --disk-only --atomic --quiesce 
--no-metadata --diskspec vda,file=/dev/CmsrvVH3-vg/PCVIRTdra-ONDERHOUD

I got the hit from libvirt itself. If I create a snapshot with command A and 
the diskspec file already exists, libvirt gives me an error like:
" external snapshot file for disk vda already exists and is not a block device: 
/srv/poolVMS/PCVIRTdra-ONDERHOUD"

So the 'and is not a block device' gave me the idea to use a logical volume 
instead of a file

It seems to work, but if this is never intended to be used like this, I would 
rather not... 

I ask this question because it seems libvirt is actually recognizing the 
logical volume as a file if I use command B:

root@CmsrvVH3:~# virsh domblklist PCVIRTdra --details
Type       Device     Target     Source
------------------------------------------------
file       disk       vda        /dev/CmsrvVH3-vg/PCVIRTdra-ONDERHOUD
file       cdrom      hdb        /srv/poolVMS/Windows10_x64.iso
file       cdrom      hdc        /srv/poolVMS/virtiodrivers.iso

Is this intentional? Is there a better way of doing this?

Thanks in advance,

Dominique.

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to