WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] Each TAP/TUN device name for a HVM guest includes it

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Each TAP/TUN device name for a HVM guest includes its domain ID.
From: MIYAJIMA Mitsuharu <miyajima.mitsuharu@xxxxxxxxx>
Date: Tue, 11 Mar 2008 13:12:18 +0900 (JST)
Delivery-date: Mon, 10 Mar 2008 21:12:04 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
The TAP/TUN devices are used for connection to a HVM domain, but there
is no relationship between each name of the devices and its domain ID.

This patch assigns a HVM domain ID to each name of the TAP/TUN devices.

Signed-off-by: MIYAJIMA Mitsuharu <miyajima.mitsuharu@xxxxxxxxx>
diff -r 59b8768d0d0d tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py    Wed Mar 05 11:18:25 2008 +0000
+++ b/tools/python/xen/xend/image.py    Tue Mar 11 13:06:14 2008 +0900
@@ -580,7 +580,8 @@ class HVMImageHandler(ImageHandler):
             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,vlan=%d,ifname=tap%d.%d,bridge=%s" %
+                       (nics, self.vm.getDomid(), nics-1, bridge))
 
         return ret
 
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Each TAP/TUN device name for a HVM guest includes its domain ID., MIYAJIMA Mitsuharu <=