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

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

 



On Tue, Jan 20, 2009 at 04:12:06PM +0100, Daniel Schwager wrote:
> Hi,
> 
> i would like to write a small script 
> 	- bringing up my qemu-kvm interface and 
> 	- connecting it to a bridge 
> using the following XML domain-syntax :
> 
>     ....	
>     <interface type='ethernet'>
>       <script path='/etc/kvm/qemu-ifup'/>
>     </interface>
>     ....	
> 
> The script will invoked (from qemu-kvm I thinkg) but
> I can't find any arguments like "interface name" - so
> my script cannot setup the bridge correctly because of
> missing information about the interface name.
> 
> At the moment, I look to the PPID (parent pid of the script) and
> parse the qemu commandline (ps ef) to find out the interfacename -
> but it's only a workaround.
> 
> Q: Is there a way to get informed about the interface libvirt/quemu used
> for the new domain ?

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.

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]