OpenShift CRC fails to start in LXD

Hi, I cannot get OpenShfit to work in an LXD container:

On my machine:

$ lxd --version
4.3
$ lxc config get openshift security.nesting
true
$ uname -r
4.19.0-9-amd64
$ grep PRETTY_NAME /etc/os-release
PRETTY_NAME="Debian GNU/Linux 10 (buster)"

In my openshift LXD container:

[openshift@openshift ~]$ /opt/crc-linux-1.13.0-amd64/crc start
INFO Checking if oc binary is cached
INFO Checking if podman remote binary is cached
INFO Checking if goodhosts binary is cached
INFO Checking if running as non-root
INFO Checking if Virtualization is enabled
INFO Checking if KVM is enabled
INFO Checking if libvirt is installed
INFO Checking if user is part of libvirt group
INFO Checking if libvirt daemon is running
INFO Checking if a supported libvirt version is installed
INFO Checking if crc-driver-libvirt is installed
INFO Checking if libvirt 'crc' network is available
INFO Checking if libvirt 'crc' network is active
INFO Checking if NetworkManager is installed
INFO Checking if NetworkManager service is running
INFO Checking if /etc/NetworkManager/conf.d/crc-nm-dnsmasq.conf exists
INFO Checking if /etc/NetworkManager/dnsmasq.d/crc.conf exists
INFO Starting CodeReady Containers VM for OpenShift 4.5.1...
ERRO Error starting stopped VM: virError(Code=89, Domain=47, Message='Start job for unit machine-qemu\x2d1\x2dcrc.scope failed with 'failed'')

[openshift@openshift ~]$ grep PRETTY_NAME /etc/os-release 
PRETTY_NAME="CentOS Linux 8 (Core)"

Hope you can help, it would be awesome to have that giant contained :smile:

There’s a fair few mentions of libvirt/qemu in there, did you add /dev/kvm to your container?

lxc config device add openshift kvm unix-char path=/dev/kvm should do the trick for that part at least.

But that’s really just gueswork, the error above isn’t very verbose :slight_smile:

1 Like

I should’ve included this in my original post, sorry.

$ lxc config show openshift

shows this device section:

devices:
  kvm:
    path: /dev/kvm
    type: unix-char
  tun:
    path: /dev/net/tun
    type: unix-char
  vhost-net:
    path: /dev/vhost-net
    type: unix-char
  vhost-vsock:
    path: /dev/vhost-vsock
    type: unix-char

The /dev/kvm one was required to get past the KVM check in crc:

INFO Checking if KVM is enabled

Any other suggestions? :crossed_fingers:

Did you get CRC running in LXD after all?

Please let us know! Thanks.

No, I’m stuck.