[libvirt-users] Snapshot of single block device

Hello! I have a guest with one qcow2 disk image (vda) and one physical partition (sda) from host. When I'm trying to get snapshot with: virsh snapshot-create-as ..... It fails with message: error: unsupported configuration: source for disk 'sda' is not a regular file; refusing to generate external snapshot name I understand, that it is not possible to make a snapshot of physical device, but it is enough for me to take snapshot of vda. How to force virsh to ignore sda ? best regards Jarek

On Wed, May 29, 2019 at 09:32:37 +0200, jarek wrote:
Hello!
I have a guest with one qcow2 disk image (vda) and one physical partition (sda) from host. When I'm trying to get snapshot with:
virsh snapshot-create-as .....
It fails with message: error: unsupported configuration: source for disk 'sda' is not a regular file; refusing to generate external snapshot name
According to this error message it looks like you are attempting to do an external snapshot, e.g. by using --disk-only. This is fortunate because external snapshots can be selected on a per disk basis:
I understand, that it is not possible to make a snapshot of physical device, but it is enough for me to take snapshot of vda. How to force virsh to ignore sda ?
--diskspec sda,snapshot=no

Hi, W dniu 29.05.2019, śro o godzinie 09∶55 +0200, użytkownik Peter Krempa napisał:
I understand, that it is not possible to make a snapshot of
physical device, but it is enough for me to take snapshot of vda. How to force virsh to ignore sda ?
--diskspec sda,snapshot=no
now it works, thanks a lot! best regards Jarek

On Wed, May 29, 2019 at 13:35:12 +0200, jarek wrote:
Hi,
W dniu 29.05.2019, śro o godzinie 09∶55 +0200, użytkownik Peter Krempa napisał:
I understand, that it is not possible to make a snapshot of
physical device, but it is enough for me to take snapshot of vda. How to force virsh to ignore sda ?
--diskspec sda,snapshot=no
now it works, thanks a lot!
By the way. You can also create a snapshot of sda, but you need to specify the destination of the overlay manually e.g.: --diskspec sda,file=/path/to/sda.snap.qcow2 Libvirt just does not want to generate the filename for block devices since we can't know where to put the snapshot.
participants (2)
-
jarek
-
Peter Krempa