Hi,
i’m not sure how i should fix this. I used to have multiple macvlan (tagged) networks. On each network i had multiple containers running, having different ips.
from my old docker-compose:
version: "3"
services:
a:
...
networks:
vpnvlan:
ipv4_address: 192.168.20.150
b:
...
networks:
vpnvlan:
ipv4_address: 192.168.20.160
networks:
vpnvlan:
driver: macvlan
driver_opts:
parent: eth0.1020
ipam:
config:
- subnet: 192.168.20.0/24
gateway: 192.168.20.1
Since i wanted to try lxd, i got stuck.
-
It seems that i can create macvlan IF and attach it to an lxc container… it even gets the ip.
- but then how do i pass the proper parent to docker, such that it can take or create the proper
network and then assign correctly the ips?
using it as above does not work
- but then how do i pass the proper parent to docker, such that it can take or create the proper
-
i had an idea to create multiple macvlan ifs as profile and attach it to an lxc container and the assign it 1 by 1 to docker containers, but somehow this feels a bit klunky in comparison
should i then use this profile (which works for dhcp) and create multiple devices?
config: {}
description: ""
devices:
eth0:
name: eth0
nictype: macvlan
parent: eno1
type: nic
vlan: "1020"
name: macvlan20
used_by:
- /1.0/instances/ubuntu-container
- How do i set a static IP of a macvlan IF for the lxc container, using ip command inside the container did not work unfortunately, although dhcp works perfectly