[Libvir] vif-nat network setup

Tomas Kouba tomas at jikos.cz
Thu Nov 23 11:02:30 UTC 2006


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>


Thanks for any answer.

-- 
Tomas Kouba




More information about the libvir-list mailing list