[libvirt] invoking interface.script - missing interface name of domain

Daniel Schwager Daniel.Schwager at dtnet.de
Tue Jan 20 15:44:22 UTC 2009


Hi Daniel,

thx for the fast answer. 

> QEMU is responsible for passing arguments to the interface scripts,
> so its out of libvirt's control. QEMU passes a single paramter to
> the script, which is the name of the TAP device interface being
> added.  If you don't give a <target dev='tap3'> libvirt generates
> a TAP device name vnetXXXX.

If I do not specify the <target>-element inside of <interface>,
your docu told me 

	"The guest will have a tun device created with a name of vnetN,
which can also be overridden with the <target> element."
	(http://www.libvirt.org/formatdomain.html#elementsNICS)

I understood this in the following way: I can remove the target-element
and 
I will get automatically a target name "vnet<N>" - if I do this, I will
get an
interfacename "(null") :

5459 ?        Sl     0:01 /usr/bin/kvm -S -M pc -m 500 -smp 1 -name
solidcam -uuid 60a8db24-86a5-f9fc-16ee-b60b32411dd8 -monitor pty -boot c
-drive file=/srv/winxp127-xxx.dsk,if=ide,index=0,boot=on -net
nic,macaddr=52:54:00:46:58:41,vlan=0 -net
tap,ifname=(null),script=/etc/kvm/qemu-ifup,vlan=0 -serial pty -parallel
none -usb -usbdevice tablet -vnc 0.0.0.0:0

So, this means libvirt is NOT responsible for the naming auf the target.
Maybe you have to clarify this in the docu.

For my case, I have to write a domain-xml dynamically and specify the
interface name (target-element) to the domain-xml
like 

     <interface type='ethernet'>
       <script path='/etc/kvm/qemu-ifup'/>
       <target dev='my-new-name001122'/>
     </interface>

regards
Danny





More information about the libvir-list mailing list