Shut down Ubuntu Server running in headless VirtualBox


oxweiwei

I'm running Ubuntu Server VBoxHeadlesswith . How can I send an ACPI shutdown signal through VirtualBox and have Ubuntu Server respect it and obey the shutdown signal?

thanks

If you want to shut down the guest Ubuntu, you have two options:

Turn off the guest using VBoxManage

The virtual machine can be controlled from the command line using VBoxManagecommand line tools :

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

To power down via ACPI, the virtual OS must be able to do this, VirtualBox may also need to enable ACPI support for the VM.

  • Enable VirtualBox ACPI options:

    VBoxManage Modifyvm [nameofmachine] --acpi开启
  • Install ACPI support in the Ubuntu VM:

    sudo apt-get install acpid

Shut down the guest from SSH

If you have SSH access, it is safer to shut down the computer

user@virtualmachine: sudo poweroff

This will ensure a safe shutdown of the guest OS and power it off.

Related


Running Chromedriver headless on Ubuntu server

John Bartlett: I'm using Selenium with Chromedriver in Java (1.8) to do some automated web crawling: System.setProperty("webdriver.chrome.driver", "chromedriver.exe"); WebDriver driver = new ChromeDriver(); driver.get("someurl.com"); I am trying to migrate to

Shut down the ExecutorService of a running task

Xavi Lopez I am using single thread ScheduledExecutorServicefor some Runnabletasks. When I'm Runnabledone, it reschedules itself ScheduledExecutorServicewith a variable delay . Happens indefinitely until Runnablecaught Exception. public class Runner { Sc

Running Chromedriver headless on Ubuntu server

John Bartlett: I'm using Selenium with Chromedriver in Java (1.8) to do some automated web crawling: System.setProperty("webdriver.chrome.driver", "chromedriver.exe"); WebDriver driver = new ChromeDriver(); driver.get("someurl.com"); I am trying to migrate to

Automatically shut down Ubuntu

Zhivko Stoimtsev Is it possible to set some kind of script to automatically shut down the computer at a specific time (eg 10pm). I am running Ubuntu 18.04 pilot 6 you can add 0 22 * * * root poweroff to/etc/crontab This will shut down the computer every night

Ubuntu Server 18.04 shut down

Fazal Shahul Currently running ubuntu server 18.04. How can I modify the power button behavior? I want my system to shut down when I press the power button. Edit: It's a headless unit, so no GUI, preferred method terminal. fall Edit the file /etc/acpi/powerbtn

How to rescue Ubuntu Server 16.04 shut down by systemd script?

h_uat I wrote a program that automatically shuts down a Raspberry Pi 3b (Ubuntu Server 16.04) once a button is pressed. It's nothing more than a small bash script that reads the Pi's GPIO pins every second and turns off the device when the button is pressed. H

Shut down Ubuntu Server running in headless VirtualBox

oxweiwei I'm running Ubuntu Server VBoxHeadlesswith . How can I send an ACPI shutdown signal through VirtualBox and have Ubuntu Server respect it and obey the shutdown signal? thanks If you want to shut down the guest Ubuntu, you have two options: Turn off the

How to shut down a Linux server after running for 60 minutes?

jmhostalet I have a server that is normally down for security reasons. When I want to work on it, I turn it on, do the task, and turn it off again. My assignments are usually no longer than 15 minutes. I would like to implement a mechanism to automatically tur

How to shut down a Linux server after running for 60 minutes?

jmhostalet I have a server that is normally down for security reasons. When I want to work on it, I turn it on, do the task, and turn it off again. My assignments are usually no longer than 15 minutes. I would like to implement a mechanism to automatically tur

VirtualBox Ubuntu 12.04 LTS guest won't shut down

Leo I have a virtualbox guest running Ubuntu 12.04 LTS. The host is also Ubuntu 12.04 LTS. Virtualbox is running, version 4.3.10 When I run in the guest and click the close button, nothing happens. I can shut down the guest by shutting down immediately. Basica

How To Completely Shut Down MySQL Server On Ubuntu Server

east side development I have mysql server running. I stopped it, and removed it (apt-get remove mysql-server mysql-client) Then, I manually deleted the directory: /var/lib/mysql /var/run/mysqld I rebooted. However, when I type mysql, I get the following messa

Unable to shut down Ubuntu

bio shark I am using Ubuntu 12.04 . I've been away for a few weeks, and after logging in, updated the system to the latest update as usual. However, now I can't close anymore. Every time I try, I end up freezing the Ubuntu screen. I can only do a forced shutdo

