[libvirt] define tap-only networking

richard lucassen mailinglists at lucassen.org
Tue Dec 29 21:08:10 UTC 2009


On Tue, 29 Dec 2009 11:46:46 -0600
Charles Duffy <Charles_Duffy at messageone.com> wrote:

> > I'm pretty new to libvirt and I'd like to try to set up simple
> > networking as described here:
> > 
> > http://www.xaq.nl/kvm-tap-howto.txt
> > 
> > Is it possible to set up networking through simple tap devices using
> > the xml format? And if yes, can someone give me a hint how to set
> > this up?
> 
> I'd argue that that's considerably less "simple" than letting libvirt
> do  the work for you

You're right of course, but I'd like to try to set up networking like
this. Using virbr device and let libvirtd do the job is no problem of
course. I'm just eager to know whether it's possible to use tap-only
networking, and I had found the "ethernet" part of the howto. But I
haven't succeeded yet.

> -- but see 
> http://libvirt.org/formatdomain.html#elementsNICSEthernet to have 
> libvirt avoid doing anything more complex than setting up a tap device
> and then running a script of your choosing to do the remaining work.

That's just the page that is still quite misty for me. I think I miss
something crucial somewhere:

$ cat vnet1.xml

<network>
  <name>test1</name>
  <interface type='ethernet'>
    <ip address="10.1.253.129" netmask="255.255.255.248" />
    <target dev='vnet1'/>
    <script path='/home/kvm/bin/vnet1.sh'/>
  </interface>
</network>

$ virsh net-define vnet1.xml
Connecting to uri: qemu:///system
Network test1 defined from vnet1.xml

$ virsh net-define vnet1.xml
Connecting to uri: qemu:///system
Network test1 created from vnet1.xml

But all I get is a "virbr4":

$ /sbin/ifconfig virbr4

virbr4    Link encap:Ethernet  HWaddr 7a:32:2d:d5:28:bb  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

As I said, I'm new to libvirt, and I certainly miss some very crucial
link.

R.

-- 
___________________________________________________________________
It is better to remain silent and be thought a fool, than to speak
aloud and remove all doubt.

+------------------------------------------------------------------+
| Richard Lucassen, Utrecht                                        |
| Public key and email address:                                    |
| http://www.lucassen.org/mail-pubkey.html                         |
+------------------------------------------------------------------+




More information about the libvir-list mailing list