mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
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:
1 parent
2765f0bf9f
commit
45f66e11cc
1 file changed
+4
@@ -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):
|
||||
|
||||