[lxc-users] lxd: getting rid of the initial network interface
Frans Meulenbroeks
fransmeulenbroeks at gmail.com
Sun Feb 12 09:01:17 UTC 2017
Hi,
I want to get rid of the network interface that my container has, but
somehow I can't figure out how to get that done.
I have created a new container from scratch with:
lxc launch ubuntu:14.04 my-ubuntu
lxc config show my-ubuntu gives;
architecture: x86_64
config:
image.architecture: amd64
image.description: ubuntu 14.04 LTS amd64 (release) (20170202.1)
image.label: release
image.os: ubuntu
image.release: trusty
image.serial: "20170202.1"
image.version: "14.04"
volatile.base_image:
3b825a6a063aacc6b19df84f7ddc4fe872a0e382ec0bb92f475a9493b0857e01
volatile.eth0.hwaddr: 00:16:3e:25:48:06
volatile.idmap.base: "0"
volatile.idmap.next:
'[{"Isuid":true,"Isgid":false,"Hostid":231072,"Nsid":0,"Maprange":65536},{"Isuid":false,"Isgid":true,"Hostid":231072,"Nsid":0,"Maprange":65536}]'
volatile.last_state.idmap:
'[{"Isuid":true,"Isgid":false,"Hostid":231072,"Nsid":0,"Maprange":65536},{"Isuid":false,"Isgid":true,"Hostid":231072,"Nsid":0,"Maprange":65536}]'
volatile.last_state.power: RUNNING
devices:
root:
path: /
type: disk
ephemeral: false
profiles:
- default
Note: no nic device, but there is a volatile.eth0.hwaddr address
And if I look into the container with lxc exec my-ubuntu -- ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:16:3e:25:48:06
inet addr:10.202.122.138 Bcast:10.202.122.255 Mask:255.255.255.0
inet6 addr: fe80::216:3eff:fe25:4806/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:95 errors:0 dropped:0 overruns:0 frame:0
TX packets:74 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:19120 (19.1 KB) TX bytes:7960 (7.9 KB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
And if I do lxc network show lxdbr0 I see that the container is using the
bridge.
$ lxc network show lxdbr0
config:
dns.mode: dynamic
ipv4.address: 10.202.122.1/24
ipv4.dhcp.ranges: 10.202.122.2-10.202.122.254
ipv4.nat: "true"
ipv6.address: none
name: lxdbr0
type: bridge
usedby:
...
- /1.0/containers/my-ubuntu
...
managed: true
ButI cannot remove the device from the bridge:
lxc network detach lxdbr0 my-ubuntu
error: No device found for this network
Is there a way to get rid of this interface?
(actually I want to attach eth0 to a different bridge)
Thanks in advance!
Frans
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20170212/5a3bad22/attachment.html>
More information about the lxc-users
mailing list