Hello,
I’m a complete newbie to this so please forgive me if my question is pathetically naïve!
Firstly let me show you a simple working example using a standard image:
**$ lxc launch ubuntu:20.04 myrouted --profile default --profile routed_139**
Creating myrouted
Starting myrouted
**$ lxc list**
+----------+---------+------------------------+------+-----------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+----------+---------+------------------------+------+-----------+-----------+
| myrouted | RUNNING | 192.168.111.139 (eth0) | | CONTAINER | 0 |
+----------+---------+------------------------+------+-----------+-----------+
Everything looks good and I can use my shiny new routed network container.
Now I delete my new container and in its place create a routed network container from my customised base image:
**$ lxc stop myrouted**
**$ lxc deleted myrouted**
**$ lxc launch lxc-base-image myrouted --profile default --profile routed_139**
**$ lxc list**
+----------+---------+------+------+-----------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+----------+---------+------+------+-----------+-----------+
| myrouted | RUNNING | | | CONTAINER | 0 |
+----------+---------+------+------+-----------+-----------+
My new container is running but without an IP!
Any assistance would be greatly received.
Regards,
More info
**$ lxc info myrouted**
Name: myrouted
Location: none
Remote: unix://
Architecture: x86_64
Created: 2021/02/17 12:44 UTC
Status: Running
Type: container
Profiles: default, routed_139
Pid: 3840780
Ips:
eth0: inet6 fe80::a0fc:6aff:fea0:4bb3 veth7546271e
lo: inet 127.0.0.1
lo: inet6 ::1
Resources:
Processes: 60
Disk usage:
root: 36.70MB
CPU usage:
CPU usage (in seconds): 14
Memory usage:
Memory (current): 261.32MB
Memory (peak): 323.67MB
Network usage:
eth0:
Bytes received: 9.40kB
Bytes sent: 4.09kB
Packets received: 59
Packets sent: 23
lo:
Bytes received: 5.09kB
Bytes sent: 5.09kB
Packets received: 58
Packets sent: 58
**$ lxc config show myrouted**
architecture: x86_64
config:
image.architecture: amd64
image.description: Ubuntu focal amd64 (20210122_07:42)
image.name: ubuntu-focal-amd64-default-20210122_07:42
image.os: ubuntu
image.release: focal
image.serial: "20210122_07:42"
image.variant: default
volatile.base_image: 60b8e27ea62b58adfc2cd5090200fe96da8b6df825c074cb8e8e59e89a0a5f55
volatile.eth0.host_name: veth7546271e
volatile.eth0.hwaddr: 00:16:3e:a1:76:c2
volatile.eth0.last_state.created: "false"
volatile.eth0.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: cf084bcb-3a04-4b03-a616-59b7cafd84e0
devices: {}
ephemeral: false
profiles:
- default
- routed_139
stateful: false
description: ""
**$ lxc image info lxc-base-image**
Fingerprint: 60b8e27ea62b58adfc2cd5090200fe96da8b6df825c074cb8e8e59e89a0a5f55
Size: 2205.42MB
Architecture: x86_64
Type: container
Public: no
Timestamps:
Created: 2021/02/09 13:14 UTC
Uploaded: 2021/02/09 13:14 UTC
Expires: never
Last used: 2021/02/17 12:44 UTC
Properties:
release: focal
serial: 20210122_07:42
variant: default
architecture: amd64
description: Ubuntu focal amd64 (20210122_07:42)
name: ubuntu-focal-amd64-default-20210122_07:42
os: ubuntu
Aliases:
- lxc-base-image
Cached: no
Auto update: disabled
Profiles:
- default