Virtualbox tips - tested on Virtualbox 6.0.4 running on Debian 10.2 host

These tips are for Virtualbox (tested on version 6.0.4 of Virtualbox running on Debian 10.2 Stable host), especially targeted to somewhat experienced users who have successfully installed Virtualbox Guest Additions on their guest, for example those in the community who wish to build LFS on a VM. I am not sure if the same tips will be useful for Virtualbox running on other hosts.

I was finding that guests kept causing crashes due to erratic mouse behaviour as the mouse moved from guest to host or vice-versa, or even mouse pointer being lost within the guest itself, especially if guest was run full-screen without a bordering Virtualbox bordering window on the host. The mouse problems were occuring under Gnome, XFCE and KDE all on the same hardware and OS. After many, many hours, I’ve finally managed to reduce crashes to zero on my system!

The tips have been tested with the following guests: Debian 10.2 Stable, Fedora 31, Ubuntu 18.04.3 LTS.

Referring to settings window:

General: Advanced tab, disable Shared Clipboard, disable Drag’n’drop.
System: Motherboard tab, set Pointing Device to PS/2 Mouse, enable I/O APIC
Display: Screen tab, set Graphics Controller to VMSVGA, disable 3D Acceleration

Run the guest in a maximised Virtualbox window on the host not in full-screen mode

Hope that’s of some use :slight_smile:

3 Likes

I do not have the issues that you have described here and my settings are quite different so I do not think this is a universal thing but thanks for sharing your experience.

General: I use shared clipboard but only Host to Guest
System: my pointing device is USB Tablet, I do have I/O APIC enabled
Display: I have VboxVGA as the Graphics Controller but I do have 3D Acceleration disabled

This just to say there might be something else going on if you want to try these settings for science. :smiley:

1 Like

@MichaelTunnell Whatever was going on on my system, I sure am glad it’s stopped now! The problem is as far as I can see it could be in host DE, Virtualbox settings for mouse, display driver, problem with guest additions, problem with guest or guest DE… etc etc. What’s been most disconcerting for me is that the same problems exist across the three distros I tried, as mentioned above, and it’s only those settings that solved the problems for all of them, or seems to have done.

Some of this is based on what I was reading from the manual(!) such as 3D support currently being experimental, which the GUI doesn’t seem to hint at :confused:

@MichaelTunnell Thanks for your feedback :slight_smile: For scientific purposes I ran some further tests as follows:

  1. Left all of the settings according to my own values as above, but tried enabling host-guest clipboard sharing as you suggested. No crashes resulted in any of the three VMs tried (Debian 10.2, Fedora 31, Ubuntu 18.04.3) :+1: I then got adventurous and tried bidirectional clipboard sharing, still no crashes on any of the VMs :+1:

  2. Switched back to all the settings according to my own values as above, but tried switching pointing device to USB Tablet as you suggested. Debian remained rock-solid, no crashes, no problems even when VM was in full-screen mode or in non-maximised or maximised non-full-screen mode i.e. inside a bordered window. :+1: This was a real joy to see as this is the setup I’d like to use for building LFS. Ubuntu likewise remained pretty solid though sometimes lost pointer in full-screen mode, but recovered it using keyboard shortcut Ctrl-F to toggle-off full-screen mode. Fedora 31 started losing pointer unrecoverably in these tests though whether or not in full-screen mode and the VM had to be shut down. It wouldn’t recover using Ctrl-F. Upshot of this is I’m wondering if recent updates on my Debian host and guest and Ubuntu guest have managed to patch something, so hopefully Fedora will be fixed too. Meantime Fedora works fine with PS/2 Mouse as input :+1:

I have not run tests on switching Display settings to VboxVGA as on p51 of the current pdf version, the manual states that VMSVGA is the default for Linux guests and that VBoxVGA should be used for legacy guest OSes. I think on my system I was getting a warning that this driver would not be supported as of the next version, before I changed to VMSVGA but I’m not certain.

I’m just looking forward to a stable VM now for when I build LFS!

The only problems I have with Virtualbox 6.1.14 are related to 3D acceleration. I selected drag’n drop and clipboards sharing bidirectional, however I only use drag’n drop. Release 6.0.12 has been the last release, where 3D acceleration did work for all my VMs. Afterwards I have problems with:

  • all Ubuntu Gnome based releases from 16/04 to 20.04
  • Windows 10, Vista and XP, Windows 7 has been corrected.
  • Ubuntu Budgie

I have no problems with Ubuntu Mate, Kubuntu, Lubuntu and only a minor flicker of Xubuntu during system updates in the panel and conky.

I filed a detailed bug report to Oracle 4-5 month ago.

1 Like

I think it’s great that you filed the bug report. Also I seem to recall the manual saying 3D acceleration was experimental (though the GUI doesn’t indicate this) so maybe that’s why?

I’ve been happily using VirtualBox for some months now. I’ve had a rare glitch with Fedora 31 guest after kernel update, finding that guest additions broke, but then updates to VirtualBox further down the line did fix that, after quite a long frustrating wait!

It has been long ago that 3D acceleration has been experimental. I think, last year 3D acceleration has undergone a relative large redesign with vbovsvga and vmsvga, while vboxvga will be discontinued. That redesign did bring some improvements, like simplified installation of guest additions graphics, performance?, but it also introduced a number of new bugs.
I think the problems are related to the interfaces between the 3D guest driver and the Linux host drivers, especially the ones from AMD. With Ubuntu I only have issues on my Ryzen 3 2200G. The Windows Issues are valid on both my i5-2520M laptop and my Ryzen desktop.

UPDATE: After installing Ubuntu 20.04 as Host OS all Ubuntu related problems disappeared, so it has been an issue with AMD drivers in 19.10

1 Like

Yes, the manual does mention the older driver is to be discontinued. I guess some bugs in the new driver would explain it. I have to say though, I do find Guest Additions annoying to install and update, so for the longer term may look at moving to libvirt based solutions though apparently those VMs have poor performance when running on Windows host systems, which I almost never use now, though compatibility is convenient.

Good luck with QEMU/KVM, I dumped it, because it is too unpredictable, many options do not work and you have to know too much about internal design choices as user. For Windows system you have to search the internet again for the right drivers, I prefer the builtin iso-file with working drivers (except 3D) from Virtualbox.

2 Likes

I’ll run a fair few tests before switching if I choose to and will post my findings but thanks for the advance info on things to be cautious of :slight_smile:

QEMU has a lot of options. I like using virt-manager and libvirt to manage QEMU VMs. It’s quite a learning curve, but I find that it runs better than virtualbox, though virtualbox is a little bit more user-friendly…

1 Like

QEMU has many options, that do not work properly. KVM only has one advantage, the disk IO is faster. Virtualbox is considerably more user friendly and it always works.

The problems I had with 3D acceleration disappeared after I installed Ubuntu 20.04, so the issue has been AMD driver related. Another advantage is, that I can activate Windows using the original activation sticker glued to the PC. Often with QEMU/KVM I can’t even find the correct CPU in its CPU list.

1 Like