Virtual machines (Virt-Manager, VirtualBox) not working on Wayland

Tumbleweed KDE user, I have a couple of virtual machines that I use very rarely, two on VirtualBox and one that uses KVM/Virt-Manager. When I tried accessing them yesterday both VirtualBox VMs started up and aborted after a few seconds with error messages, while the Virt-Manager VM also shut down almost immediately but without any message. On a hunch I changed session and all VMs started on X11 without issues.

I have been on Wayland since the beginning of this year and I seem to recall that VMs did work, but I might be mistaken since I use them so little. Is this a well-known Wayland issue or is it fixable? Here is the error message I got from a single VMs’ failure:

Message from syslogd@install at Oct  5 11:20:18 ...
 kernel:[146059.776144][ T2779] 

Message from syslogd@install at Oct  5 11:20:18 ...
 kernel:[146059.776144][ T2779] !!Assertion Failed!!

Message from syslogd@install at Oct  5 11:20:18 ...
 kernel:[146059.776144][ T2779] Expression: RT_SUCCESS(rc)

Message from syslogd@install at Oct  5 11:20:18 ...
 kernel:[146059.776144][ T2779] Location  : /home/abuild/rpmbuild/BUILD/VirtualBox-7.0.10/src/VBox/VMM/VMMAll/PGMAll.cpp(3850) int pgmLock(PVMCC, bool)

Message from syslogd@install at Oct  5 11:20:18 ...
 kernel:[146059.776150][ T2778] 

Message from syslogd@install at Oct  5 11:20:18 ...
 kernel:[146059.776150][ T2778] !!Assertion Failed!!

Message from syslogd@install at Oct  5 11:20:18 ...
 kernel:[146059.776150][ T2778] Expression: RT_SUCCESS(rc)

Message from syslogd@install at Oct  5 11:20:18 ...
 kernel:[146059.776150][ T2778] Location  : /home/abuild/rpmbuild/BUILD/VirtualBox-7.0.10/src/VBox/VMM/VMMAll/PGMAll.cpp(3850) int pgmLock(PVMCC, bool)

Message from syslogd@install at Oct  5 11:20:18 ...
 kernel:[146059.776152][ T2780] 

Message from syslogd@install at Oct  5 11:20:18 ...
 kernel:[146059.776152][ T2780] !!Assertion Failed!!

Message from syslogd@install at Oct  5 11:20:18 ...
 kernel:[146059.776152][ T2780] Expression: RT_SUCCESS(rc)

Message from syslogd@install at Oct  5 11:20:18 ...
 kernel:[146059.776152][ T2780] Location  : /home/abuild/rpmbuild/BUILD/VirtualBox-7.0.10/src/VBox/VMM/VMMAll/PGMAll.cpp(3850) int pgmLock(PVMCC, bool)

Message from syslogd@install at Oct  5 11:20:18 ...
 kernel:[146059.776161][ T2780] pVM=ffffa92288479000 pCritSect=ffffa9228857f760: -39

Message from syslogd@install at Oct  5 11:20:18 ...
 kernel:[146059.776167][ T2779] pVM=ffffa92288479000 pCritSect=ffffa9228857f760: -39

Message from syslogd@install at Oct  5 11:20:18 ...
 kernel:[146059.776177][ T2778] pVM=ffffa92288479000 pCritSect=ffffa9228857f760: -39

Message from syslogd@install at Oct  5 11:20:18 ...
 kernel:[146059.776255][ T2777] 

Message from syslogd@install at Oct  5 11:20:18 ...
 kernel:[146059.776255][ T2777] !!Assertion Failed!!

Message from syslogd@install at Oct  5 11:20:18 ...
 kernel:[146059.776255][ T2777] Expression: RT_SUCCESS(rc)

Message from syslogd@install at Oct  5 11:20:18 ...
 kernel:[146059.776255][ T2777] Location  : /home/abuild/rpmbuild/BUILD/VirtualBox-7.0.10/src/VBox/VMM/VMMAll/PGMAll.cpp(3850) int pgmLock(PVMCC, bool)

Message from syslogd@install at Oct  5 11:20:18 ...
 kernel:[146059.776277][ T2777] pVM=ffffa92288479000 pCritSect=ffffa9228857f760: -39

I see the word Virtual (and parts of it) so many times, that I assume this should have been in the Virtualization category.

Will move it.

Oh wow there’s a virtualization category! I’m really sorry, I had not noticed, thank you!

@edrics:

