VirtualBox errors - (sh*t happens)

mail

Can't boot Windows 10 VM + NS ERROR FAILURE (0x80004005)

Situation

Solution

  1. open the VM settings
  2. USB tab
  3. you should see the USB 3.0 option is selected, select USB 1.1 instead
  4. try again booting the VM
mail

Failed to open/create the internal network 'HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter' (VERR_INTNET_FLT_IF_NOT_FOUND).

Situation

Details

Solution

/!\ This is a temporary solution that _can_ fix the error message, but won't probably survive a reboot or a suspend :
- in "Oracle VM VirtualBox Manager", open the "Host Network Manager"
	- hover the "Tools" cell (top left) + click the "hamburger" menu + "Network"
	- or "File | Host Network Manager"
	- or "CTRL-h"
- you may see there some "Host-only" network interfaces that don't exist anymore in Windows10, so clean the mess by deleting everything
- create a new interface with the proper settings (IP, mask, DHCP)
- open Windows 10 network properties (WIN-r | ncpa.cpl)
- you should see the interface you just created
- disable + re-enable it	https://forums.virtualbox.org/viewtopic.php?t=94568&p=456926#p473162

- unfortunately, it's pretty likely this interface won't be there at the next reboot and I don't know how to fix this so far :-(((

https://superuser.com/questions/1132433/virtualbox-connection-disappears/1648033#1648033
mail

Double error message at login (Failed to register , Failed to set display ) + single monitor + very low resolution

Situation

