VBoxManage startvm .. --type headless terminates unexpectedly: NS_ERROR_FAILURE 0x80004005

Discussions related to using VirtualBox on Linux hosts.
Post Reply
vpseg
Posts: 4
Joined: 11. Mar 2022, 23:04

VBoxManage startvm .. --type headless terminates unexpectedly: NS_ERROR_FAILURE 0x80004005

Post by vpseg »

Hello,

I am attempting to start Almalinux 8.5.20211208 virtual machines using vagrant 2.2.19 on my OpenSUSE Tumbleweed host using VirtualBox 6.1.32_SUSEr149290. When I (or the vagrant process) brings up a machine using VBoxManage, the VM fails to start:

Code: Select all

$> vagrant up
Bringing machine 'alma8' up with 'virtualbox' provider...
Bringing machine 'alma8-2' up with 'virtualbox' provider...
==> alma8: Checking if box 'almalinux/8' version '8.5.20211208' is up to date...
==> alma8: Clearing any previously set network interfaces...
==> alma8: Preparing network interfaces based on configuration...
    alma8: Adapter 1: nat
    alma8: Adapter 2: hostonly
==> alma8: Forwarding ports...
    alma8: 22 (guest) => 2222 (host) (adapter 1)
==> alma8: Running 'pre-boot' VM customizations...
==> alma8: Booting VM...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["startvm", "6825b98a-94cd-405b-aeb2-b4877b2319f0", "--type", "headless"]

Stderr: VBoxManage: error: The virtual machine 'env_alma8_1646842047978_22446' has terminated unexpectedly during startup with exit code 1 (0x1)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component MachineWrap, interface IMachine
This issue is also present if I run the command (VBoxManage startvm <uuid> --type headless) myself. I have found that starting this created VM in the VirtualBox GUI works, but only if I use "Show" (ie not headless or detached mode). I have also found other VMs to be temperamental about opening them using "Show" at least once when they're built (and some seem to require it every time, if my memory serves).

Guest additions have not been installed on the guest. Host and guest are 64 bit. Host is running linux 5.16.11-1-default. Please see attached for the VM settings and log file.

How can I make this VM start?

Thank you!
Attachments
alma8_log.tar.gz
(28.47 KiB) Downloaded 18 times
vminfo.txt
(5.39 KiB) Downloaded 22 times
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: VBoxManage startvm .. --type headless terminates unexpectedly: NS_ERROR_FAILURE 0x80004005

Post by scottgus1 »

vpseg wrote:This issue is also present if I run the command (VBoxManage startvm <uuid> --type headless) myself.
Kudos for testing Virtualbox directly! Vagrant-influenced Virtualbox isn't supported here, and a required test is to manually do in Virtualbox what Vagrant is trying to do. You've done that, though, thumbs up!
vpseg wrote:VirtualBox GUI works, but only if I use "Show" (ie not headless or detached mode).
I suspect "Show" should be "Start", since "Show" only appears when the VM is running 'headless'. "Start" runs the VM in full GUI mode with no detachability or headlessness possible.

I'm not sure of the problem, though. Headless had a bug recently where it wouldn't shut down fully and so wouldn't restart, if I remember correctly. The devs pounced on that one quick, but there may be a latent issue, especially since you are running the Linux distro fork, not official Virtualbox from https://www.virtualbox.org/wiki/Linux_Downloads.

I'd be curious if you could reboot the host, then manually try running the VM headless, not under Vagrant, see what happens.

Also consider uninstalling/purging the _SUSE fork of Virtualbox and installing from official, above.
vpseg
Posts: 4
Joined: 11. Mar 2022, 23:04

Re: VBoxManage startvm .. --type headless terminates unexpectedly: NS_ERROR_FAILURE 0x80004005

Post by vpseg »

