[Libvir] vif-nat network setup
Daniel P. Berrange
berrange at redhat.com
Thu Nov 23 14:58:13 UTC 2006
On Thu, Nov 23, 2006 at 06:19:20AM -0500, Daniel Veillard wrote:
> On Thu, Nov 23, 2006 at 12:02:30PM +0100, Tomas Kouba wrote:
> > Hello,
> > is it possible to setup a NAT-ed network with libvir?
> > My dom0 is configured so that it does a router for domUs and it
> > also does NAT for domUs. I can set this up manually but now I would
> > like to install some other domUs automatically with virt-install.
> >
> > I see that it uses libvir to create new domain from the XML description
> > so it should be easy to add some option that would configure the XML, but
> > I cannot find if the XML supports NAT setup.
> >
> > If I try 'virsh dumpxml' when the domU runs I get this:
> >
> > Unimplemented block at xend_internal.c:1667
> > <domain type='xen' id='1'>
> > <name>ce</name>
> > <uuid>400be3cf7cedc1d388de8796a85daff1</uuid>
> > <os>
> > <type>linux</type>
> > <kernel>/boot/vmlinuz-2.6.18-prep</kernel>
> > <initrd>/boot/initrd-2.6.18-prep.img</initrd>
> > <root>/dev/sda1</root>
> > <cmdline>fastboot ro root=/dev/sda1</cmdline>
> > </os>
> > <memory>131072</memory>
> > <vcpu>1</vcpu>
> > <on_poweroff>destroy</on_poweroff>
> > <on_reboot>restart</on_reboot>
> > <on_crash>restart</on_crash>
> > <devices>
> > <!-- Failed to parse vif: (device (vif (backend 0) (script vif-nat) (ip
> > 10.0.9.1/24) (mac 00:16:3E:47:A1:09) (vifname cevif))) -->
> > <console tty='/dev/pts/2'/>
> > </devices>
> > </domain>
> >
>
> Hum, looks like a missing feature, can you bugzilla this ?
Actually I added support for this a few weeks back
Tue Nov 14 18:42:01 EST 2006 Daniel Berrange <berrange at redhat.com>
* src/xend_internal.c: Added support for parsing non-bridge style
networking configs for guests.
* src/xml.c: Ensure the <ip address> element gets serialized to
the SEXPR for non-bridged networks.
* tests/xml2sexprtest.c, tests/sexpr2xmltest.c: Added new tests
covering different networking configs
* tests/xml2sexprdata/, tests/sexpr2xmldata/: Added more data
files for new test cases
Regards,
Dan.
--
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=|
|=- Perl modules: http://search.cpan.org/~danberr/ -=|
|=- Projects: http://freshmeat.net/~danielpb/ -=|
|=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|
More information about the libvir-list
mailing list