mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
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>
This commit is contained in:
1 parent
bf4822dafb
commit
e1734495d8
1 file changed
+3
@@ -24,6 +24,7 @@ import xen.lowlevel.xc
|
||||
from xen.xend import sxp
|
||||
from xen.xend.XendError import VmError
|
||||
from xen.xend.XendLogging import log
|
||||
from xen.xend.server.netif import randomMAC
|
||||
|
||||
|
||||
xc = xen.lowlevel.xc.new()
|
||||
@@ -276,6 +277,8 @@ class VmxImageHandler(ImageHandler):
|
||||
ret.append("%s" % vbdparam)
|
||||
if name == 'vif':
|
||||
mac = sxp.child_value(info, 'mac')
|
||||
if mac == None:
|
||||
mac = randomMAC()
|
||||
ret.append("-macaddr")
|
||||
ret.append("%s" % mac)
|
||||
if name == 'vtpm':
|
||||
|
||||