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/
Home Products Support Community News


[Xen-bugs] [Bug 1437] New: qemu-dm ignores vifname-Parameter

To: xen-bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-bugs] [Bug 1437] New: qemu-dm ignores vifname-Parameter
From: bugzilla-daemon@xxxxxxxxxxxxxxxxxxx
Date: Wed, 25 Mar 2009 04:33:04 -0700
Delivery-date: Wed, 25 Mar 2009 04:33:08 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-bugs-request@lists.xensource.com?subject=help>
List-id: Xen Bugzilla <xen-bugs.lists.xensource.com>
List-post: <mailto:xen-bugs@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-bugs>, <mailto:xen-bugs-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-bugs>, <mailto:xen-bugs-request@lists.xensource.com?subject=unsubscribe>
Reply-to: bugs@xxxxxxxxxxxxxxxxxx
Sender: xen-bugs-bounces@xxxxxxxxxxxxxxxxxxx

           Summary: qemu-dm ignores vifname-Parameter
           Product: Xen
           Version: unspecified
          Platform: x86-64
        OS/Version: Linux-2.6
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: HVM
        AssignedTo: xen-bugs@xxxxxxxxxxxxxxxxxxx
        ReportedBy: xen-bugs@xxxxxxxxxxxxx

Arch: x86_64
CPU: Intel 5130
OS: Debian GNU/Linux 5.0
Xen: Shipped Xen Version 3.2-1

For Management-Reasons i need unique Network-Interface Names that belongs easy
to the create VM.

By creating a Paravirtualized VM, the Parameter "vifname=" is used to set the
Interface Name.

By creating a Hardware Virtualized VM, the Parameter "vifname=" is not parsed
to the qemu-dm, so qemu-dm create a Network-Interface with a Name like "tapX"
which is very hard to allocate for me to the right HVM.

How to reproduce:
Create a HVM-Configuration with vif = ['...vifname=...'] and start the HVM.
Call "ifconfig" and you will see a new Network-Interface which is not named
like that in "vifname".

In the qemu-dm-*.log is the Output of the Used Network-Interface Name.

How to solve:
Here is a Unified diff that solves the Problem, and names the qemu-dm
Network-Interface like the name in "vifname".

--- image.py    2009-03-25 12:24:10.000000000 +0100
+++ image.py.orig       2009-03-25 12:22:03.000000000 +0100
@@ -497,13 +497,17 @@
             mac = devinfo.get('mac')
             if mac is None:
                 raise VmError("MAC address not specified or generated.")
+            difname = devinfo.get('vifname')
             bridge = devinfo.get('bridge', 'xenbr0')
             model = devinfo.get('model', 'rtl8139')
             ret.append("nic,vlan=%d,macaddr=%s,model=%s" %
                        (nics, mac, model))
-            ret.append("tap,vlan=%d,bridge=%s" % (nics, bridge))
+            if difname is None:
+                ret.append("tap,vlan=%d,bridge=%s" % (nics, bridge))
+            else:
+                ret.append("tap,vlan=%d,ifname=%s,bridge=%s" % (nics, difname,

         return ret

Kind regards,

Dirk Willbrandt

Configure bugmail: 
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Xen-bugs mailing list

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