Comment 9 for bug 930285

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks, Andy. In precise, that would have worked. However, in oneiric that created a container with no networking. The reason you have the two minute wait, then, is that the container's NIC is not getting an address, and the container doesn't enter runlevel 2 until the failsafe job kicks in after two minutes. The console starts on runlevel 2.

In oneiric, I usually create a container by doing:

apt-get install libvirt-bin # this is to use the virbr0 bridge it creates
cat < /etc/lxc.conf << EOF
lxc.network.type=veth
lxc.network.link=virbr0
lxc.network.flags=up
EOF

lxc-create -t ubuntu -n sbc -f /etc/lxc.conf

Note that when you created the container with just:

 lxc-create -t ubuntu -n sbd

you should have gotten a warning like this:

================================================================
root@server-4738:~# lxc-create -t ubuntu -n o1

Warning:
-------
Usually the template option is called with a configuration
file option too, mostly to configure the network.
eg. lxc-create -n foo -f lxc.conf -t debian
The configuration file is often:

lxc.network.type=macvlan
lxc.network.link=eth0
lxc.network.flags=up

or alternatively:

lxc.network.type=veth
lxc.network.link=br0
lxc.network.flags=up

For more information look at lxc.conf (5)

At this point, I assume you know what you do.
Press <enter> to continue ...

================================================================