From: Roman Bogorodskiy Date: Sun, 20 Jul 2025 13:55:07 +0000 (+0200) Subject: bhyve: don't reset domain autostart flag on destroy X-Git-Tag: v11.6.0-rc1~72 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=37fb778e5338b6700d8b3165adb35e2a4c8fc083;p=thirdparty%2Flibvirt.git 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 Reviewed-by: Michal Privoznik def->name); - virDomainDeleteConfig(BHYVE_STATE_DIR, NULL, vm); + bhyveProcessRemoveDomainStatus(BHYVE_STATE_DIR, vm->def->name); return ret; }