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

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



http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1437

           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


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

Problem:
--------
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("-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))
+            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,
bridge))

         return ret

Kind regards,

Dirk Willbrandt


-- 
Configure bugmail: 
http://bugzilla.xensource.com/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


 


Rackspace

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