Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
23
rated 0 times [  23] [ 0]  / answers: 1 / hits: 26348  / 2 Years ago, fri, november 11, 2022, 2:10:55

I'm running Ubuntu Server using VBoxHeadless. How do I send ACPI shutdown signal through VirtualBox and make Ubuntu Server respect it and comply with the shutdown signal?


More From » server

 Answers
2

If you want to shutdown the guest Ubuntu you have two options:



Shutting down a guest using VBoxManage



A virtual machine can be controlled by command line using the VBoxManage command line tool:



VBoxManage controlvm [nameofmachine] savestate       # saves the state of the VM like in suspend
VBoxManage controlvm [nameofmachine] poweroff # simply "unplugs" the VM
VBoxManage controlvm [nameofmachine] acpipowerbutton # sends ACPI poweroff signal


For power off by ACPI the virtual OS needs to be capable to do so, and VirtualBox may also need to enable ACPI support for the VM.




  • Enable VirtualBox ACPI options:



    VBoxManage modifyvm [nameofmachine] --acpi on

  • Install ACPI support in the Ubuntu VM:



    sudo apt-get install acpid



Shutting down guest from SSH



A safer way to shut down the machine in case you have SSH access woud be to issue



user@virtualmachine: sudo poweroff


This will take care to safely shut down and poweroff your guest OS.


[#41864] Saturday, November 12, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
oleard

Total Points: 344
Total Questions: 105
Total Answers: 113

Location: Bonaire
Member since Tue, Sep 20, 2022
2 Years ago
;