xend: 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.

Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
This commit is contained in:
Keir Fraser committed 2008-08-05 09:29:42 +01:00
1 parent 2765f0bf9f
commit 45f66e11cc
1 file changed
+4
+4
View File
@@ -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):
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.