mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 02:30:03 +01:00
Fix the backward compatibility support for using 'vcpus' in the image section of the domain sexp.
Signed-off-by: Robert Read <robert@xensource.com>
This commit is contained in:
1 parent
c362c8308e
commit
ebaab45e14
1 file changed
+3
-1
@@ -294,7 +294,9 @@ def parseConfig(config):
|
||||
try:
|
||||
if result['image']:
|
||||
v = sxp.child_value(result['image'], 'vcpus')
|
||||
if v is not None and int(v) != result['vcpus']:
|
||||
if result['vcpus'] is None and v is not None:
|
||||
result['vcpus'] = int(v)
|
||||
elif v is not None and int(v) != result['vcpus']:
|
||||
log.warn(('Image VCPUs setting overrides vcpus=%d elsewhere.'
|
||||
' Using %s VCPUs for VM %s.') %
|
||||
(result['vcpus'], v, result['uuid']))
|
||||
|
||||