Is there no one who has stumbled on to this problem running OpnSense in a Synology VM ?
I do have the OpnSense plugin "QEMU Guest Addon" installed. Even tried to re-install but same result.
Best regards
Dan Lundqvist (mrzaz)
Quote from: EdwinKM on October 01, 2022, 10:00:53 AM
Does Synology has some ACPI options to enable?
Nope, not that I have found.
It is based on a Intel Celeron J4125 2GHz but don't have access to any BIOS settings as it boots up nativly.
Have not found any settings for it in GUI.
I have even tried "shutdown -p now" from commandline in OPNsense and it still does not shutdown the VM as seen in the VM Manager in Synology. :-/
Have tried both legacy and UEFI....
It is a bit of a bummer. :-|
I am not saying it is a fault in OPNSense, don't get me wrong.
Bst regards
Dan Lundqvist
UPDATE:
Just as a test (to see if FreeBSD could shutdown VM in Synology at all) I installed latest pfSense in a VM.
An then tried to shutdown VM from Synology VM manager and it both started the shutdown in pfSense window also managed to shutdown completly so Synology VM and FreeBSD are able to do it.
I tested with the exact same VM for both installations just to compare apples and apples.
(yes, I know, opnsense vs pfsense battle/flamewar. Don't worry. I made the decision to go away from pfSense to opnsense and have no plans on going in the oposite direction. :-)
I checked the difference in FreeBSD version
OPNSense: FreeBSD 13.1-RELEASE-p5
pfSense: FreeBSD 12.3-STABLE
Conclusion:
pfSense on FreeBSD 12.3 stable are able to shutdown OK but opnsense on FreeBSD 13.1 p5 is not.
Reason unknown right now.
Same Synology HW/SW, Same VM BIOS, Same VM settings.
UPDATE2:
I have now tested the following to see if any of them works:
OPNsense 21.1 FreeBSD 12.1 (HardenedBSD) OK, shuts down and power off OK.
OPNsense 21.7 FreeBSD 12.1 (HardenedBSD) OK, shuts down and power off OK.
OPNsense 22.1 FreeBSD 13-STABLE NOK, does not power off.
OPNsense 22.7 FreeBSD 13.1-RELEASE NOK, does not power off.Conclusion: Something has changed between FreeBSD 12.1 -> FreeBSD 13 (and/or OPNsense 21.x -> 22.x) causing it to stop working in shutting it down when running in Synology Virtual VM. (QEMU/KVM). :-/
Found the following thread. Will try the settings to see if it helps.
https://forums.freebsd.org/threads/cannot-shutdown-reboot-after-upgrade-to-13-0-release.80199/
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253175
Disabling the USB interface seems helping it to get stuck in uhub0: detached indefinetly and is now able to shut down OK. Also added the tunable "hw.kern.efi.poweroff=0" but that on it's own did not help. Only by disabling USB interface.
Adding the tuneable "hw.usb.no_shutdown_wait=1" but did not help as long as I have USB hub enabled.
Only swithing USB hubb off helps it to truly shut down. Lucky for me I do not need the USB hub in my VM.
I think someone needs to look into this as it seems to be more people having same issue on FreeBSD 13 and it seems to be related to that
Seems like the issue is related to that it won't shutdown the VM. It waits at uhub0: detached indefinetly.
t seems there are situations in which a none USB related issue is at work (referring here to SirDice's post #3), preventing the machine to power off.
A comment regarding running in VirtualBox VM they stated
"Setting the VM's system chip set to ICH9 (instead of the default PIIX3), with enabled USB controller, and default hw.efi.poweroff=1 the VM powers off immediate after uhub0: detached.
Apparently there is a relation between the chip set in use and a complete power off of the VM."