Changes

Jump to: navigation, search

LXD

985 bytes added, 2 months ago
First Containeer
# ##i##lxc exec testcontainer -- /bin/bash
##r##testcontainer ##bl##~ #
}}
 
As you might have noticed, we do not yet have any IPv4 networking configured. While LXD has set up a bridge and NAT for us, along with a DHCP server to query, we actually need to use {{c|dhcpcd}} to query for an IP address, so let's get that set up:
 
{{console|body=
##r##testcontainer ##bl##~ # ##i##echo "template=dhcpcd" > /etc/conf.d/netif.eth0
##r##testcontainer ##bl##~ # ##i##cd /etc/init.d
##r##testcontainer ##bl##/etc/init.d # ##i##ln -s netif.tmpl netif.eth0
##r##testcontainer ##bl##/etc/init.d # ##i##rc-update add netif.eth0 default
* service netif.eth0 added to runlevel default
##r##testcontainer ##bl##/etc/init.d # ##i##rc
* rc is deprecated, please use openrc instead.
* Caching service dependencies ... [ ##g##ok ##!g##]
* Starting DHCP Client Daemon ... [ ##g##ok ##!g##]
* Network dhcpcd eth0 up ... [ ##g##ok ##!g##]
##r##testcontainer ##bl##/etc/init.d # ##i##
}}
Bureaucrats, Administrators, wiki-admins, wiki-staff
5,806
edits

Navigation menu