aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-08-05 09:29:42 +0100
committerKeir Fraser <keir.fraser@citrix.com>2008-08-05 09:29:42 +0100
commit45f66e11cc2fd740762e43a5b41318ebc316b471 (patch)
tree98f822c1f5136c8bca5cfbdd3c6a847adeacba8a /tools
parent2765f0bf9f8c65ce43c5e8cfc4d08cd32b90180d (diff)
downloadxen-45f66e11cc2fd740762e43a5b41318ebc316b471.tar.gz
xen-45f66e11cc2fd740762e43a5b41318ebc316b471.tar.bz2
xen-45f66e11cc2fd740762e43a5b41318ebc316b471.zip
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>
Diffstat (limited to 'tools')
-rw-r--r--tools/python/xen/xend/image.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/python/xen/xend/image.py b/tools/python/xen/xend/image.py
index 3b1fc4225c..49cce20225 100644
--- a/tools/python/xen/xend/image.py
+++ b/tools/python/xen/xend/image.py
@@ -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):