On Wed, 2007-01-17 at 18:38 +0000, Mark McLoughlin wrote:
On Tue, 2007-01-16 at 22:28 +0000, Daniel P. Berrange wrote:
> On Mon, Jan 15, 2007 at 08:06:18PM +0000, Mark McLoughlin wrote:
> > Virtual Networks will be implemented in libvirt. First,
there will be an
> > XML description of Virtual Networks e.g.:
> >
> > <network id="0">
> > <name>Foo</name>
> > <uuid>596a5d2171f48fb2e068e2386a5c413e</uuid>
> > <listen address="172.31.0.5" port="1234" />
> > <connections>
> > <connection address="172.31.0.6" port="4321"
/>
> > </conections>
> > <dhcp enabled="true">
> > <ip address="10.0.0.1"
> > netmask="255.255.255.0"
> > start="10.0.0.128"
> > end="10.0.0.254" />
> > </dhcp>
> > <forwarding enabled="true">
> > <incoming default="deny">
> > <allow port="123" domain="foobar"
destport="321" />
> > </incoming>
> > <outgoing default="allow">
> > <deny port="25" />
> > </outgoing>
> > </forwarding>
> > <network>
>
> Got to also think how we connect guest domains to the virtual network.
Right, further on in the mail I said:
* Where is the connection between domains and networks in either
the API or the XML format? How is a domain associated with a
network? You put a bridge name in the <network> definition
and use that in the domains <interface> definition? Or you put
the network name in the interface definition and have libvirt
look up the bridge name when creating the guest?
> Currently we just have something really simple like
>
> <interface type="bridge">
> <source bridge='xenbr0'/>
> <mac address='00:11:22:33:44:55'/>
> </interface>
>
> I guess we've probably want to refer to the UUID of the network to map
> it into the guest.
Well, the UUID isn't much good if you can't map it. So, it would
probably be the name and libvirt URI, right?
Related to the last patch, how about we just put the network name in
the interface definition?
Attached are patches implementing this for both QEMU and Xen guests.
Cheers,
Mark.