create profile
lxc profile copy default mgmt-dev
# lxc profile list
lxc profile device set mgmt-dev eth0 nictype macvlan
lxc profile device set mgmt-dev eth0 parent mgmt-dev-v4432
lxc profile show mgmt-devcreate container with profile
lxc launch ubuntu:18.04 bionic-mgmt-dev -p mgmt-dev
lxc lsEnable container nesting
lxc config set bionic-mgmt-dev security.nesting trueConfigure IP
cat < /var/lib/lxd/containers/bionic-mgmt-dev/rootfs/etc/netplan/50-cloud-init.yaml
network:
version: 2
ethernets:
eth0:
dhcp4: no
addresses: [10.0.0.123/24]
gateway4: 10.0.0.254
nameservers:
addresses: [10.0.0.253, 10.0.1.253]
search: [lxd, dev]
EOFStart container
lxc exec bionic-mgmt-dev bash