Good afternoon,
I’m having an issue overriding the ipv4 address on a container that inherits a default eth0 profile. Current LXC` version is 3.13. Below are the steps I took to set the ipv4 address.
~ % lxc list plexContainer
+---------------+---------+------+------+------------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+---------------+---------+------+------+------------+-----------+
| plexContainer | STOPPED | | | PERSISTENT | 1 |
+---------------+---------+------+------+------------+-----------+
~ % lxc config show plexContainer
architecture: x86_64
config:
image.architecture: amd64
image.description: ubuntu 18.04 LTS amd64 (release) (20181206)
image.label: release
image.os: ubuntu
image.release: bionic
image.serial: "20181206"
image.version: "18.04"
volatile.base_image: 84a71299044bc3c3563396bef153c0da83d494f6bf3d38fecc55d776b1e19bf9
volatile.idmap.base: "0"
volatile.idmap.current: '[{"Isuid":true,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
volatile.idmap.next: '[{"Isuid":true,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
volatile.last_state.idmap: '[{"Isuid":true,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
volatile.last_state.power: STOPPED
devices: {}
ephemeral: false
profiles:
- default
- sshKey
- autosnapshot
- mediaDrives
stateful: false
description: ""
~ % lxc profile add plexContainer eth0
Profile eth0 added to plexContainer
~ % lxc config device override plexContainer eth0 ipv4.address=192.168.20.5
Device eth0 overridden for plexContainer
~ % lxc config show plexContainer
architecture: x86_64
config:
image.architecture: amd64
image.description: ubuntu 18.04 LTS amd64 (release) (20181206)
image.label: release
image.os: ubuntu
image.release: bionic
image.serial: "20181206"
image.version: "18.04"
volatile.base_image: 84a71299044bc3c3563396bef153c0da83d494f6bf3d38fecc55d776b1e19bf9
volatile.eth0.hwaddr: 00:16:3e:f5:c9:ec
volatile.eth0.name: eth0
volatile.idmap.base: "0"
volatile.idmap.current: '[{"Isuid":true,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
volatile.idmap.next: '[{"Isuid":true,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
volatile.last_state.idmap: '[{"Isuid":true,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
volatile.last_state.power: STOPPED
devices:
eth0:
ipv4.address: 192.168.20.5
nictype: macvlan
parent: vlan0
type: nic
ephemeral: false
profiles:
- default
- sshKey
- autosnapshot
- mediaDrives
- eth0
stateful: false
description: ""
~ % lxc start plexContainer
~ % lxc list plexContainer
+---------------+---------+-----------------------+------+------------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+---------------+---------+-----------------------+------+------------+-----------+
| plexContainer | RUNNING | 192.168.20.212 (eth0) | | PERSISTENT | 1 |
+---------------+---------+-----------------------+------+------------+-----------+
The eth0 profile is as follows
~ % lxc profile show eth0
config: {}
description: Adds the container to the lxd vlan.
devices:
eth0:
nictype: macvlan
parent: vlan0
type: nic
name: eth0
Any help or insight is greatly appreciated!!
Thanks,
Jonathon