Re: ifname in openvz container

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

 



sorry, I forgot to mention a vzctl version which is 3.0.26-1.

knawnd@xxxxxxxxx wrote on 04/03/11 21:10:
Hi!

Is there any way to specify ethernet device name to be created inside
the openvz container?
I could find such info at
http://libvirt.org/formatdomain.html#elementsNICS.
If I do as below I get br0 as ethernet device inside VM whereas I'd like
it to be eth0.

$ cat ovz.xml
<domain type='openvz' id='144'>
<name>144</name>
<uuid>0071c128-58b4-4688-be17-1e062a22b36c</uuid>
<vcpu>1</vcpu>
<memory>524288</memory>
<os>
<type>exe</type>
<init>/sbin/init</init>
</os>
<devices>
<filesystem type='template'>
<source name='centos-5-x86'/>
<target dir='/'/>
</filesystem>
<interface type='bridge'>
<source bridge='br0'/>
</interface>
</devices>
</domain>

$ virsh create ovz.xml
Domain 144 created from ovz.xml

$ grep -i netif /etc/vz/conf/144.conf
NETIF="ifname=br0,bridge=br0,mac=52:54:00:74:DD:F3,host_ifname=veth144.0,host_mac=52:54:00:06:78:76"



br0 is a bridge on the server (CT0). But I would like to assign ethernet
device inside VM as eth0 i.e. ifname in VM config has to be eth0.
ovzkernel release is 2.6.18-194.26.1.el5.028stab081.1
OS is CentOS 5.5, libvirt/virsh version is 0.8.8.

Best regards,
Nikolay.


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

  Powered by Linux