ACPI power button at GDM login, Solaris 11.3

Skip to first unread message

Richard L. Hamilton

Jun 14, 2020, 3:05:04 AM6/14/20
For a VirtualBox guest (on a Mac, not that it should matter) running
Solaris 10 (I think), and Solaris 11.4, the command

VBoxManage controlvm _vmname_ acpipowerbutton

works (initiates shutdown) regardless of whether the console is in text mode
or running a GUI login (dtlogin or gdm).

On Solaris 11.3 it only works for me at the text console. This isn't a killer,
because I rarely log in at the GUI console on that. But it is annoying that
it's the exception among OSs I have under VirtualBox in terms of not always
being able to initiate a clean shutdown that way.

Is there something I can check or tweak to investigate further, or
hopefully make it work either way? I think I tried the GUI settings
application, but although it had a checkbox (I think it was) for the
power button, it didn't seem to do anything useful, and at best, I
suspect it would only work if I were logged into the GUI environment,
not if it was sitting at the GDM login screen.

One of the reasons I want that to work, is that I have a ksh93 script
that knows how to use VirtualBox commands, Parallels commands, ldm
(SPARC) commands, and zoneadm commands to start, stop, show status,
show what the script know about the VM, and in some cases do a few
other things (suspend, resume, reset, console) with VMs/LDOMs/zones
via those respective commands. Yeah, that's for use @ home; I know it
wouldn't scale to hundreds or thousands of VMs, but for (at the
moment) 21 assorted VMs, LDOMs, and zones, it's a heck of a lot easier
than remembering what's where with which commands to control it.

Thus, ideally I can just say

vm start _vmname_
vm stop _vmname_

and it knows what host the VM is on, which set of commands to use for
it, etc. I'd simply like that at a minimum, stop worked reliably for
all of them (start already is fine). The only _clean_ shutdown with
VirtualBox seems to me the acpipowerbutton approach. I could of course
say that since the VM is Solaris, I could just

ssh root@_vmname_ exec shutdown -i5 -y -g0

but that's tacky, IMO, although I do have an as-yet unused data
structure in my script to accomodate certain guest OS commands (which
may vary between e.g. Linux, macOS, Solaris, and Windows).
Reply all
Reply to author
0 new messages