[SOLVED] VBoxSVC does not start if first VM is launched from desktop icon

Discussions related to using VirtualBox on Linux hosts.
Post Reply
systemdlete
Posts: 17
Joined: 24. Jan 2023, 05:29

[SOLVED] VBoxSVC does not start if first VM is launched from desktop icon

Post by systemdlete »

To be clear (without making the subject line too long), the "desktop icon" is generated by the virtualbox GUI, without any modifications.
If VBoxSVC is not running, it generates an error saying "Callee RC: NS_BASE_STREAM_WOULD_BLOCK (0X80470007)" and the VM launch fails.

The problem, in those scenarios where it occurs, is that VBoxSVC does not start if no other VM is running so far.
This means that no vboxsvc.log is generated either.
Since VBoxSVC does not start, then no VM can launch. Therefore, no vbox log for the VM is created either.

Any target VM I try to launch with an icon results in the same problem, so long as no other VM or the GUI is running (i.e., VBoxSVC is not yet running).

Methods NOT producing the problem:
1) Starting the Virtualbox GUI from the desktop and clicking on any VM
2) Starting any VM from the command line using a virtualbox tool such as vboxmanage
In either of these cases, VBoxSVC runs and I can start additional VMs using ANY method. In (1), once the GUI is running, so is VBoxSVC, and I can launch by any method.
N.B.: Even if I invoke the first VM on the command line using the EXACT invocation indicated by the Exec line in the desktop icon file, it will fail. Once VBoxSVC is running,however, that EXACT same invocation sequence will work!

Methods RELIABLY producing the problem:
3) Starting the VM using a desktop icon generated by the VirtualBox GUI (so long as no VM or the GUI is running).

Timeline:
I am not 100% certain when this problem first arose. I believe it is within the past few months.
I have tried earlier versions of virtualbox, such as 6.1.30, but it exhibits the same behavior. (I tried 6.1.30 because another user reported a vm startup issue (#20792) and claimed that 6.1.30 did not exhibit this behavior. It was just a longshot, that's all...). And the 7.0.x series seems to have this as well.
I have also tried rebooting the host, etc.
I see no problems in the host logs around the time of this type of failure.

Environment:
virtualbox 6.1.42 (though the same problem exists with 7.0.6)
vbox extensions 6.1.42 is installed, and guest additions are all up to date (though we never get that far anyway)
ALL virtualbox software is downloaded from virtualbox dot org and not from the devuan or debian repos.
host operating system is Devuan Chimaera (bullseye for you Debian folks)
Desktop environment is XFCE4 version 4.16.2
Host runs an Athlon II X6 with 16 GB memory
There is plenty of disk space (df shows gigabytes of space left) and memory (htop shows ample availability)

Devuan does NOT run systemd--please see devuan dot org for details on that issue if you are interested.
Last edited by systemdlete on 25. Jan 2023, 12:27, edited 1 time in total.
fth0
Volunteer
Posts: 5677
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: VBoxSVC does not start if first VM is launched from desktop icon

Post by fth0 »

I've tried to reproduce your issue in another setup without success (Linux Mint 20 Cinnamon Edition, VirtualBox 6.1.42). The command inside the desktop shortcut is the same as the one you've written on IRC. Can you provide the complete shortcut file?

As a test, replace the command inside the desktop shortcut file with "strace -tt -f -o strace.log VBoxManage list vms". Double-click the desktop shortcut, give it a few seconds, then provide the strace.log file.
systemdlete
Posts: 17
Joined: 24. Jan 2023, 05:29

Re: VBoxSVC does not start if first VM is launched from desktop icon

Post by systemdlete »

Thank you, fth0, for looking into this. Here are the files, attached.

The forum would not allow me to upload a file with an extension of "desktop" and the strace output was too large, so I gzip'd both files.
Attachments
test-chimaera.desktop.gz
(245 Bytes) Downloaded 7 times
strace.log.gz
(190.34 KiB) Downloaded 4 times
systemdlete
Posts: 17
Joined: 24. Jan 2023, 05:29

Re: VBoxSVC does not start if first VM is launched from desktop icon

Post by systemdlete »

It turns out that because I am not using the default location for storing my virtualbox VMs and associated files, I had set VBOX_USER_HOME to my selected location.

However, that variable (VBOX_USER_HOME) was not in the desktop environment due to the fact I was using autologin. There seems to be a myriad of ways to configure one's system to accomplish exporting the variable into the desktop environment, and that is not a virtualbox problem. It is a separate challenge for a different place and time.

It is safe to say that this issue is "solved." Thank you for pointing me in the right direction, here and in the IRC.
fth0
Volunteer
Posts: 5677
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: [SOLVED] VBoxSVC does not start if first VM is launched from desktop icon

Post by fth0 »

You're welcome, and thanks for reporting back! :)
Post Reply