Re: How to configure the container's NIC automatically with an assigned IP address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Gene,

Thank you for your response.

I want to assign a static IP address to my container, I wonder if I can achieve this by editing the containers /etc/sysconfig/network-scripts/ifcfg-eth0. I tried this, but failed, and eth0 is always not assigned an IP address automatically (my host and guest are fedora19).

Am I missing something? I dont know much about the booting procedure of a container, and how the network NIC is configured during the booting.

The content of containers /etc/sysconfig/network-scripts/ifcfg-eth0 is as follows:

BOOTPROTO=static

DEVICE=eth0

TYPE=Ethernet

_ONBOOT_=yes

IPADDR=192.168.128.15

PREFIX=24

GATEWAY=192.168.128.254

 

With my warmest regards,

Cheng

 

 

 

> Dear all,

> 

> I want to run a TCP/IP application automatically after I start the

> container using "virsh -c lxc:/// start mycontainer". Does anybody

> know how to configure the NIC automatically with an assigned IP

> address? I couldn't find useful information from domain XML format

> spec and it only talks how to set the mac address

> (http://libvirt.org/formatdomain.html) .

> 

> Your response will be highly appreciated.

> 

> Cheng

> 

> 

Take a look at: http://sandbox.libvirt.org/networking/

 

Note: Specifying dhcp does not currently work.  I have created a patch to fix that.  See:

https://bugzilla.redhat.com/show_bug.cgi?id=1133686

 

 

_______________________________________________
libvirt-users mailing list
libvirt-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvirt-users

[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux