@stgraber I am still trying to get a build environment fully working. Due to not wanting to tinker with the snap LXD running on my main development box I am trying to build and test a custom LXD inside of a build-lxd
container instead. Here is the build-lxd
container config:
anderson@anderson-ryzen9:~$ lxc config show build-lxd
architecture: x86_64
config:
image.architecture: amd64
image.description: ubuntu 22.04 LTS amd64 (release) (20230107)
image.label: release
image.os: ubuntu
image.release: jammy
image.serial: "20230107"
image.type: squashfs
image.version: "22.04"
limits.cpu: "8"
limits.memory: 8GiB
security.nesting: "true"
volatile.base_image: ed7509d7e83f29104ff6caa207140619a8b235f66b5997f1ed6c5e462617fb71
volatile.cloud-init.instance-id: ee99847e-5a0f-4305-95cb-3595b1ece0ab
volatile.eth0.host_name: vethd5e1b351
volatile.eth0.hwaddr: 00:16:3e:12:ac:d5
volatile.idmap.base: "0"
volatile.idmap.current: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
volatile.idmap.next: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
volatile.last_state.idmap: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
volatile.last_state.power: RUNNING
volatile.last_state.ready: "false"
volatile.uuid: 676e2613-997a-432e-a93c-8730ebca92c0
devices:
kvm:
gid: "109"
path: /dev/kvm
type: unix-char
root:
path: /
pool: zfs
size: 120GiB
type: disk
vhost-vsock:
path: /dev/vhost-vsock
type: unix-char
vsock:
path: /dev/vsock
type: unix-char
ephemeral: false
profiles:
- default
stateful: false
description: ""
I have an LXD daemon, that I built, running inside build-lxd
and working well enough that I have successfully imported a VM using lxc import
. However, when I try to start the VM it is giving the following error:
Error: Failed setting up device via monitor: Failed sending file descriptor of "/proc/self/fd/25" for disk device "open-core-boot": No file descriptor supplied via SCM_RIGHTS
I also see the following in dmesg on the host system:
[10090471.837895] audit: type=1400 audit(1674515323.158:5455): apparmor="DENIED" operation="file_receive" namespace="root//lxd-build-lxd_<var-snap-lxd-common-lxd>" profile="lxd-macOS-catalina_</var/snap/lxd/common/lxd>" name="/var/snap/lxd/common/lxd/storage-pools/zfs/custom/default_open-core-boot/root.img" pid=9139 comm="qemu-system-x86" requested_mask="wr" denied_mask="wr" fsuid=1000999 ouid=1000000
I guess I am wondering if I can do what I am attempting without setting security.privileged=true
on build-lxd
, or at all?