I’m new to Manjaro. I was searching for a distro to learn for my test laptop and so I stumbled over Majaro through distrowatch. It’s really great, I love it!
Due to new challenges in my daily work I try to learn new things, specially virtualization. At the moment I try to get lxd running on my laptop, which succeeds only partially. I can create a container with whatever distro I want, however, I can’t get a virtual machine.
This is what happens:
> lxc launch images:debian/10 felix --vm
Error: Failed instance creation: Failed creating instance record: Instance type "virtual-machine" is not supported on this server
I posted a question at the discussion forum at Linuxcontainers and a maintainer answered that lxd needs kvm and vhost_vsock to work properly.
Now, kvm won’t be a problem, /dev/kvm is present and the kernel module is loaded:
But what’s still missing is vhost_vsock. I tried to find it under /lib/modules, even installed linux510-headers, but no success so far. So, is there anyone out there who made lxd working with virtual machines? If yes, please provide me some hints whatever you tried to get this done.
sorry for the late reply, I had too much to do the last days. I’ve gone through the wiki page and specially paid attention to the setup section, but I can’t see any reason why it should not work.
However, when talking about QEMU, I did not find it installed on my system. The question is, is QEMU part of lxd or do I have to install QEMU separately? If so I wonder why there’s no dependency set during the installation of lxd.
Another thing I’ve recognized is in the output of lxc-checkconfig:
LXD needs it for the vm and not for the container part. It is not required if you want to run containers, for many the main task for LXD ( since it is a fronted for LXC (not lxc))
However the qemu package and others are an optional dependency for the lxd package. If you use pacman it will print out missing optional dependencies. ( Pamac (the GUI ) might hide it.)
All optional dependencies that are needed for “VM support” needs to be installed.
This is not done for “optional dependencies”. Manjaro/Arch are not Debian or Ubuntu. Things are different. However pacman will print out missing optional dependencies and it is in the pacman.log.
Many modern Linux systems use cgroups V2. cgroups are required for containers not VMs. LXC is compatible with cgroups v2, but lxc-checkconfig might give false warnings.