remove default NIC in qemu when no vif configured
PATCH 1/1 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 <[email protected]>
tools/python/xen/xend/image.py +4 -0
@@ -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):
Signature · 2 lines
best rgds, edwin
tools/python/xen/xend/image.py +4 -0
@@ -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):
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Zhai, Edwin writes ("[PATCH][IOEMU] remove default NIC in qemu when no vif configured"):
Quoted 3 lines
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.