I suspect "Show" should be "Start", since "Show" only appears when the VM is running 'headless'. "Start" runs the VM in full GUI mode with no detachability or headlessness possible.
Aha, you're right, thank you. Yes, I meant "Start" or the default ("gui"?) mode when running with VBoxManage.
I'm not sure of the problem, though. Headless had a bug recently where it wouldn't shut down fully and so wouldn't restart, if I remember correctly. The devs pounced on that one quick, but there may be a latent issue, especially since you are running the Linux distro fork, not official Virtualbox from https://www.virtualbox.org/wiki/Linux_Downloads.
If it matters, this issue occurs regardless of whether I:
- create a new VM and use headless mode on first boot from VBoxManage or the VBox GUI
- GUI boot the VM to GRUB and then power off, then boot in headless mode
- fully boot the VM in GUI mode, then shut down, then boot in headless
Basically, my headless mode doesn't work, at all.
I'd be curious if you could reboot the host, then manually try running the VM headless, not under Vagrant, see what happens.
I've done so a couple times and have the same result, and same error code.
Also consider uninstalling/purging the _SUSE fork of Virtualbox and installing from official, above.
I've tried doing so a few times now since you suggested it, and I just cannot get it to install. I got the rpm for SUSE 15 to install, but the VBox application would just exit as soon as I run it. Using the repo link on that page for OpenSUSE doesn't work (unknown repo type, despite being set to 'yum') to install it, either. I'm back to SUSE and I can at least run the VMs in the foreground for now, though how to do this in vagrant, I am not sure.
vpseg
Posts: 4
Joined: 11. Mar 2022, 23:04

Re: VBoxManage startvm .. --type headless terminates unexpectedly: NS_ERROR_FAILURE 0x80004005

Post by vpseg »

Just wanted to add that for anyone looking at this in the future, since opening with the GUI works, I added the following to my Vagrant file according to this StackOverflow answer: https://stackoverflow.com/a/20024671

Code: Select all

config.vm.provider :virtualbox do |vb|
  vb.gui = true
end
This doesn't fix the issue, but at least I can continue using VBox + Vagrant for now.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: VBoxManage startvm .. --type headless terminates unexpectedly: NS_ERROR_FAILURE 0x80004005

Post by fth0 »

For a test, set Display > Screen > Graphics Controller to VMSVGA and change Display > Screen > Video Memory to 128 MB.

Note that running headless does not mean that VirtualBox doesn't provide a virtual screen to the guest OS, only that it is not shown. While the VM is running headless, you can enable the display using "Show".
vpseg
Posts: 4
Joined: 11. Mar 2022, 23:04

Re: VBoxManage startvm .. --type headless terminates unexpectedly: NS_ERROR_FAILURE 0x80004005

Post by vpseg »

fth0 wrote:For a test, set Display > Screen > Graphics Controller to VMSVGA and change Display > Screen > Video Memory to 128 MB.
Thank you for your response. I have done so and the machine still fails to start headless, with any driver selected (including VMSVGA).
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: VBoxManage startvm .. --type headless terminates unexpectedly: NS_ERROR_FAILURE 0x80004005

Post by fth0 »

Something else to try:

Reboot the host, try to start the VM headless with VBoxHeadless --startvm <uuid>, start the VM in normal mode with VirtualBoxVM --startvm <uuid> and shut it down from within the guest OS. Navigate to the VirtualBox (user-specific) global configuration folder (e.g. ~/.config/VirtualBox/ in Ubuntu Linux) and post the VBoxSVC.log file.
skeith22
Posts: 1
Joined: 2. Oct 2022, 20:30

Re: VBoxManage startvm .. --type headless terminates unexpectedly: NS_ERROR_FAILURE 0x80004005

Post by skeith22 »

fth0 wrote:Something else to try:

Reboot the host, try to start the VM headless with VBoxHeadless --startvm <uuid>, start the VM in normal mode with VirtualBoxVM --startvm <uuid> and shut it down from within the guest OS. Navigate to the VirtualBox (user-specific) global configuration folder (e.g. ~/.config/VirtualBox/ in Ubuntu Linux) and post the VBoxSVC.log file.
I also have this issue can you check this VBOXSVC.log file of mine?
replace the *(DOT)" with ".", I can't post urls yet lol

gist(DOT))github(DOT)com/skeeith/970c2245c1ad45726684fd45ca2391fa
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: VBoxManage startvm .. --type headless terminates unexpectedly: NS_ERROR_FAILURE 0x80004005

Post by scottgus1 »

skeith22 wrote:I can't post urls yet
No need to. The forum Upload Attachment tab is available from first day first post, and zipped files fit.
Post Reply