Zhai, Edwin
2008-Aug-05 08:26 UTC
[Xen-devel] [PATCH][IOEMU] remove default NIC in qemu when no vif configured
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@intel.com>
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
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
Ian Jackson
2008-Aug-11 09:59 UTC
[Xen-devel] Re: [PATCH][IOEMU] remove default NIC in qemu when no vif configured
Zhai, Edwin writes ("[PATCH][IOEMU] remove default NIC in qemu when no vif
configured"):> 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.
Thanks. (I see Keir has applied this.)
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel