Autostarted Power up failed ...

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
MorseCode65
Posts: 17
Joined: 21. Mar 2020, 01:17

Autostarted Power up failed ...

Post by MorseCode65 »

I am unable to autostart my Ubuntu 20.04 VM. I followed the instructions on the VirtualBox website. The VM boots without issue if I use the VirtualBox app.

Any ideas on how to proceed?

Here is my log file entry

00:00:04.931179 VirtualBox VM 6.1.22 r144080 darwin.amd64 (Apr 28 2021 18:46:07) release log
00:00:04.931194 Log opened 2021-06-13T14:53:40.107492000Z
00:00:04.931195 Build Type: release
00:00:04.931204 OS Product: Darwin
00:00:04.931209 OS Release: 20.4.0
00:00:04.931213 OS Version: Darwin Kernel Version 20.4.0: Fri Mar 5 01:14:14 PST 2021; root:xnu-7195.101.1~3/RELEASE_X86_64
00:00:04.931279 DMI Product Name: iMac17,1
00:00:04.931309 DMI Product Version: 1.0
00:00:04.931312 Firmware type: failed - VERR_NOT_SUPPORTED
00:00:04.931319 Host RAM: 24576MB (24.0GB) total, 22485MB (21.9GB) available
00:00:04.931321 Executable: /Applications/VirtualBox.app/Contents/MacOS/VBoxHeadless
00:00:04.931321 Process ID: 1031
00:00:04.931322 Package type: DARWIN_64BITS_GENERIC
00:00:04.933532 Installed Extension Packs:
00:00:04.933548 Oracle VM VirtualBox Extension Pack (Version: 6.1.22 r144080; VRDE Module: VBoxVRDP)
00:00:04.934377 Console: Machine state changed to 'Starting'
00:00:08.478622 Console: Machine state changed to 'PoweredOff'
00:00:08.480421 Power up failed (vrc=VINF_SUCCESS, rc=NS_ERROR_FAILURE (0X80004005))
Last edited by scottgus1 on 4. Jul 2021, 14:20, edited 2 times in total.
Reason: changed topic title to reflect problem
MorseCode65
Posts: 17
Joined: 21. Mar 2020, 01:17

Re: Power up failed ...

Post by MorseCode65 »

Ping

From VBoxManage showvminfo:
Autostart Enabled: enabled
Autostart Delay: 0

Any ideas?
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Autostarted Power up failed ...

Post by scottgus1 »

I'd wager that there are some permissions to be extended. Regrettably, I don't know what permissions to check.
MorseCode65
Posts: 17
Joined: 21. Mar 2020, 01:17

Re: Autostarted Power up failed ...

Post by MorseCode65 »

Thanks Scott. I cannot find any permissions that are off. I did recheck all the scripts and tried to manually autostart. Here is my output:
% /Applications/VirtualBox.app/Contents/MacOS/VBoxAutostart --start --verbose --config /etc/vbox/autostart.cfg
Oracle VM VirtualBox Autostart 6.1.22
(C) 2021 Oracle Corporation
All rights reserved.

00:00:00.000709 main VirtualBox Autostart 6.1.22 r144080 darwin.amd64 (Apr 28 2021 18:46:07) release log
00:00:00.000713 main Log opened 2021-07-07T11:00:40.825525000Z
00:00:00.000714 main Build Type: release
00:00:00.000731 main OS Product: Darwin
00:00:00.000736 main OS Release: 20.4.0
00:00:00.000740 main OS Version: Darwin Kernel Version 20.4.0: Fri Mar 5 01:14:14 PST 2021; root:xnu-7195.101.1~3/RELEASE_X86_64
00:00:00.000934 main DMI Product Name: iMac17,1
00:00:00.000980 main DMI Product Version: 1.0
00:00:00.000983 main Firmware type: failed - VERR_NOT_SUPPORTED
00:00:00.001010 main Host RAM: 24576MB (24.0GB) total, 8915MB (8.7GB) available
00:00:00.001012 main Executable: /Applications/VirtualBox.app/Contents/MacOS/VBoxAutostart
00:00:00.001012 main Process ID: 74313
00:00:00.001013 main Package type: DARWIN_64BITS_GENERIC
00:00:00.001041 main Setting up ...
00:00:00.002773 main IPC socket path: /tmp/.vbox-davidmorsberger-ipc/ipcd
VBoxAutostart: error: The machine 'Ubuntu_Desktop_20.04 MMP Mail' is already locked by a session (or being locked or unlocked)
VBoxAutostart: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component MachineWrap, interface IMachine, callee nsISupports
VBoxAutostart: error: Context: "LaunchVMProcess(g_pSession, Bstr("headless").raw(), ComSafeArrayNullInParam(), progress.asOutParam())" at line 141 of file VBoxAutostartStart.cpp
00:00:00.010021 main Shutting down ...
This seems to imply that it is finding the right VM to autostart.

I once read about grub timing out waiting for a human response. I cannot find that again. Possibly dreaming :)
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Autostarted Power up failed ...

