Missing vhost_vsock Kernel Module?

,

Hey All,

I am new to the container, lxc, lxd stuff and I am at the end of my knowledge.
I have a fresh setup with a Raspberry PI 4 installed with Ubuntu 22.04 arm64.
So far everything works fine for containers but I can’t get any vm to launch.

   ~  lxc launch images:ubuntu/focal ubuntu --vm  1 ✘  root@sirius  15:40:47 

Creating ubuntu
Error: Failed instance creation: Failed creating instance record: Instance type “virtual-machine” is not supported on this server: vhost_vsock kernel module not loaded

Seems like I am missing a kernel module, but I was not able to find or load it.
Already googled for it but was not able to find any matching problem with solution.

Do you have any idea or tip?

Here are some more information about the installed software versions:

   ~  uname -r  :heavy_check_mark:  root@sirius  15:44:17 
5.15.0-1005-raspi
   ~  lxd.check-kernel  :heavy_check_mark:  root@sirius  15:44:20 
/snap/lxd/22927/bin/lxc-checkconfig: 69: lxc-start: not found
LXC version
Kernel configuration not found at /proc/config.gz; searching…
Kernel configuration found at /boot/config-5.15.0-1005-raspi
— Namespaces —
Namespaces: enabled
Utsname namespace: enabled
Ipc namespace: enabled
Pid namespace: enabled
User namespace: enabled
newuidmap is not installed
newgidmap is not installed
Network namespace: enabled

— Control groups —
Cgroups: enabled
Cgroup namespace: enabled

Cgroup v1 mount points:

Cgroup v2 mount points:
/sys/fs/cgroup

Cgroup v1 systemd controller: missing
Cgroup v1 freezer controller: missing
Cgroup ns_cgroup: required
Cgroup device: enabled
Cgroup sched: enabled
Cgroup cpu account: enabled
Cgroup memory controller: enabled
Cgroup cpuset: enabled

— Misc —
Veth pair device: enabled, loaded
Macvlan: enabled, not loaded
Vlan: enabled, not loaded
Bridges: enabled, loaded
Advanced netfilter: enabled, loaded
CONFIG_IP_NF_TARGET_MASQUERADE: enabled, not loaded
CONFIG_IP6_NF_TARGET_MASQUERADE: enabled, not loaded
CONFIG_NETFILTER_XT_TARGET_CHECKSUM: enabled, not loaded
CONFIG_NETFILTER_XT_MATCH_COMMENT: enabled, not loaded
FUSE (for use with lxcfs): enabled, not loaded

— Checkpoint/Restore —
checkpoint restore: enabled
CONFIG_FHANDLE: enabled
CONFIG_EVENTFD: enabled
CONFIG_EPOLL: enabled
CONFIG_UNIX_DIAG: enabled
CONFIG_INET_DIAG: enabled
CONFIG_PACKET_DIAG: enabled
CONFIG_NETLINK_DIAG: enabled
File capabilities:

Note : Before booting a new kernel, you can check its configuration
usage : CONFIG=/path/to/config /snap/lxd/22927/bin/lxc-checkconfig

   ~  lsmod | grep vsock  :heavy_check_mark:  root@sirius  15:44:26 
   ~  lsmod | grep vhost  0|1 ✘  root@sirius  15:44:42 
   ~  lsmod | grep kvm  0|1 ✘  root@sirius  15:44:47 
   ~  ls -la /dev/kvm  0|1 ✘  root@sirius  15:44:59 
crw-rw---- 1 root kvm 10, 232 Apr 21 14:14 /dev/kvm
   ~  snap list lxd  :heavy_check_mark:  root@sirius  15:45:09 
Name Version Rev Tracking Publisher Notes
lxd 5.0.0-b0287c1 22927 5.0/stable/… canonical✓ -
   ~  dpkg -l | grep linux-image  :heavy_check_mark:  root@sirius  15:45:25 
ii linux-image-5.15.0-1005-raspi 5.15.0-1005.5 arm64 Linux kernel image for version 5.15.0 on ARMv8 SMP
   ~  dpkg -l | grep lxc  :heavy_check_mark:  root@sirius  15:45:48 
ii liblxc-common 1:5.0.0~git2209-g5a7b9ce67-0ubuntu1 arm64 Linux Containers userspace tools (common tools)
ii liblxc-dev 1:5.0.0~git2209-g5a7b9ce67-0ubuntu1 arm64 Linux Containers userspace tools (development)
ii liblxc1 1:5.0.0~git2209-g5a7b9ce67-0ubuntu1 arm64 Linux Containers userspace tools (library)
ii lxcfs 5.0.0-0ubuntu2 arm64 FUSE based filesystem for LXC

Thanks in advance!

What does sudo modprobe vhost_vsock show and what does sudo lsmod | grep vsock show?

   ~  modprobe vhost_vsock
modprobe: FATAL: Module vhost_vsock not found in directory /lib/modules/5.15.0-1005-raspi
   ~  lsmod | grep vsock

That it is missing. But I was not able to find it in the repos or similar.

I’ve asked @stgraber where this should be reported as an issue.

Please can you report the missing kernel module as a bug here https://launchpad.net/ubuntu/+source/linux-raspi

Thanks

Okay. So it looks like it is really a bug / missing module.
For the moment I switched back to Ubuntu 20.04 LTS with Kernel 5.4. Everything works fine!

1 Like
1 Like

Solution for the problem on 5.15:

sudo apt install linux-modules-extra-raspi

Afterwards the module is available.

1 Like

Ah excellent, thanks.