Why does this configuration result in the `lxc list` results below where it appears to have gotten a DHCP address as specified in the network, but it's shows on eth0 rather than on enp1s0?
$ lxc list
Here is how it was configured.
I am trying to create mulitple interfaces for a single instance and can't very well do that if I can't get just one interface right. In the 'lxc profile device add' above, I have 'name=mylan', but it still seems to have used 'eth0' for the name.
Thoughts?
---
$ lxc network list
$ lxc profile show lan-profile
Or am I reading it wrong because according to this, it appears to just be a name?
$ lxc config show instA --expanded
$ lxc list
Code:
+-------+---------+----------------------+------+-----------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+-------+---------+----------------------+------+-----------+-----------+
| instA | RUNNING | 192.168.1.117 (eth0) | | CONTAINER | 0 |
+-------+---------+----------------------+------+-----------+-----------+
Code:
lxc network create lanA \
ipv4.address=192.168.1.1/24 \
ipv6.address=none \
ipv4.dhcp=true
lxc profile create lan-profile
lxc profile device add lan-profile root disk path=/ pool=default
lxc profile device add lan-profile enp1s0 nic name=mylan network=lanA
lxc launch ubuntu:focal instA --profile lan-profile
lxc network attach lanA instA enp1s0
Thoughts?
---
$ lxc network list
Code:
+----------+----------+---------+-------------+---------+
| NAME | TYPE | MANAGED | DESCRIPTION | USED BY |
+----------+----------+---------+-------------+---------+
| br0 | bridge | NO | | 1 |
+----------+----------+---------+-------------+---------+
| br-int | bridge | NO | | 0 |
+----------+----------+---------+-------------+---------+
| docker0 | bridge | NO | | 0 |
+----------+----------+---------+-------------+---------+
| eno1 | physical | NO | | 0 |
+----------+----------+---------+-------------+---------+
| lanA | bridge | YES | | 2 |
+----------+----------+---------+-------------+---------+
| lxcbr0 | bridge | NO | | 0 |
+----------+----------+---------+-------------+---------+
| lxdbr0 | bridge | YES | | 1 |
+----------+----------+---------+-------------+---------+
| virbr0 | bridge | NO | | 0 |
+----------+----------+---------+-------------+---------+
| wan | bridge | YES | | 0 |
+----------+----------+---------+-------------+---------+
| wlp110s0 | physical | NO | | 0 |
+----------+----------+---------+-------------+---------+
Code:
config: {}
description: ""
devices:
enp1s0:
name: mylan
network: lanA
type: nic
root:
path: /
pool: default
type: disk
name: lan-profile
used_by:
- /1.0/instances/instA
$ lxc config show instA --expanded
Code:
architecture: x86_64
config:
image.architecture: amd64
image.description: ubuntu 20.04 LTS amd64 (release) (20231011)
image.label: release
image.os: ubuntu
image.release: focal
image.serial: "20231011"
image.type: squashfs
image.version: "20.04"
volatile.base_image: 1ff1055f282309f25c3c43ad3a2dba2e6c585c45dee442e3e831335d6889643d
volatile.enp1s0.host_name: veth131b22a0
volatile.enp1s0.hwaddr: 00:16:2b:46:23:22
volatile.enp1s0.name: eth0
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.uuid: 07cddd05-0b4d-427a-ab91-91542bd463bf
devices:
enp1s0:
network: lanA
type: nic
root:
path: /
pool: default
type: disk
ephemeral: false
profiles:
- lan-profile
stateful: false
description: ""