In-flight internet and LXC working in libvirt

Interesting day, flying from Montreal, Quebec to Dallas, Texas for the Ubuntu Developer Summit.
I have been able to try American Airlines’ in-flight wireless, it works surprisingly well, I get a stable 80ms latency to my home server and a quick bandwidth test gives me some 100kB/s.

On a completely different topic but still somewhat related, on that same flight, I have been able to install the latest libvirt packages I uploaded this morning to my PPA.

It’s the first time I actually manage to get networking to work with LXC in libvirt using libvirt’s network configuration.

I’ll be trying to convert some of the UDS attendees so they try it out and help making it work just fine in Lucid. Having that and kvm supported by libvirt will make Ubuntu a rocking platform for virtualization/contextualization.

Quick quote from my first test (starting the container, entering it, setting up network with DHCP, pinging my home server):

root@castiana:~# sudo virsh --connect lxc:///
Welcome to virsh, the virtualization interactive terminal.

Type:  'help' for help with commands
       'quit' to quit

virsh # start shell
Domain shell started

virsh # console shell
Connected to domain shell
Escape character is ^]
root@castiana:/# dhclient3 eth0
There is already a pid file /var/run/ with pid 29
removed stale PID file
Internet Systems Consortium DHCP Client V3.1.1
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit

Listening on LPF/eth0/52:54:00:d8:9b:96
Sending on   LPF/eth0/52:54:00:d8:9b:96
Sending on   Socket/fallback
DHCPREQUEST of on eth0 to port 67
DHCPACK of from
bound to -- renewal in 1749 seconds.
root@castiana:/# ping
PING ( 56(84) bytes of data.
64 bytes from ( icmp_seq=1 ttl=43 time=94.1 ms
--- ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 94.124/94.124/94.124/0.000 ms
root@castiana:/# ps aux
root         1  0.0  0.0  17636  1772 pts/0    Ss   20:16   0:00 /bin/bash
root        29  0.0  0.0   6488   440 ?        Ss   20:16   0:00 dhclient3 eth0
root        31  0.0  0.0  14892  1028 pts/0    R+   20:16   0:00 ps aux

About Stéphane Graber

Project leader of Linux Containers, Linux hacker, Ubuntu core developer, conference organizer and speaker.
This entry was posted in Planet Ubuntu. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.