How to automatically start and shut down a VirtualBox computer?

Stark I need to run a software system designed to be installed as a device on a dedicated computer. To save energy, I plan to run the system on a VirtualBox VM. The host is a standard Linux set-top box with a SysV-Init system, the guest is a heavily modified L

Shut down the ExecutorService of a running task

Xavi Lopez I am using single thread ScheduledExecutorServicefor some Runnabletasks. When I'm Runnabledone, it reschedules itself ScheduledExecutorServicewith a variable delay . Happens indefinitely until Runnablecaught Exception. public class Runner { Sc

Shut down the ExecutorService of a running task

Xavi Lopez I am using single thread ScheduledExecutorServicefor some Runnabletasks. When I'm Runnabledone, it reschedules itself ScheduledExecutorServicewith a variable delay . Happens indefinitely until Runnablecaught Exception. public class Runner { Sc

headless ubuntu server with desktop gui running gpu

Akime I ordered a dedicated (headless) server with an nvidia GeForce GT 710B GPU at ikoula (offsite datacenter). Now I'm trying to run a full desktop gui on it so that I can actually run what I want to run on it (streaming AI uses OBS to learn tasks). I have a

headless ubuntu server with desktop gui running gpu

Akime I ordered a dedicated (headless) server with an nvidia GeForce GT 710B GPU at ikoula (offsite datacenter). Now I'm trying to run a full desktop gui on it so that I can actually run what I want to run on it (streaming AI uses OBS to learn tasks). I have a

Running Chromedriver headless on Ubuntu server

John Bartlett: I'm using Selenium with Chromedriver in Java (1.8) to do some automated web crawling: System.setProperty("webdriver.chrome.driver", "chromedriver.exe"); WebDriver driver = new ChromeDriver(); driver.get("someurl.com"); I am trying to migrate to

Running Chromedriver headless on Ubuntu server

John Bartlett: I'm using Selenium with Chromedriver in Java (1.8) to do some automated web crawling: System.setProperty("webdriver.chrome.driver", "chromedriver.exe"); WebDriver driver = new ChromeDriver(); driver.get("someurl.com"); I am trying to migrate to

How to rescue Ubuntu Server 16.04 shut down by systemd script?

h_uat I wrote a program that automatically shuts down a Raspberry Pi 3b (Ubuntu Server 16.04) once a button is pressed. It's nothing more than a small bash script that reads the Pi's GPIO pins every second and turns off the device when the button is pressed. H

Shut down Ubuntu Server running in headless VirtualBox

oxweiwei I'm running Ubuntu Server VBoxHeadlesswith . How can I send an ACPI shutdown signal through VirtualBox and have Ubuntu Server respect it and obey the shutdown signal? thanks If you want to shut down the guest Ubuntu, you have two options: Turn off the

VirtualBox Ubuntu 12.04 LTS guest won't shut down

Leo I have a virtualbox guest running Ubuntu 12.04 LTS. The host is also Ubuntu 12.04 LTS. Virtualbox is running, version 4.3.10 When I run in the guest and click the close button, nothing happens. I can shut down the guest by shutting down immediately. Basica

How To Completely Shut Down MySQL Server On Ubuntu Server

east side development I have mysql server running. I stopped it, and removed it (apt-get remove mysql-server mysql-client) Then, I manually deleted the directory: /var/lib/mysql /var/run/mysqld I rebooted. However, when I type mysql, I get the following messa

How to shut down a Linux server after running for 60 minutes?

jmhostalet I have a server that is normally down for security reasons. When I want to work on it, I turn it on, do the task, and turn it off again. My assignments are usually no longer than 15 minutes. I would like to implement a mechanism to automatically tur

Unable to shut down Ubuntu

bio shark I am using Ubuntu 12.04 . I've been away for a few weeks, and after logging in, updated the system to the latest update as usual. However, now I can't close anymore. Every time I try, I end up freezing the Ubuntu screen. I can only do a forced shutdo

Ubuntu 14 Server on Mac Pro won't shut down on shutdown

Matthew James Briggs I have tried this Ubuntu 14.04 stuck at shutdown But that didn't help. That GRUB_CMDLINE_LINUX_DEFAULTsetting didn't actually work for me, so I added it. Now I see a "splash screen" (server style) on shutdown, but the computer still won't

headless ubuntu server with desktop gui running gpu

Akime I ordered a dedicated (headless) server with an nvidia GeForce GT 710B GPU at ikoula (offsite datacenter). Now I'm trying to run a full desktop gui on it so that I can actually run what I want to run on it (streaming AI uses OBS to learn tasks). I have a