LXD VM not working on arch linux


I am getting: Error: Failed to connect to lxd-agent running lxc exec vmname -- bash on a running VM. Observing boot with lxc console vmname ,error is: [FAILED] Failed to start LXD - agent. I tried couple of different images from both images: and ubuntu: repo, with same result. Issue is same on snap lxd package and package from Arch linux community.

On another Ubuntu 18.04 everything is working as expected and on another Arch linix the issue is same as described. Havent find anything related on Google search, so I am posting here…

I was able to run VMs in past with images from images: repo. Running containers works just fine…

Thanks in advance

What image is the VM using?

I have tried: images:ubuntu/focal/cloud , images:ubuntu/focal , images:centos/7/cloud , images:alpine/3.12 , images:archlinux , ubuntu:focal

Do you have the vsock module loaded:

sudo lsmod | grep vsock
vhost_vsock            24576  0

vmw_vsock_virtio_transport_common 40960 1 vhost_vsock
vhost 53248 2 vhost_vsock,vhost_net
vsock 49152 2 vmw_vsock_virtio_transport_common,vhost_vsock

1 Like

So the host is an Arch linux machine? And it works on an Ubuntu machine ok?

Yes, that is correct. I have tried on another Ubuntu machine and another Arch linux machine. It is working on Ubuntu ok and not working on both Arch linux machines.

After further testing, on spare Arch linux machine (VM on proxmox if thats matter), with lxd snap package (both stable 4.4 and candidate 4.5) I was able to successfully run following VMs:

  • images:ubuntu/focal/cloud
  • images:centos/7
  • images:centos/7/cloud

I could not run:

  • images:alpine/3.12
  • images:archlinux

getting Failed to connect to lxd-agent error.

On the same machine, with snap lxd removed and Arch linux community package installed, issue remains, I was not able to run any VMs.

I suspect it will be something to do with the Go version of C libraries Arch is using to compile the lxd-agent making it incompatible with the VMs being run.

As for the snap package lxd-agent not working with alpine and archlinux, @monstermunchkin is that expected?

You need to set security.secureboot=false as both Alpine and Arch don’t support it. Simply run lxc config set <vm> security.secureboot=false, and start the VM. That should do the trick.


That indeed solved issue! Running Alpine and Arch VMs, on snap version lxd, works now… Thanks!