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/dhclient.pid 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 http://www.isc.org/sw/dhcp/

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 192.168.122.78 on eth0 to 255.255.255.255 port 67
DHCPACK of 192.168.122.78 from 192.168.122.1
bound to 192.168.122.78 -- renewal in 1749 seconds.
root@castiana:/# ping athos.stgraber.org
PING athos.stgraber.org (24.200.46.78) 56(84) bytes of data.
64 bytes from modemcable078.46-200-24.mc.videotron.ca (24.200.46.78): icmp_seq=1 ttl=43 time=94.1 ms
^C
--- athos.stgraber.org 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
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
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
root@castiana:/# 

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.