Xen 
 
Home About Xen.org Xen Xen Summit Wiki Mailing List Bug Tracker Xen Downloads
 
   
 

xen-users

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

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] hvm and routed networking.
From: John McCullough <jmccullo@xxxxxxxxxxx>
Date: Sat, 30 Sep 2006 10:06:45 -0700
Delivery-date: Sat, 30 Sep 2006 10:07:35 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <451C62C8.6060409@xxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Mail-followup-to: xen-users@xxxxxxxxxxxxxxxxxxx
References: <451C62C8.6060409@xxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.12-2006-07-14
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

<Prev in Thread] Current Thread [Next in Thread>