[libvirt] Allowing <interface type="none"> for network interface definition

Gihan Munasinghe GMunasinghe at Xcalibre.co.uk
Tue Dec 2 21:24:24 UTC 2008


Hi 

I am writing a management stack for our platform using libvirt. We have many DomU images which all have PV drivers loaded for network.I want to start these DomU guests with only the PV network device being visible from within the DomU.

This is a requirement in the platform and hopefully, I presume there are other people with the same requirement..

But when creating a server, libvirt sends (type ioemu) tag to xend. Which make all of our vm's to have 2 network cards. Using the normal xm command I can send type=none ( vif = [ "mac=00:16:3e:00:a5:57,bridge=eth0,script=vif-bridge,type=none"]) to xend. Which will send qeum-dm "-net none" switch which solves the problem.

After doing some investigation, I did some code change in libvirt0.5.0 to support a attribute called "none" with in <interface type="">, that will send xend the tag (type none). Allowing qeum-dm to be configured with "-net none" switch.  ;-) 

So you can define your network tag as 

 <interface type='none'> <!-- This will send qeum-dm -net none switch -->
    <!-- Other configurations will work as normal -->
      <mac address='00:16:3e:00:a5:57'/>
      <source bridge='eth0'/>
      <target dev='vif47.0'/>
 </interface>

I this the proper way of doing it?  :-\ 

Would this be a general functionality that libvirt community will be interested in (I think this add bit more flexibility to libvirt of the way user want to write their own management stack). If so could I contribute the patch to the mailing list. 

Looking forward to hearing from you all, I am new to libvirt therefore any comments will be greatly appreciated  :-)   

Thanks 
Gihan  

-- 
Gihan Munasinghe
R&D Team Leader
XCalibre Communications Ltd.
www.flexiscale.com




More information about the libvir-list mailing list