VirtualBox

Opened 4 years ago

Closed 4 years ago

#19333 closed defect (invalid)

acpipowerbutton shutdown failing on Ubuntu

Reported by: chrisw Owned by:
Component: VM control Version: VirtualBox 6.0.16
Keywords: Cc:
Guest type: Linux Host type: Mac OS X

Description

I'm running Ubuntu 16.04 in a VirtualBox Virtual Machine on a MacOS Mojave host. I can start the VM on the command line:

VBoxManage startvm my_ubuntu --type headless

The recommended way of shutting a VM down is

VBoxManage controlvm my_ubuntu acpipowerbutton

however, that fails - the GUI shows a splash menu:

Goodbye, Chris, would you like to 

<the suspend / shutdown option image>

I've tried supressing this splash image using

sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target

and

gsettings set com.canonical.indicator.session suppress-shutdown-menuitem true
gsettings set com.canonical.indicator.session suppress-restart-menuitem true
gsettings set com.canonical.indicator.session suppress-logout-menuitem true
gsettings set com.canonical.indicator.session user-show-menu false

rebooting every time, but the splash screen still shows.

Is there anything else I can try? Or is this a bug with the acpipowerbutton command in VBoxManage?

(I can get round this by SSHing in, and running sudo shutdown, or by using the GUI, but both are less convenient)

I've also noticed that running sudo restart now results in:

restart: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused

I don't know if this is related, or a red herring...

I did wonder if this issue is an Ubuntu issue, rather than a VirtualBox one, but I've asked the question at https://askubuntu.com/questions/1210310/suppress-the-suspend-option-at-shutdown and haven't had a reply in a week...

Change History (1)

comment:1 by aeichner, 4 years ago

Resolution: invalid
Status: newclosed

Those things are usually better and faster handled in the forums at https://forums.virtualbox.org . This is an issue with Ubuntu, the acpipowerbutton just generates an event for the guest to act upon. How it acts is entirely dependent on the guest. For your Ubuntu 16.04 guest have a look here. You need to run

gsettings set org.gnome.settings-daemon.plugins.power button-power 'shutdown'

once in order to deactivate the dialog.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use