How LXD does exec on VMs

Hi
I know LXD has an option to exec commands. Also LXD uses Qemu in background for VM works.

I want to know how LXD does an exec operation on VM? What is low level command that directly use Qemu to do exec. I couldn’t find this from LXD source.

It doesnt use qemu directly to execute commands inside a vm. This isnt possible.

Instead it uses a Go program inside the vm guest called lxd-agent to run the commands which communicates with lxd on the host using the vsock protocol and websockets.

1 Like