Is VBoxDrv properly installed in the Kernel?

 > lsmod | grep -i 'box'
vboxnetadp             28672  0
vboxnetflt             32768  0
vboxdrv               573440  2 vboxnetadp,vboxnetflt
 >

Take a look in ‘/etc/uefi/certs/’ and check that the the “kmp” certificate has been loaded into the MOK keyring – I’m on Leap 15.5 – therefore the file name may well be different for you –

 # mokutil --test-key /etc/uefi/certs/1F673297-kmp.crt
/etc/uefi/certs/1F673297-kmp.crt is already enrolled
 #
 > rpm --query --whatprovides /etc/uefi/certs/1F673297-kmp.crt
openSUSE-signkey-cert-20220613-lp155.3.5.x86_64
 >

Thanks for the reply! VBoxDrv is installed:

lsmod | grep -i 'box'
vboxnetadp             28672  0
vboxnetflt             40960  0
vboxdrv               720896  2 vboxnetadp,vboxnetflt

On the other hand, there is no "kmp"certificate in that location, I only have /etc/uefi/certs/1F673297.crt (without the -kmp) and /etc/uefi/certs/4659838C-shim.crt

rpm query for the installed certificate gives

rpm --query --whatprovides /etc/uefi/certs/1F673297.crt
kernel-default-6.5.3-1.1.x86_64
kernel-default-6.5.4-1.1.x86_64

while the same command for the -kmp version that should be there returns “no such file or directory”.
I’m not sure where I could find the certificate and how I could activate it, do you think this is the reason the VMs don’t work? How come it’s only in Wayland?

Looks like he is not using OpenSUSE VirtualBox (which has Kernel Fixes for Tumbleweed) but has built his own Oracle VirtualBox as it is in his /home/abuild/ directory.

It is rather funny to hear from the openSUSE VirtualBox maintainer. Did you never look at the build logs of the package you maintain?

[   19s] Executing(%prep): /usr/bin/bash -e /var/tmp/rpm-tmp.AYhqIv
[   19s] + umask 022
[   19s] + cd /home/abuild/rpmbuild/BUILD
[   19s] + cd /home/abuild/rpmbuild/BUILD
[   19s] + rm -rf VirtualBox-7.0.10
[   19s] + /usr/lib/rpm/rpmuncompress -x /home/abuild/rpmbuild/SOURCES/VirtualBox-7.0.10-patched.tar.bz2

I most definitely have not built my own, I wouldn’t know where to start! I installed it from the repos years ago, I have virtualbox, virtualbox-guest-tools, virtualbox-kmp-default and virtualbox-qt all from the openSUSE OSS main repo.

First - As a maintainer - I get source code from Oracle and fix it to build within Open Build System. I don’t get to start with a patched.tar.bz2 file - I create that so obs can build the it and I can test it before we submit it to Factory.

Nowhere does he say how he installed it - it shows the a path to a file I was not familiar with.

As a maintainer I see this path on failures -

/home/user/home:larryr:branches:Virtualization/virtualbox/VirtualBox-7.0.10/src/VBox/VMM/VMMAll 

If this is the path that the OBS factory builds and installed from yast or zypper - I was not aware of that.

/home/abuild/rpmbuild/BUILD/VirtualBox-7.0.10/src/VBox/VMM/VMMAll/PGMAll.cpp(3850) 
/usr/lib/rpm/rpmuncompress -x /home/abuild/rpmbuild/SOURCES/VirtualBox-7.0.10-patched.tar.bz2

I would like to see this when VirtualBox has an issue:

# zypper se -si virtualbox
Loading repository data...
Reading installed packages...

S  | Name                             | Type    | Version             | Arch   | Repository
---+----------------------------------+---------+---------------------+--------+---------------------------------------
i+ | python3-virtualbox               | package | 7.0.10-4.1          | x86_64 | openSUSE-Tumbleweed-Oss
i+ | python3-virtualbox-debuginfo     | package | 7.0.10-4.1          | x86_64 | openSUSE-Tumbleweed-Repository (DEBUG)
i+ | virtualbox                       | package | 7.0.10-4.1          | x86_64 | openSUSE-Tumbleweed-Oss
i+ | virtualbox-guest-tools           | package | 7.0.10-4.1          | x86_64 | openSUSE-Tumbleweed-Oss
i+ | virtualbox-kmp-default           | package | 7.0.10_k6.5.3_1-3.4 | x86_64 | (System Packages)
i+ | virtualbox-kmp-default           | package | 7.0.10_k6.5.2_1-3.3 | x86_64 | (System Packages)
i+ | virtualbox-kmp-default           | package | 7.0.10_k6.5.4_1-4.1 | x86_64 | openSUSE-Tumbleweed-Oss

