I’m pretty new to LXD. I try to learn something new aside Virtual Box and others, so I came across this awesome project. However, I installed a fresh new Manjaro Linux and installed LXD. Everything is working really smoothly (awesome!), but one thing does not work, which I can’t explain myself.
For instance, when I try to create a virtual machine, I get this output:
> 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 already searched the web, however, I did not find any explanation or a starting point where to look for. Can anyone provide me a hint what could be the matter of this message?
This is a fairly recent addition to LXD, we now check whether the “machine” you’re trying to launch a VM on supports virtualisation. We check that the path /dev/kvm exists and that the vhost_vsock kernel module can be loaded. If either of these two fail then we prevent creation of VMs.
In your case as you are running inside a VirtualBox VM you need to ensure that your Vbox VM has nested virtualisation enabled in order for the /dev/kvm path to appear.
thanks for the quick reply. There’s a misunderstanding, I do not try LXD within a VirtualBox machine, I try to get it running on a direct Linux installation onto my Laptop. So, the type is not nested.
Interesting!
I just had the same issue with 4.0.7 compiled from source.
I have both /dev/kvm present and vhost_vsock available and enabled.
The solution I’ve found is that on a Debian server the packages qemu-system-x86 and qemu-utils are needed to create virtual machines. I think it might fit here to mention this dependency. I assume the snap packages got the update automatically as the requirements were added?
Edit: QEMU is included here in the requirements but not what packages are needed exactly: Requirements | LXD
I still have to figure out why the vm isn’t getting an IP but the issue might be outside of lxd’s scope.
sorry for the late reply. I was finally able to get a virtual machine running with lxd. First of all I had to install qemu, then recognized that version 6 causes some troubles, so I downgraded it to version 5.2.0. I also had to install edk2-ovmf because I wasn’t able to fix the error Required EFI firmware settings file missing even though providing the option security.secureboot=false at creation time.
But then things started to work. So, many thanks to anyone providing help.