[libvirt] [PATCH 0/1] Added Networking API to change/create/etc. hostonly/internal network in VirtualBox

Daniel P. Berrange berrange at redhat.com
Wed May 6 09:41:27 UTC 2009

On Wed, Apr 29, 2009 at 01:14:10PM +0200, Pritesh Kothari wrote:
> Hi All:
> [PATCH 0/1]: Contains sample xml file showing features supported so far.
> [PATCH 1/1]: Contains the patch for adding Networking API to 
> change/create/etc. hostonly/internal network in VirtualBox

> <network>
> 	<name>vboxnet0</name>
> 	<uuid>786f6276-656e-4074-8000-0a0027000000</uuid>
> 	<forward mode='hostonly'/>

This line isn't neccessary - AFAICT there is no forwarding off traffic
from hostonly networks to the LAN. Just set VIR_NETWORK_FORWARD_NONE 
for this.

> 	<bridge stp='off' forwardDelay='0' />

This looks like a bug in our XML formatter - it shouldn't be generating
a <bridge> tag if there is no bridge :-)

> 	<ip address='' netmask=''>
> 		<dhcp>
> 			<range start='' end='' />
> 			<host mac='78:16:3e:4d:c7:9e' name='vboxnet0' ip='' />
> 		</dhcp>
> 	</ip>

The IP address is confusing me a litle here. I'm not sure why there
are two different IP addresses for the host.

In my test box I have an interface

vboxnet0  Link encap:Ethernet  HWaddr 00:76:62:6E:65:74  
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::276:62ff:fe6e:6574/64 Scope:Link
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:25 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 b)  TX bytes:5320 (5.1 KiB)

And the XML is shown as

  <ip address='' netmask=''>
      <range start='' end='' />
      <host mac='00:76:62:6e:65:74' name='vboxnet0' ip='' />

What I'd expect though, is that the IP address of the interface is
listed as the <ip address=''> tag, not as a <host>  tag - the latter
is for defining static IP mapping for guest VMs. So I'd expect the
XML to loook like

  <ip address='' netmask=''>
      <range start='' end='' />

But what is this second IP address virtualbox seems to have for the DHCP
server ?!?!

> </network>

|: 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 :|

More information about the libvir-list mailing list