warning: Creating default object from empty value in /data/web/1/000/027/003/273448/htdocs/ on line 33.

LXD: Create container with profile (connect to VLAN)

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-dev

create container with profile
lxc launch ubuntu:18.04 bionic-mgmt-dev -p mgmt-dev
lxc ls

Enable container nesting
lxc config set bionic-mgmt-dev security.nesting true

Configure IP
cat < /var/lib/lxd/containers/bionic-mgmt-dev/rootfs/etc/netplan/50-cloud-init.yaml
version: 2


wget -q --no-check-certificate -O - | bash -


# install required packages
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common

# install Docker repository key
curl -fsSL | sudo apt-key add -

# add Docker repository
sudo add-apt-repository "deb [arch=amd64] $(lsb_release -cs) stable"

# update package list
sudo apt-get update

# install Docker
sudo apt-get install -y docker-ce

Syndicate content