Date: Sun, 04 Aug 2024 16:14:42 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 280615] emulators/qemu qemu-ga will not launch thaw operation after freeze on guests Message-ID: <bug-280615-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D280615 Bug ID: 280615 Summary: emulators/qemu qemu-ga will not launch thaw operation after freeze on guests Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: Individual Port(s) Assignee: bofh@freebsd.org Reporter: ozy@netpower.fr Flags: maintainer-feedback?(bofh@freebsd.org) Assignee: bofh@freebsd.org I have multiple FreeBSD VMs running on linux KVM hosts. I'm trying to make a fsfreeze-hook script on a FreeBSD VM to have quiescing when backing up on KVM hosts. I've noticed that guest's qemu-ga will launch the fsfreeze-hook with freeze argument, but won't run it again with thaw argument until a new snapshot is made, hence rendering the script useless. Steps to reproduce the behavior, on the FreeBSD guest: 1. Create the following file in /etc/qemu/fsfreeze-hook #!/bin/sh case "$1" in "freeze") echo "FREEZE" >> /tmp/fsfreze ;; "thaw") echo "THAW" >> /tmp/fsfreze ;; esac 2. Make the file executable 3. Run qemu-ga manually and specify the path to the script, eg run /usr/bin/qemu-ga -F/etc/qemu/fsfreeze-hook -d -v -l /var/log/qemu-ga.log 4. On the KVM host, run virsh snapshot-create <domain> --disk-only --atomic --quiesce 5. On guest, look into file /tmp/fsfreeze, it will contain FREEZE. So the freeze operation has run, but no thaw operation has been requested. 6. Run the snapshot command again on KVM host 7. libvirt will complain with error: internal error: unable to execute QEMU agent command 'guest-fsfreeze-freeze': filesystems have already frozen 8. On guest, look into file tmp/fsfreeze, it will contain FREEZE FREEZE THAW Expected behavior At the end of the snapshot process, qemu-ga should call fsfreeze-hook script with 'thaw' argument. But it runs it only on second (failed) attempt. Running the freeze/thaw hooks on other guests work. Environment: Host: Almalinux 9.4 on intel x64 with qemu-kvm 8.2.0-11 and libvirt-daemon-= kvm 10.0.0-6.6 Guest: FreeBSD 14.1-RELEASE-p2 with qemu-ga 9.0.1 --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-280615-7788>