emulators/qemu-guest-agent: qemu-ga will not launch thaw operation
@fraenki is already working on this.
Since Aug 4, 2024.
- Dominant language
- PHP
- Stars
- 1.2k
- Forks
- 863
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 10
Description
Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
- I have read the contributing guide lines at https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md
- I have searched the existing issues, open and closed, and I'm convinced that mine is new.
- The title contains the plugin to which this issue belongs
Describe the bug
I'm trying to make a fsfreeze-hook script for OPNSense to have quiesce when backing up on KVM hosts.
I've noticed that 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.
To Reproduce
Steps to reproduce the behavior:
- Create the following file in
/usr/local/etc/qemu/fsfreeze-hook
#!/bin/sh
case "$1" in
"freeze")
echo "FREEZE" >> /tmp/fsfreze
;;
"thaw")
echo "THAW" >> /tmp/fsfreze
;;
esac
- Make the file executable
- Stop qemu-guest-agent service
- Run it manually in order to add
-Foption which will call the above script, eg run/usr/local/bin/qemu-ga -F -d -v -l /var/log/qemu-ga.log - On the KVM host, run
virsh snapshot-create <domain> --disk-only --atomic --quiesce - Look into file
/tmp/fsfreeze, it will containFREEZE - Run the snapshot command again on KVM host
- libvirt will complain with
error: internal error: unable to execute QEMU agent command 'guest-fsfreeze-freeze': filesystems have already frozen - 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
OPNsense 24.7_9 (amd64)
qemu-guest-agent 9.0.1
Host:
AlmaLinux 9.4
libvirt-daemon-kvm 10.0.0-6.6
qemu-kvm 8.2.0-11
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.