#

This is what I get:

zypper se -si virtualbox
Loading repository data...
Reading installed packages...

S  | Name                   | Type    | Version             | Arch   | Repository
---+------------------------+---------+---------------------+--------+----------------------
i+ | virtualbox             | package | 7.0.10-4.1          | x86_64 | Main Repository (OSS)
i+ | virtualbox             | package | 7.0.10-4.1          | x86_64 | openSUSE:Tumbleweed
i+ | virtualbox-guest-tools | package | 7.0.10-4.1          | x86_64 | Main Repository (OSS)
i+ | virtualbox-guest-tools | package | 7.0.10-4.1          | x86_64 | openSUSE:Tumbleweed
i+ | virtualbox-kmp-default | package | 7.0.10_k6.5.3_1-3.4 | x86_64 | (System Packages)
i+ | virtualbox-kmp-default | package | 7.0.10_k6.5.4_1-4.1 | x86_64 | Main Repository (OSS)
i+ | virtualbox-kmp-default | package | 7.0.10_k6.5.4_1-4.1 | x86_64 | openSUSE:Tumbleweed
i+ | virtualbox-qt          | package | 7.0.10-4.1          | x86_64 | Main Repository (OSS)
i+ | virtualbox-qt          | package | 7.0.10-4.1          | x86_64 | openSUSE:Tumbleweed

It looks like I have many versions installed, but the openSUSE:Tumbleweed “repo” is not a repository, it gets added automatically even when I delete it.

There must be a deeper issue than just virtualbox though, none of this addresses why also KVM virtual machines don’t work and why it’s only on Wayland

The “kmp” certificate is provided by the “openSUSE-signkey-cert” package.

  • I’m currently checking the dependencies for that package but, I can’t find anything – removing the “virtualbox-kmp-default” package doesn’t touch the package with the build key …

But, the VirtualBox Kernel module loaded OK in your Tumbleweed Kernel – therefore, with Tumbleweed the certificate we need for Leap, is not needed (on Tumbleweed systems … ) …

virtualbox-guest-tools should only be loaded on the guest machines and not the host

guest should only have virtualbox-guest-tools and virtualbox-kmp-default.

Ooops – missed this – dementia is raising it’s ugly head again …


On the VirtualBox clients running Tumbleweed images, is the “vboxguest” kernel module loading OK?

Yes - it is needed to provide mouse integration, shared folders, cut and paste and drag and drop.

I think there’s a misunderstanding here, I run Tumbleweed as the host system, not the guest!
The VMs are both Linux and Windows systems, it makes no difference in the issues I got. I’d clarify in the first post if I could

But you loaded virtualbox-guest- tools on the host

Doesn’t it come automatically as a recommended package when installing VirtualBox? I don’t recall explicitly installing that package

Not really.

bor@tw:~> zypper search --requires-pkg --match-exact virtualbox-guest-tools 
Loading repository data...
Reading installed packages...
No matching items found.
bor@tw:~> zypper search --recommends-pkg --match-exact virtualbox-guest-tools 
Loading repository data...
Reading installed packages...

S | Name                        | Summary            | Type
--+-----------------------------+--------------------+--------
  | patterns-media-rest_cd_core | Remaining Software | package
bor@tw:~> zypper info --supplements virtualbox-guest-tools
Loading repository data...
Reading installed packages...


Information for package virtualbox-guest-tools:
-----------------------------------------------
Repository     : openSUSE-20221216-0 (20231001)
Name           : virtualbox-guest-tools
Version        : 7.0.10-4.1
Arch           : x86_64
Vendor         : openSUSE
Installed Size : 2.4 MiB
Installed      : No
Status         : not installed
Source package : virtualbox-7.0.10-4.1.src
Upstream URL   : https://www.virtualbox.org/
Summary        : VirtualBox guest tools
Description    : 
    VirtualBox guest addition tools.
Supplements    : namespace:modalias(pci:v000080EEd0000CAFEsv*sd*bc*sc*i*)

bor@tw:~> 

Alright then, I must have added it without understanding it like four years ago, thanks!

Now, I was trying to get Virt-Manager to show me an error message to compare with the virtualbox one, but even starting it via terminal gives no output when the VM aborts…