Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
Hardware and Performance
»
OpnSense in Synology VirtualManager VM does not shut down VM properly
« previous
next »
Print
Pages: [
1
]
Author
Topic: OpnSense in Synology VirtualManager VM does not shut down VM properly (Read 4946 times)
mrzaz
Newbie
Posts: 13
Karma: 1
OpnSense in Synology VirtualManager VM does not shut down VM properly
«
on:
August 11, 2022, 03:55:55 am »
Hello,
I am trying to run OpnSense in a Synology DS920+ Virtual Manager VM which works OK. No problems.
However, I have some issues with halting OpnSense. It halts Opnsense but does not halt the VM itself.
Tested from the GUI and CLI to shut down OpnSense.
Have tested to install the QEMU plugin in OpnSense but no difference.
- Operating System = Other (as i am installing a VM containing FreeBSD)
- Legacy BIOS
- Setup 2 vSwitch entries with WAN in one (LAN2) and LAN in the other (LAN1) and added 2 NICs. Both VirtIO.
- 1 CPU (during testing)
- videocard vga
- Normal priority
All works OK with the VM, just the halt that does not halt the VM itself, only the content of the VM (OpnSense).
Anyone have any ideas how to get this working OK ?
Best regards
Dan Lundqvist (mrzaz)
«
Last Edit: August 11, 2022, 04:01:13 am by mrzaz
»
Logged
Best regards
Dan Lundqvist (mrzaz)
"It's better to burn up, than fade away..." (Highlander)
mrzaz
Newbie
Posts: 13
Karma: 1
Re: OpnSense in Synology VirtualManager VM does not shut down VM properly
«
Reply #1 on:
September 29, 2022, 01:56:04 pm »
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)
Logged
Best regards
Dan Lundqvist (mrzaz)
"It's better to burn up, than fade away..." (Highlander)
EdwinKM
Full Member
Posts: 155
Karma: 5
Re: OpnSense in Synology VirtualManager VM does not shut down VM properly
«
Reply #2 on:
October 01, 2022, 10:00:53 am »
Does Synology has some ACPI options to enable?
Logged
mrzaz
Newbie
Posts: 13
Karma: 1
Re: OpnSense in Synology VirtualManager VM does not shut down VM properly
«
Reply #3 on:
January 28, 2023, 01:28:30 pm »
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."
«
Last Edit: January 29, 2023, 03:58:16 am by mrzaz
»
Logged
Best regards
Dan Lundqvist (mrzaz)
"It's better to burn up, than fade away..." (Highlander)
BiTRiP
Newbie
Posts: 30
Karma: 5
Re: OpnSense in Synology VirtualManager VM does not shut down VM properly
«
Reply #4 on:
May 31, 2023, 09:01:57 pm »
How did you make it bootable?
I'm trying to install Opnsense (23.1) in Synology Virtual Manager on a DS220+ with your settings.
I had to convert img to iso but it's not booting (could not read from cdrom error 0005)
What am i missing?
UPDATE: never mind, i was using the wrong image (not dvd image)
«
Last Edit: May 31, 2023, 09:17:45 pm by BiTRiP
»
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
Hardware and Performance
»
OpnSense in Synology VirtualManager VM does not shut down VM properly