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-changelog

[Xen-changelog] [xen-unstable] xm: Use 'vifname' config option to constr

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xm: Use 'vifname' config option to construct a qemu tap name.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 16 Oct 2009 01:10:20 -0700
Delivery-date: Fri, 16 Oct 2009 01:11:59 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1255678582 -3600
# Node ID 38a20d76cdec60c5fa3e4480d487d5ae6181843c
# Parent  4872dc215d62d5d5f57869619d36d854342860c5
xm: Use 'vifname' config option to construct a qemu tap name.

Signed-off-by: Jim Fehlig <jfehlig@xxxxxxxxxx>
---
 tools/python/xen/xend/image.py |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff -r 4872dc215d62 -r 38a20d76cdec tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py    Fri Oct 16 08:35:21 2009 +0100
+++ b/tools/python/xen/xend/image.py    Fri Oct 16 08:36:22 2009 +0100
@@ -873,9 +873,14 @@ class HVMImageHandler(ImageHandler):
             ret.append("-net")
             ret.append("nic,vlan=%d,macaddr=%s,model=%s" %
                        (nics, mac, model))
+            vifname = devinfo.get('vifname')
+            if vifname:
+                vifname = "tap-" + vifname
+            else:
+                vifname = "tap%d.%d" % (self.vm.getDomid(), nics-1)
             ret.append("-net")
-            ret.append("tap,vlan=%d,ifname=tap%d.%d,bridge=%s" %
-                       (nics, self.vm.getDomid(), nics-1, bridge))
+            ret.append("tap,vlan=%d,ifname=%s,bridge=%s" %
+                       (nics, vifname, bridge))
 
         if nics == 0:
             ret.append("-net")

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xm: Use 'vifname' config option to construct a qemu tap name., Xen patchbot-unstable <=