Closed Unclezz closed 2 months ago
This Looks very Strange. It fails to get the Information wether if domain autostart setting is configured and the libvirt daemon resets the connection because the api call fails
Please Check your libvirt logs and try to get this setting via virsh.. there is something wrong on libvirt side
while it would be possible to submit Code to catch this error i would First like to know what causes it bcs ive Never Seen this issue Happening before
Checked libvirt logs and I do not see anything wrong. I am thinking if this is caused by some weird configuration of the restart behavior set by Cockpit...
The autostart setting is ususally stored in /etc/libvirt/qemu/autostart/
Afairc its just a file named like the vm
Could be Cockpit machines does something wrong here, the api call shouldnt fail this way
I am checking on a different VM while tail -f logs. Will also check the autostart stuff. Will keep you posted.
Details of the Cockpit implementation
this is what it looks like if i use cockpit-machines to set the autostart setting (debian 12)
root@radiohead ~/virtnbdbackup (master)$ ls -alh /etc/libvirt/qemu/autostart/
lrwxrwxrwx 1 root root 31 Aug 3 14:04 archlinux.xml -> /etc/libvirt/qemu/archlinux.xml
root@radiohead ~/virtnbdbackup (master)$
Its basically just a symlink to the vm configuration.
virsh dominfo archlinux | grep ^Autostart
Autostart: enable
virsh autostart archlinux
Domain 'archlinux' marked as autostarted
and the backup works w/o issues:
[2024-08-03 14:04:58] INFO root metadata - backupAutoStart [main]: Autostart setting configured for virtual machine.
[..]
[2024-08-03 14:04:58] INFO root virtnbdbackup - main [main]: Finished successfully
I think there was a glitch. Because I am arranging backups without issues as well. Now everything is finishing w/o errors.
Weird!
But thanks a lot for looking into this one in real time :)
Hello I am trying to use the script on a Debian 12.6. All the VMs were created/managed using Cockpit.
I launched the backup with folliwing command:
$ sudo virtnbdbackup -d-l auto -o /Backup/VM1
At the end of the process I got the following error:
If I check the directory, it seems that all backup files are there. To mention that I am creating the backup on a NFS mounted directory.
Is the above an error I should care about? The Guest saved is Home Assistant and it should be also coming with qemu-guest embedded.
Thanks!