diff options
Diffstat (limited to 'tools/python/xen/xend/image.py')
-rw-r--r-- | tools/python/xen/xend/image.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/python/xen/xend/image.py b/tools/python/xen/xend/image.py index e08417282d..832c16896b 100644 --- a/tools/python/xen/xend/image.py +++ b/tools/python/xen/xend/image.py @@ -919,8 +919,13 @@ class HVMImageHandler(ImageHandler): (nics, mac, model)) vifname = "vif%d.%d-emu" % (self.vm.getDomid(), nics-1) ret.append("-net") - ret.append("tap,vlan=%d,ifname=%s,bridge=%s" % - (nics, vifname, bridge)) + if osdep.tapif_script is not None: + script=",script=%s,downscript=%s" % \ + (osdep.tapif_script, osdep.tapif_script) + else: + script="" + ret.append("tap,vlan=%d,ifname=%s,bridge=%s%s" % + (nics, vifname, bridge, script)) if nics == 0: ret.append("-net") |