The virtual machine <mach_name> terminated unexpectedly during startup with exit code 1 (0x1)

Discussions related to using VirtualBox on Linux hosts.
Post Reply
hmrct
Posts: 4
Joined: 25. Jun 2019, 04:08

The virtual machine <mach_name> terminated unexpectedly during startup with exit code 1 (0x1)

Post by hmrct »

Once more with feeling, I guess... This topic seems to be a popular one.

Having spent the past several days researching this, I realize I'm not going to get anywhere without some kind of debugging assistance. The error message is generic, possibly owing to there being several possible causes, none of which show up in any VirtualBox or system logs. The rest of the error message (either on the command line or in a pop-up window, depending on whether "VirtualBox" or "VBoxManage" is used to start the VM) is equally unhelpful (to me, anyway):

Result Code: NS_ERROR_FAILURE (0x80004005)
Component: MachineWrap
Interface: IMachine {<UUID>}

Environment is CentOS 7.5.1804 with kernel version 3.10.0-957.12.2, 64-bit, on a Dell Inspiron i7 laptop (not sitting in front of machine right now -- model to follow if requested/needed). Selinux is running in "enforced / targeted" mode, although that doesn't seem to be a factor as far as I can tell: no errors showing up in the selinux logs. Due to difficulties with multiple-monitor setup/configuration, it was necessary to download and install the latest compatible version of the "amdgpu" drivers (the non-Pro variant), the presence of which *may* be causing the problem.

The official VirtualBox 6.0.8 RPM for "el7" seems to install without any issues, and the four kernel modules build and load without error. Using "vagrant" to build and deploy a headless 64-bit Linux VM works well: the headless VM case seems to be the only one that will work.

I tried downloading the VirtualBox OSE source and rolling my own, making sure that updated libraries provided by the "amdgpu" package were linked against during the build. A non-hardened build works great when run directly out of the build's "out/(...)/bin" directory (after building, installing, and loading the modules, of course). At that point, I figured building with the updated "amdgpu" libraries fixed the problem, so did a hardened "release" build with RPM packaging (cd src/VBox/Installer/linux ; rpm/rules binary).

The hardened build worked identically to the official VirtualBox download :-(. Edited the "rules" file mentioned above to create an RPM installer for a non-hardened build. Same broken behavior (!) when attempting to start a non-headless VM.

So at this point in the troubleshooting effort, I'm attempting to identify the differences between running a non-hardened build in its unpackaged state, and running the RPM-packaged non-hardened (or hardened) build. Frankly, I think "hardened" vs. "non-hardened" as suggested by someone else experiencing this problem (mentioned in another forum thread) is not the issue. So, what does the packaging process do that "breaks things" when the package is installed?

One obvious difference is the lack of "udev" entries for device creation when the "vbox*" modules get loaded: the VirtualBox USB entries under "/dev" don't get created without those "udev" rules. Similarly, the owner, group, and permissions of the device entries don't get set properly for the unpackaged non-hardened case, so the quick-and-dirty workaround is to simply do "chmod 666 /dev/vbox*" as hinted at near the bottom of the wiki's "Linux build instructions" page. Another difference is stripping of selected binary objects in the packaged version.

No idea what's causing the child process (started VM) to exit immediately. Is there any way to "instrument" that spawned process to determine why it's exiting?

Thanks in advance for any help provided!
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: The virtual machine <mach_name> terminated unexpectedly during startup with exit code 1 (0x1)

Post by socratis »

We need to see a complete VBox.log, from a complete VM run, where the problem occurs:
  • Start the VM from cold-boot (not from a paused or saved state) / Observe problem / Shutdown the VM (force close it if you have to).
  • With the VM completely shut down (not paused or saved), right-click on the VM in the VirtualBox Manager and select "Show Log".
  • Save only the first "VBox.log", ZIP it and attach it to your response. See the "Upload attachment" tab below the reply form.
Image
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
hmrct
Posts: 4
Joined: 25. Jun 2019, 04:08

Re: The virtual machine <mach_name> terminated unexpectedly during startup with exit code 1 (0x1)

Post by hmrct »

Thank you for the assist! The help is definitely appreciated...

As has been mentioned by other people reporting this issue, there is NO "VBox.log" file generated when this error occurs, i.e., the VM startup exits *immediately*, as in, it does not start at all. The only logging that takes place (that I can find, anyway) is in "$HOME/.config/VirtualBox/VBoxSVC.log". Copy attached. Used the GUI for this attempt, but using "VBoxManage" to start the VM produces the same result.

Additional info about laptop system: Dell Precision M6800 with 32GB RAM.
Attachments
VBoxSVC.zip
(1.26 KiB) Downloaded 20 times
hmrct
Posts: 4
Joined: 25. Jun 2019, 04:08

Re: The virtual machine <mach_name> terminated unexpectedly during startup with exit code 1 (0x1)

Post by hmrct »

Additional data points...

Performed a release upgrade today, from CentOS 7.5 --> 7.6. All applicable updates available as of yesterday have been installed as well.

Without the "amdgpu" drivers installed, and VirtualBox as provided by "VirtualBox-6.0-6.0.8_130520_el7-1.x86_64.rpm" installed, the VM starts and runs without error.

Unfortunately, the AMD-provided "amdgpu" package is required on my notebook, not just because of the multiple-monitor setup issues, but also to fix a documented problem with the machine getting stuck in some kind of "atombios" loop when one attempts to logout.

So, I'll download the appropriate "amdgpu" package for CentOS 7.6, install it, and see where we are. In the meantime, the thread subject error definitely seems to be caused by some kind of unfortunate interaction between the "amdgpu" package drivers/libraries and VirtualBox.
hmrct
Posts: 4
Joined: 25. Jun 2019, 04:08

Re: The virtual machine <mach_name> terminated unexpectedly during startup with exit code 1 (0x1)

Post by hmrct »

Quick followup... Installed "amdgpu" v19.20 (not the Pro variant), rebooted the laptop, and VirtualBox is still working correctly.

No idea if VirtualBox would function correctly if I were to uninstall/reinstall it, or rebuild the "vbox*" modules, now that the "amdgpu" package has been installed. Since everything is now working (as far as I can tell), it would appear that I at least have a workaround for the thread subject issue, if not a complete understanding of the root cause.

I'm willing to continue the investigation, but it's probably pointless without some way of instrumenting the VM startup process to provide more specific information than "it failed". For what it's worth, the "VBox.log" file one gets if/when the VM startup is successful is incredibly detailed, but again, it doesn't get generated when the startup terminates as early as it did.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: The virtual machine <mach_name> terminated unexpectedly during startup with exit code 1 (0x1)

Post by socratis »

Great detective work! 8)

hmrct wrote:So, I'll download the appropriate "amdgpu" package for CentOS 7.6, install it, and see where we are
Let us know how that went... Apparently you did that while I was writing my reply. Good news!
hmrct wrote:some kind of unfortunate interaction between the "amdgpu" package drivers/libraries and VirtualBox
That's definitely a possibility. If that is the case, you should head to the bug tracker and either search for an appropriate bug, or open a new bug report where you'll attach your logs and other vital information.

See also if 3D is enabled in your VM, and see what happens when you disable it.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply