<div dir="ltr">Hi all, 
<div><br></div><div> I am using libvirt to manage VM on my system; after creating a VM (default no NICs are present in the configuration) you can add any number of interfaces to it (as long as they exist on the host).</div><div>To do that, I edit the configuration xlm:</div><div><br></div><div><div>      vmXml = self.domain.XMLDesc()</div><div>        root = ET.fromstring(vmXml)</div><div>        devices = root.find('./devices')</div><div><br></div><div>        intf = ET.SubElement(devices,'interface')</div><div>        intf.set('type', 'bridge')</div><div>        src = ET.SubElement(intf,'source')</div><div>        src.set('bridge', bIntf)</div><div>        model = ET.SubElement(intf,'model')</div><div>        model.set('type', 'e1000')</div><div><br></div><div>        xml = ET.tostring(root)              </div><div>        self.conn.defineXML(xml)</div></div><div><br></div><div>Now the problem I have is that the MAC addresses are auto-generated and because of this there is no way to predict which interface number the newly added interface will map to, on the VM. Ideally, the first added interface is mapped to eth0/0, the second one eth0/1...etc.  Since the mappings depend on the MAC addresses I figured that is the part I need to have control over.</div><div><br></div><div>Any ideas?</div><div><br></div><div>Thanks,</div><div>Andrei</div></div>

<br>

        
        
        


<p><img src="http://www.klasonline.com/klas_telecom_email_sig_1_01.jpg"></p><p><span style="font-family:Arial;font-size:x-small">The information
transmitted is intended only for the person or entity to which it is
addressed and may contain confidential and/or privileged material.
Any review, retransmission, dissemination or other use of or taking
of any action in reliance upon this information by persons or
entities other than the intended recipient is prohibited. If you
receive this in error please contact the sender and delete the
material from any computer immediately. It is the policy of Klas
 Limited to disavow the sending of offensive material and should
you consider that the material contained in the message is offensive
you should contact the sender immediately and also your I.T. Manager.</span></p><p><span style="font-family:Arial;font-size:x-small">Klas Telecom
Inc., a Virginia Corporation with offices at 1101 30th St. NW,
Washington, DC 20007.</span></p>
<p>
<font color="#000000"><font face="Arial"><font size="1">Klas Limited
(Company Number 163303) trading as Klas Telecom, an Irish Limited
Liability Company, with its registered office at Fourth Floor, One
Kilmainham Square, Inchicore Road, Kilmainham, Dublin 8, Ireland.</font></font></font></p>