My setup is as usual : What happens :
  1. Debian boots normally and displays the login window as usual (which is at a very low resolution, like 800x600)
  2. usually, once I've entered my credentials, the display flickers slightly while the monitor frame is resized to its full resolution, then a 2nd window appears for the 2nd monitor. Now, the window keeps its low resolution, no 2nd window appears, and my XFCE desktop is displayed in this tiny window.
  3. Then 3 desktop notifications appear in the top-right corner (1 is displayed twice but I can't remember which since they vanish after just a few seconds). Because of the low screen resolution, the messages are truncated :
    • Failed to register
    • Failed to set display

Details

Since the display within a virtual machine depends on a dedicated kernel module, a recent kernel update may be the root cause.

Solution

  1. on the host side (this is not mandatory, but since you'll have to spend some time re-building the kernel module, upgrade everything) :
    1. update VirtualBox itself
    2. if VirtualBox itself had an update, update the Extension Pack
  2. on the guest :
    1. update the kernel headers
    2. update the guest Additions
    3. reboot
mail

Virtual monitors have different resolutions

Situation

  1. my setup (described in more details here and here) :
    • Windows 10 host, on a laptop
    • Debian guest
    • 3 monitors : laptop + 2 external identical monitors
  2. Windows 10 is configured so that both external screens use their native resolution (1920x1080)
  3. when switching the Debian guest into full screen on both external monitors :
    • one is in its native resolution of 1920x1080
    • the other tops at 1536x864 ()

Details

XFCE display properties

Many resolutions can be applied to both screens :
  • the first is already configured to 1920x1080
  • the other is set to 1536x864, offers many more, but not 1920x1080

In more details :

xrandr -q
Screen 0: minimum 1 x 1, current 3456 x 1080, maximum 8192 x 8192
Virtual1 connected 1920x1080+1536+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1920x1080     60.00*+
   2560x1600     59.99
   1920x1440     60.00
   
   800x600       60.32
   640x480       59.94
Virtual2 connected primary 1536x864+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1536x864      60.00*+
   2560x1600     59.99
   1920x1440     60.00
   
   800x600       60.32
   640x480       59.94

This shows that the VM is given a virtual monitor which is limited to this resolution and is actually doing its best : the problem is not in the VM.

Solution

  1. on the host side (Windows 10), open the VirtualBox VM Manager
  2. open the VM Configuration screen, then Display | Screen tab
  3. on this window, you can define :
    • the amount of video memory
    • the number of screens (2 here)
    • and a scale factor (either for all monitors, or per monitor)
  4. for an unknown reason, I had :
    • for the 1920x1080 monitor (working fine) : 100%
    • for the other one —limited to 1536x864— : 125%
  5. setting the latter back to 100% brought things back to normal
mail

VirtualBox only shows 1 virtual monitor for my dual-screen VM

Situation

Here's my setup :

Details

Let's see what happens in the VM :

I forgot to capture the exact output at that time, but it said something like :
(some Xrandr chitchat)
screen1Name					not the expected VGA-0 (or DVI-0)
	(list of supported resolutions)
	
	
	
						no 2nd screen is listed : only 1 "virtual" monitor is connected to the VM
Looks like this is related or caused by VirtualBox itself.

VM display settings in VirtualBox :

  • In the VM configuration, the Display page complains :
    Invalid parameter detected
  • Switching the Graphic controller selection from VBoxVGA to VMSVGA makes the error message disappear, but at the next boot the VM still has only 1 monitor .

No idea what's best here. I'm afraid this is unrelated...

Solution

Fiddling with settings of the Display page looks useless. I have no idea why VirtualBox "forgets" to open a virtual monitor while all settings are fine (number of displays, graphic controller, ...) . As a workaround, you can bring VirtualBox some coffee so that it wakes up and remembers it has a 2nd virtual monitor to display :
  1. in the virtual monitor window, select Monitor in the top menu
  2. select Virtual screen 2. If this option is not visible (sometimes the drop-down list is not entirely displayed (), click again on Monitor to close + re-open the list
  3. then Enable
mail

Linux guest additions installer not found --try to start them manually. while trying to install Guest Additions

Situation

Solution

I tried different commands which finally worked, don't know which one was THE solution (or maybe it's a combination...) :
mail

VirtualBox + LightDM : Failed to use bus name org.freedesktop.DisplayManager, do you have appropriate permissions ?

Situation

On my usual setup : Windows 7 host + Debian Buster guest (having 2 screens working fine so far) :
  1. Debian boots normally, the login screen appears
  2. I type my login + password
  3. both screens turn black, there's nothing I can do to interact with the machine anymore. I have to turn it off from VirtualBox's VM manager

Details

  1. boot until the login screen appears
  2. using VirtualBox's host (right CTRL here) : host-F6 to open a login console
  3. log in as standard user, then test stuff as root
  4. (unclear in which order I did this...)
    lightdm
    DBus.Error:org.freedesktop.DBus.error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files
    Failed to use bus name org.freedesktop.DisplayManager, do you have appropriate permissions ?
    journalctl -xe
    pam_unix(lightdm:auth): authentication failure; logname= uid=
    journalctl -u lightdm
    -- Reboot --
    Sep 11 09:37:59 myWorkstation systemd[1]: Starting Light Display Manager...
    Sep 11 09:38:04 myWorkstation systemd[1]: Started Light Display Manager.
    Sep 11 09:38:05 myWorkstation lightdm[889]: pam_unix(lightdm-greeter:session): session opened for user lightdm by (uid=0)
    Sep 11 09:42:08 myWorkstation lightdm[1037]: pam_unix(lightdm:auth): check pass; user unknown
    Sep 11 09:42:08 myWorkstation lightdm[1037]: pam_unix(lightdm:auth): authentication failure; logname= uid=0 euid=0 tty=:0 ruser= rhost=
    Sep 11 09:42:16 myWorkstation lightdm[1074]: pam_unix(lightdm:auth): check pass; user unknown
    Sep 11 09:42:16 myWorkstation lightdm[1074]: pam_unix(lightdm:auth): authentication failure; logname= uid=0 euid=0 tty=:0 ruser= rhost=
    Sep 11 09:43:51 myWorkstation lightdm[1103]: pam_unix(lightdm:auth): authentication failure; logname= uid=0 euid=0 tty=:0 ruser= rhost=  user=sys
  5. some of the links I visited / things I tried while debugging this (and that did not solve the problem, kept for future reference...) :
    https://bugzilla.redhat.com/show_bug.cgi?id=1428379#c8
    	/etc/systemd/system/lightdm.service.d/fixes.conf
    ==========================================8<=========================================================
    https://askubuntu.com/questions/346738/13-04-lightdm-crashing-black-screen-flashing-cursor
    
    /var/lib/lightdm/.Xauthority
    	600 lightdm:lightdm
    
    chmod 664 ...
    ==========================================8<=========================================================
    https://askubuntu.com/questions/346738/13-04-lightdm-crashing-black-screen-flashing-cursor#answer-346994
    apt install xdm
    at config, select xdm
    apt remove lightdm* --purge
    reboot
    apt install lightdm
    + select lightdm
    reboot
  6. change the VM configuration in VirtualBox's VM manager so that it uses a single screen instead of 2, it works fine : I can log in graphically, see my desktop & al. and a desktop notification :
    Failed to connect to the VirtualBox kernel service

Solution

No idea what was the actual root cause. Below is what I did, and the problem disappeared
  1. install the kernel headers (that were missing for an unknown reason)
  2. re-install the VirtualBox Guest Additions
  3. reboot, enjoy.
mail

Error opening current controlling terminal for the process (`/dev/tty'): No such device or address.

Situation

Here's what I did :
  1. upgrade my workstation to Debian Buster (10)
  2. upgrade VirtualBox from version 5.2.xx to 6.0 with this method
  3. start VirtualBox as a non-root user from a graphical session
  4. VirtualBox detects that the Extension Pack is outdated and offers to download + upgrade
  5. the upgrade fails with the error :
    Failed to install the Extension Pack /home/stuart/.VirtualBox/Oracle_VM_VirtualBox_Extension_Pack-6.0.10.vbox-extpack.
    
    The installer failed with exit code 127: Error creating textual authentication agent: Error opening current controlling terminal for the process (`/dev/tty'): No such device or address.
    
    Result Code: NS_ERROR_FAILURE (0x80004005)
    Component: ExtPackManagerWrap
    Interface: IExtPackManager {70401eef-c8e9-466b-9660-45cb3e9979e4}

Solution

  1. close the current VirtualBox instance
  2. start VirtualBox again as root. No need to open a graphical session for root, sudo virtualbox will do the job
  3. if you're not prompted to update the Extension Pack, force the update with File | Check for updates
  4. follow the on-screen instructions and proceed with the update
  5. close this VirtualBox instance
  6. re-start VirtualBox as a non-root user
  7. confirm everything is going extremely well with File | Check for updates again
mail

VirtualBox misplaces VM screens on monitors for a dual-screen Debian + XFCE guest

Situation

I just _HATE_ when simple things waste my time !!! Today's joke was Windows 7 + VirtualBox + Debian/XFCE not able to go fullscreen the way I expected it. It already worked thousands of times, but no luck today ...

For the context, here's my setup. I have :

Upon starting my Debian guest within VirtualBox, 2 windows appear, 1 for each "virtual" screen. At first, they are in "windowed" mode (i.e. not fullscreen). One of these windows is my primary window (it has the XFCE taskbar), the other is the secondary window. Because of my physical setup, desk, personal preferences, I'd like to have :

While still in windowed mode, I can freely move windows wherever I want, so I place each one on its "destination" monitor. Right Ctrl-f toggles windows fullscreen. This _should_ be something very basic and _not spectacular at all_. But for some unknown reason, at this very moment, the windows contents switch, and I get the exact opposite of what I expect. This is sadly pretty usual, so Right Ctrl-f + move windows around / resize windows / ... + Right Ctrl-f again usually does the job. But today, nothing worked. I even rebooted the VM and the host operating system : no change .

Solution

Not sure yet this is a solution or only a workaround. Wait & see
Update XFCE's display properties :
  1. Start menu | Settings | Display
  2. Identify displays (optional, but helps a lot : understanding who's who is priceless )
  3. then 2 solutions :
    • either monitors 1 and 2 are misplaced relative to each other (in XFCE settings). In such case, drag one around.
    • or XFCE insists on having the wrong monitor to be the Primary display. Tick the checkbox accordingly.
mail

VirtualBox on a Debian host, Kernel driver not installed (rc=-1908) when starting a VM

Situation

With VirtualBox running on a Debian host, I get this error message when trying to start a VM :
Kernel driver not installed (rc=-1098)

The VirtualBox Linux kernel driver (vboxdrv) is either not loaded
or there is a permission problem with /dev/vboxdrv. Please
reinstall virtualbox-dkms package and load the kernel module
by executing

'modprobe vboxdrv'

as root.

where: suplibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED
(-1908) - The support driver is not installed. On linux, open
returned ENOENT.

Solution

  1. apt install --reinstall linux-headers-$(uname -r) virtualbox-dkms dkms
  2. modprobe vboxdrv
  3. reboot the VM

Alternate solution

I wrote an article for a pretty similar error in 2017. I guess it is now outdated. For the sake of completeness, here it is.

Can not start VirtualBox on Debian Stretch : Kernel driver not installed (rc=-1908) (source)

Situation

When trying to start a VM, I get the error message :
Kernel driver not installed (rc=-1908)

The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing

'/etc/init.d/vboxdrv setup'

as root. If it is available in your distribution, you should install the DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary.

Details

This happened after upgrading Debian from Jessie (8) (where everything worked fine) to Stretch (9).

Solution

Basically, all you have to do is to install an updated version of VirtualBox. To do so, as root :
  1. Define a new software source :
    echo 'deb http://download.virtualbox.org/virtualbox/debian stretch contrib' >> /etc/apt/sources.list.d/virtualbox.list
  2. Get the Oracle VirtualBox public key :
    curl -O https://www.virtualbox.org/download/oracle_vbox_2016.asc
  3. Register it :
    apt-key add oracle_vbox_2016.asc
  4. Install the new version :
    apt update && apt install virtualbox-5.1
After this, when trying to start one of my VMs, I got an error message saying it couldn't be started because of the "USB 2 subsystem" which was part of the snapshot, but currently not available and blah blah blah (can't remember the full error message and didn't note it).
What I did (now it works) :
  1. start the VirtualBox manager (the GUI listing existing VMs, not a VM)
  2. it offered to download + install an upgrade of the "VirtualBox guest additions" (4.3.x to 5.1.x). Accept + install
  3. now the VMs can start \o/
mail

The VirtualBox kernel service is not running

Situation

When booting my Debian virtual machine, I get a desktop notification :
VBoxClient
The VirtualBox kernel service is not running. Exiting.

Details

Not sure if / how this is related, but I had a kernel update lately...

Solution

This can be fixed by upgrading the VirtualBox Guest Additions on the virtual machine.
For an unknown reason, I've observed that when booting the VM with the VirtualBox Guest Additions inserted, the error message doesn't appear.
mail

Mouse click lost in guest

Situation

Details

Solution

Details :
  1. ps aux | grep [d]raganddrop
    kevin    31488  0.0  0.0  50364   332 ?        S    08:53   0:00 /usr/bin/VBoxClient --draganddrop
    kevin    31489  0.1  0.0 117064  2184 ?        Sl   08:53   0:15 /usr/bin/VBoxClient --draganddrop
  2. kill -1 31489
    • I don't know which one of both should be killed : the first or the other ?
    • Anyway, after that, both processes disappeared.
  3. The mouse click is back
mail

Can't mount shared directories + modprobe vboxsf failed

Situation

This is a weird situation where, after starting my guest Debian VM, I don't have access to the shared directories anymore. I've not been able to find the root cause, but in the process of trying to fix this, I ended up upgrading
  1. VirtualBox itself
  2. the Extension Pack
  3. the Guest Additions. This is where I got this modprobe vboxsf failed error message.

Solution

Long story short, if you've upgraded everything, you've already done most of the work. The modprobe vboxsf failed error message is said to be mostly cosmetic, and can be ignored and "solved" by a reboot.
mail

intel_rapl: no valid rapl domains found in package 0 while booting a Debian VM

Situation

While booting a Debian VM, I get intel_rapl: no valid rapl domains found in package 0 messages and the boot process stalls.

Details

RAPL is related to power management. It makes sense that it is not available on a virtual machine (source).

Solution

Many different solutions are available on the Internet :
Disable 3D acceleration in VM configuration
No effect
Enable PAE/NX in VM configuration
No effect
echo 'blacklist intel_rapl' > /etc/modprobe.d/modprobe.conf, then reboot (source)
OK so far.
mail

Read only file system when trying to create a symlink in a shared directory

Situation

A Windows 7 host, running a Debian guest. A directory is shared between both and works fine : I can read and write there from both operating systems. But if, on the Debian side, I try to create a symlink within the shared directory, I get a Read only file system error. Which obviously is NOT read only since I can touch and rm there. So what's going on ?

Solution

Well, I forgot the shared directory actually lives on the host operating system side, on a NTFS filesystem, which doesn't support ext4 symbolic links...
mail

Can't log in my guest Debian despite having the right password

Situation

A Windows 7 host, running a Debian guest. Debian boots normally, then displays the graphical login window. After I've input my login and password :
  1. I get no Wrong password message
  2. The screen turns black and flickers as if the graphical session was being opened normally
  3. Then I get the login window again

Solution

There are several causes to this behavior. In my case, ~/.Xauthority was owned by root (), so I just had to delete it. And enjoy .

It's even possible that this has nothing to do with VirtualBox...

mail

Permission denied on a shared directory

Situation

VirtualBox is installed on a Windows host box, and runs a Debian guest machine. Shared directories are configured and mounted as expected, except that only root is allowed in there .

Solution

Add the non-root user willing to gain access to the share into the vboxsf group :
adduser bob vboxsf

New permissions will be effective only after opening a new shell (for CLI access) or after a new login (for GUI access).

mail

USB unavailable, VirtualBox complains : Failed to access the USB subsystem; Could not load the Host USB Proxy Service

Situation

VirtualBox complains :
Failed to access the USB subsystem
Could not load the Host USB Proxy Service (VERR_FILE_NOT_FOUND).
The service might not be installed on the host computer
Or :
Erreur d'accès au sous-système USB.
Le service de relais de périphériques USB n'a pas pû être activé (erreur VERR_FILE_NOT_FOUND).
Il se peut que le service ne soit pas installé sur l'ordinateur hôte.

Solution

  1. as root :
    usermod -aG vboxusers bob
  2. log out and in again to reload groups data