Post by scottgus1 »

MorseCode65 wrote:VBoxAutostart: error: The machine 'Ubuntu_Desktop_20.04 MMP Mail' is already locked by a session (or being locked or unlocked)
This seems to imply, if I read it correctly, that the VM is already being started by something else. I may be wrong, but was there some other autostart experiment that may still be being tried?
MorseCode65
Posts: 17
Joined: 21. Mar 2020, 01:17

Re: Autostarted Power up failed ...

Post by MorseCode65 »

My latest message was to show that the autostart files and scripts are setup correctly. It executes correctly when the VM is already running and doesn't on boot.

I have narrowed it down to a USB drive that the VM depends on for backups is not mounted on boot. It is not mounted when I only long in via ssh. The disk is mounted after I log in via the Mac desktop.

I'm trying to figure out how to mount a boot a USB drive in Big Sur. There is no fstab or other Unix/Linux standard facilities to mount the USB disk at boot. I am having a hard time figuring out how Apple has "improved" the process.

Anyone have any ideas on how to mound a USB disk on boot of Big Sur?
paulmc
Posts: 72
Joined: 28. Aug 2019, 18:43
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Mac OS X, Linux, Windows
Location: Earth (Guyana / USA / South Africa)
Contact:

Re: Autostarted Power up failed ...

Post by paulmc »

@MorseCode65, there is a long-standing Mac system setting that enables mounting external volumes on boot without requiring user login. I myself am still using this setting under macOS 10.13 'High Sierra', although I'm not sure whether it would still work in macOS 11 'Big Sur'.

If you'd like to try this out, it just involves creating a standard property-list file in the directory '/Library/Preferences/SystemConfiguration/', named 'autodiskmount.plist', containing a single boolean entry whose key 'AutomountDisksWithoutUserLogin' is set to true. For details, please refer to various relevant sources online, such as the Apple Support Communities thread 'Mount external hard drive on boot', specifically the last post by Geosan.
MorseCode65
Posts: 17
Joined: 21. Mar 2020, 01:17

Re: Autostarted Power up failed ...

Post by MorseCode65 »

@paulmc, thank you for info on AutomountDisksWithoutUserLogin. I cannot find info on support for Big Sur but, I am still looking. I am not into trial-and-error / set-and-check on boot parameters. I will report back with what I find.

I do get the following when I try and read the default parameter (numerous sites say it defaults to 'false')

sudo defaults read /Library/Preferences/SystemConfiguration/autodiskmount
2021-07-13 05:42:45.493 defaults[99904:3288980]
Domain /Library/Preferences/SystemConfiguration/autodiskmount does not exist

and the following returns nothing

sudo defaults read | grep -i mount
paulmc
Posts: 72
Joined: 28. Aug 2019, 18:43
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Mac OS X, Linux, Windows
Location: Earth (Guyana / USA / South Africa)
Contact:

Re: Autostarted Power up failed ...

Post by paulmc »

@MorseCode65, yes, the "domain … does not exist" result is normal when there's no 'autodiskmount.plist' file (here the "domain") in the referenced directory {which IIRC is the case in most, if not all, OS versions}. If that plist file does not exist, then the system should behave as usual, i.e., deferring external mounts until a user logs in. {OTOH, if that plist file does exist, but the 'AutomountDisksWithoutUserLogin' key is not present in it, or is set to false, then I also have a vague memory about some folks reporting in the past that the system might behave in unexpected ways … It would probably be best to either not have the plist file at all, or to have that key set to true.}

As to globally filtering prefs keys & values, the 'defaults' command mightn't really be suited to searching prefs outside those of the current user {although, of course, it can search a single arbitrary domain when supplied with a plist file's explicit pathname stem}. I believe that even applying superuser ('sudo') privileges to try & access all prefs would actually only see those of the root user (here treated as any other user), usually in '/var/root/Library/Preferences/' if any. Even if the command could be told to consider all prefs spheres (System, Network, Local & User), a file such as 'autodiskmount.plist' that's deeper in a subfolder would likely still not be seen. {Indeed, the fact that standard prefs are currently stored in plist files at all, located within designated '*/Library/Preferences' folders, is what Apple would no doubt term a changeable "implementation detail". ;-)}

[BTW, on a more technical note, just from a quick look into Apple's Open Source repository {for its core Darwin OS layer, etc.} there's a good chance this special mounting mechanism is still supported in Big Sur. The latest macOS 11.4 source branch has a DiskArbitration-342.120.1 component and its 'diskarbitrationd' sub-component, which in turn has a 'DASupport.c' source file that still does contain hard-coded references to an 'autodiskmount.plist' file. {Also, note that the '___PREFS_DEFAULT_DIR' constant, used to build its full pathname in the first 'stat(…)' function call, is defined (in the 'DABase.h' header file) as "/Library/Preferences/SystemConfiguration". Later, in the 'SCPreferencesCreate(…)' function call, the constant isn't needed, because the dir path is a default that's built-in to the SystemConfiguration (SC) framework.}]
Post Reply