Re: controlled shutdown of VMs by ups software, before shutting sown the host
- In reply to: Paul Vixie : "Re: controlled shutdown of VMs by ups software, before shutting sown the host"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 26 Oct 2026 17:23:46 UTC
Hi Paul, On Mon, Oct 26, 2026 at 08:31:50AM -0700, Paul Vixie wrote: >these things are semi-synchronous. if you need actual synchrony you'll have to do it in >your own logic. as in, reach into the guest from the host and stop various processes >before sending its bhyve a SIGTERM on the host. most of us seem to be in "hope for the >best" mode on the topic. Thank you for your considered reply. I was thinking, maybe a workaround might be perhaps make a script that does something like % bhyvectl --suspend=filename which has the benefit of making a snapshot and then shutting the vm down. The full context in this one instance: * bhyve runs an ubuntu vm guest which runs a nextcloud snap * power is via line-interactive UPS. There's a usb control cable btwn a rpi3b+ (freebsd15 here) and the APC Back_UPS Pro 1500. * the bhyve server (runs -current) is plugged into the ups. * there's other stuff plugged into the ups, some of it without a regular OS like routers and switches I want a controlled shutdown of all VMs and the server when UPS capacity gets down to 5%. Maybe I'm overthinking this or thinking the wrong way. If I'm in the office, when power goes down I'll turn off the VM and the server normally. Looking to monitor the UPS and then automatically safely shut down. Maybe the way to go is snmp, not sure if this ups will do that though. Maybe NUT is the way to go but it looks quite complex to set up. That might connect into the VM, shut it down, then shut down the server. -- void<at>f-m.fm | GPG fingerprint: BD97 5B52 1B78 B7A9 AFFE 7DD4 FD32 D1F9 0814 DECD Please don't Cc: as I'm already subscribed to the list.