R
R
rechmp2017-03-07 19:47:24
System administration
rechmp, 2017-03-07 19:47:24

What is the correct way to shut down Virtualbox when shutting down the main OS?

I have a windows server running ubuntu server under Virtualbox.
Every time you need to turn off all the equipment, you have to connect to the guest OS, turn it off, and then the main one - it's very inconvenient. Is it possible to force the main OS to send a shutdown signal to the guest system and only after that extinguish the main one?
The question is relevant when using a UPS, which can only turn off the main one at a low discharge, and using a wife who can (when necessary) turn it off only by pressing a physical button.
I would be grateful for help.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
nirvimel, 2017-03-07
@rechmp

In the guest OS, /etc/acpi/powerbtn.shregister shutdown -h now
In the host-OS, executeVBoxManage controlvm Ubuntu acpipowerbutton

D
dennzo, 2018-10-03
@dennzo

VBoxVmService
The open source virtualization software VirtualBox is lacking an option to run virtual
machines as a Windows NT/XP/2003/W7/W8x service entity. VBoxVmService does the trick!
https://sourceforge.net/projects/vboxvmservice/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question