On Sat, Aug 25, 2012 at 11:18 AM, Dan Kegel <[email protected]> wrote: >> https://github.com/fajarnugraha/lxc/blob/centos-template/templates/lxc-centos.in > > There's no networking (beyond being able to ping localhost).
https://help.ubuntu.com/12.04/serverguide/lxc.html says "The simplest container creation command would look like: sudo lxc-create -t ubuntu -n CN This tells lxc-create to use the ubuntu template (-t ubuntu) and to call the container CN (-n CN). Since no configuration file was specified (which would have been done with `-f file'), it will use the default configuration file under /etc/lxc/lxc.conf. This gives the container a single veth network interface attached to the lxcbr0 bridge." So I tried that on a clean ubuntu 12.04 machine, and lxc-create -t ubuntu -n democn lxc-start -n democn did indeed result in a session with a working network. (Whew.) Trying the same thing with your centos template: cd /usr/lib/lxc/templates/ wget https://raw.github.com/fajarnugraha/lxc/centos-template/templates/lxc-centos.in mv lxc-centos.in lxc-centos lxc-create -t centos -n democ6 lxc-start -n democ6 resulted in a session without working network. According to ifconfig inside the Centos session, eth0 didn't have an ip address. I dimly recall that the network doesn't start by default on Centos desktops, so I did /etc/init.d/network start inside the centos session. That at least got eth0 an ip address, but dns still wasn't working. And it looks like part of the machinery is missing: # ls -l /etc/resolv.conf lrwxrwxrwx 1 root root 29 Mar 12 12:45 /etc/resolv.conf -> ../run/resolvconf/resolv.conf Adding a real file there made dns work, and I was able to do simple networking. How far do you think your script is from being ready to go into lxc? Does it need to start the network automatically, and how should resolv.conf be handled? Thanks, Dan ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Lxc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/lxc-users
