]> git.ipfire.org Git - thirdparty/libvirt.git/commit
bhyve: don't reset domain autostart flag on destroy
authorRoman Bogorodskiy <bogorodskiy@gmail.com>
Sun, 20 Jul 2025 13:55:07 +0000 (15:55 +0200)
committerRoman Bogorodskiy <bogorodskiy@gmail.com>
Mon, 21 Jul 2025 16:25:53 +0000 (18:25 +0200)
commit37fb778e5338b6700d8b3165adb35e2a4c8fc083
tree6560be8477445d7f4ff34f228f9959e4b4511706
parent3a39cfacc36b26be559ab6217fce2a44a2b15159
bhyve: don't reset domain autostart flag on destroy

Currently, virBhyveProcessStop() uses the virDomainDeleteConfig()
helper to clean up domain status. It passes BHYVE_STATE_DIR as
a configuration dir and NULL as autostart dir, so the helper does its
job, even though it has a different purpose. However, the issue is that
it also resets the autostart (and autostartOnce) property.

This results in a situation that when a persistent domain with autostart
enabled gets destroyed, its autostart state is reported as disabled,
which is not correct.

To fix that, implement the bhyveProcessRemoveDomainStatus() which
removes the status file without side effects on the virDomainObj object.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com
src/bhyve/bhyve_process.c