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][IOEMU] remove default NIC in qemu when no vif config

To: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH][IOEMU] remove default NIC in qemu when no vif configured
From: "Zhai, Edwin" <edwin.zhai@xxxxxxxxx>
Date: Tue, 5 Aug 2008 16:26:25 +0800
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, "Zhai, Edwin" <edwin.zhai@xxxxxxxxx>
Delivery-date: Tue, 05 Aug 2008 01:27:52 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.16 (2007-06-09)
Latest QEMU would add a NIC device by default, unless specify the "-nic none".  
So end user still get a unusable NIC even no vif in the config file.

This simple patch can fix it.

Signed-off-by: Zhai Edwin <edwin.zhai@xxxxxxxxx>

diff -r 37ebd7eae0be tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py    Tue Apr 15 17:23:39 2008 +0800
+++ b/tools/python/xen/xend/image.py    Tue Aug 05 16:04:08 2008 +0800
@@ -777,6 +777,10 @@ class HVMImageHandler(ImageHandler):
             ret.append("tap,vlan=%d,ifname=tap%d.%d,bridge=%s" %
                        (nics, self.vm.getDomid(), nics-1, bridge))
 
+        if nics == 0:
+            ret.append("-net")
+            ret.append("none")
+
         return ret
 
     def getDeviceModelArgs(self, restore = False):



-- 
best rgds,
edwin

Attachment: qemu_no_nic_fix.patch
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>