ia64/xen-unstable

changeset 7681:8914eb171c66

After move randomMac to netif in 7637, we need to this for vmx guest.
otherwise, if no mac address configured, vmx guest can not be created.

Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
author kaf24@firebug.cl.cam.ac.uk
date Tue Nov 08 12:16:37 2005 +0100 (2005-11-08)
parents a7a35d0a4a7c
children 33b2e15c2ade
files tools/python/xen/xend/image.py
line diff
     1.1 --- a/tools/python/xen/xend/image.py	Tue Nov 08 12:14:33 2005 +0100
     1.2 +++ b/tools/python/xen/xend/image.py	Tue Nov 08 12:16:37 2005 +0100
     1.3 @@ -24,6 +24,7 @@ import xen.lowlevel.xc
     1.4  from xen.xend import sxp
     1.5  from xen.xend.XendError import VmError
     1.6  from xen.xend.XendLogging import log
     1.7 +from xen.xend.server.netif import randomMAC
     1.8  
     1.9  
    1.10  xc = xen.lowlevel.xc.new()
    1.11 @@ -276,6 +277,8 @@ class VmxImageHandler(ImageHandler):
    1.12                 ret.append("%s" % vbdparam)
    1.13              if name == 'vif':
    1.14                 mac = sxp.child_value(info, 'mac')
    1.15 +               if mac == None:
    1.16 +                   mac = randomMAC()
    1.17                 ret.append("-macaddr")
    1.18                 ret.append("%s" % mac)
    1.19              if name == 'vtpm':