[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] hvm and routed networking.



On Thu, Sep 28, 2006 at 05:03:20PM -0700, John McCullough wrote:
> Hash: SHA1
> 
> List,
> 
>   Is it possible to configure an hvm guest to work with routed
> networking?  /etc/xen/qemu-ifup and vl.c both suggest a predilection for
> bridge usage.
> 
> Regards,
> John McCullough

Inspired by:
http://qemu.dad-answers.com/viewtopic.php?p=6822&sid=c9e0f0d42ad50ae5da65918352b9a68b

Xen initializes qemu to bridge by default, so that needs to be turned
off.

For 3.0.3-rc1:
diff -r 000aa9510e55 tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py    Wed Sep 27 14:30:36 2006 +0100
+++ b/tools/python/xen/xend/image.py    Fri Sep 29 10:56:25 2006 -0700
@@ -335,11 +335,13 @@ class HVMImageHandler(ImageHandler):
                     mac = randomMAC()
                 bridge = sxp.child_value(info, 'bridge', 'xenbr0')
                 model = sxp.child_value(info, 'model', 'rtl8139')
+                #ret.append("-net")
+                #ret.append("nic,vlan=%d,macaddr=%s,model=%s" %
+                #           (nics, mac, model))
+                #ret.append("-net")
+                #ret.append("tap,vlan=%d,bridge=%s" % (nics, bridge))
                 ret.append("-net")
-                ret.append("nic,vlan=%d,macaddr=%s,model=%s" %
-                           (nics, mac, model))
-                ret.append("-net")
-                ret.append("tap,vlan=%d,bridge=%s" % (nics, bridge))
+                ret.append("tap,ifname=tap%d" % nics)

The above may not actually work for multiple vms -- I haven't tested it
but I suspect not.  I haven't studied the tap device creation.

The gateway on the tap1 device needs to be on the same subnet as the
domU, and in theory these need to be a separate subnet from the rest of
dom0 and the other domUs.  It is possible to fudge that.

-John 

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.