WANG Cheng D
2014-Jan-06 01:52 UTC
[libvirt-users] How to start the container's network interface automatically
Dear all, I failed to start the container's network interface automatically. I have to start it manually each time after the container finishes booting. I know that in a native fedora, if we want the network interface to start automatically, we should edit "/etc/sysconfig/network-script/ifcfg-eth0 and add the string "ONBOOT=yes". My host is fedora. I used "yum --installroot=/root/fedoralxc --releasever=16 install -y openssh, bridge-utils" to setup the rootfs for my container After rootfs installation, in the container's file system, there is no sub-directory named "network-scripts" in "/etc/sysconfig" . So, I created this directory manually and added a file named "ifcfg-eth0", but the container's network interface still cannot start automatically. I tried to add files ".bash_profile" and ".bashrc" in which I added the "ifconfig" in the shell script to try to configure eth0 automatically, but it still doesn't work. I wonder if there is a ".bashrc" for the root of a container? If there is, where should this file be located? Any comments will be highly appreciated. Cheng -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20140106/320f2b6a/attachment.htm>