dguerri / LibVirtKvm-scripts

Libvirt/KVM scripts - online forward incremental backup for libvirt/KVM virtual machines
GNU General Public License v3.0
72 stars 25 forks source link

fails if a physical drive is attached to VM #39

Open michaelHH1 opened 6 years ago

michaelHH1 commented 6 years ago

Hi, I've a physical drive attached to my VM. The script fails with "'error: unsupported configuration: source for disk 'vde' is not a regular file; refusing to generate external snapshot name'". Could attached physical drives be excluded from the backup?

BR Michael

AJRepo commented 6 years ago

Possibly. What do you get with the command

virsh domblklist XXXX --details

where XXXX is the VM domain name or id ?

michaelHH1 commented 6 years ago

Type Device Target Source

file disk vda /media/backup/vm/homeserver/bimg-20180630-101135 block disk vde /dev/disk/by-uuid/B8D0061FD005E48A

As intermediate solution I've modified the script to: command_output=$($VIRSH -q snapshot-create-as "$domain_name" \ "$SNAPSHOT_PREFIX-$timestamp" --no-metadata --disk-only --diskspec vde,snapshot=no --atomic \

which is for sure to static as final solution