mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
xend: Fix 'monitor' domain config parameter.
Introduce new 'monitor_path' parameter, so that 'monitor' can revert to its old type and meaning. Fixes domain reboot and save/restore. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
This commit is contained in:
1 parent
f145152e22
commit
3781952178
3 files changed
+16
-10
No files matched your search
@@ -145,7 +145,8 @@ XENAPI_PLATFORM_CFG_TYPES = {
|
||||
'keymap': str,
|
||||
'isa' : int,
|
||||
'localtime': int,
|
||||
'monitor': str,
|
||||
'monitor': int,
|
||||
'monitor_path': str,
|
||||
'nographic': int,
|
||||
'nomigrate': int,
|
||||
'pae' : int,
|
||||
|
||||
@@ -371,13 +371,11 @@ class ImageHandler:
|
||||
if vmConfig['platform'].get('parallel'):
|
||||
ret = ret + ["-parallel", vmConfig['platform'].get('parallel')]
|
||||
|
||||
if type(vmConfig['platform'].get('monitor', 0)) is int:
|
||||
if int(vmConfig['platform'].get('monitor', 0)) != 0:
|
||||
ret = ret + ['-monitor', 'vc']
|
||||
if int(vmConfig['platform'].get('monitor', 0)) != 0:
|
||||
if vmConfig['platform'].get('monitor_path'):
|
||||
ret = ret + ['-monitor', vmConfig['platform'].get('monitor_path')]
|
||||
else:
|
||||
ret = ret + ['-monitor', 'null']
|
||||
else:
|
||||
ret = ret + ['-monitor', vmConfig['platform'].get('monitor', 0)]
|
||||
ret = ret + ['-monitor', 'vc']
|
||||
|
||||
return ret
|
||||
|
||||
|
||||
@@ -511,10 +511,14 @@ gopts.var('serial', val='FILE',
|
||||
fn=set_value, default='',
|
||||
use="Path to serial or pty or vc")
|
||||
|
||||
gopts.var('monitor', val='0|1|FILE',
|
||||
fn=set_value, default=1,
|
||||
gopts.var('monitor', val='no|yes',
|
||||
fn=set_bool, default=0,
|
||||
use="""Should the device model use monitor?""")
|
||||
|
||||
gopts.var('monitor_path', val='FILE',
|
||||
fn=set_value, default='',
|
||||
use="Non-default path to device model monitor")
|
||||
|
||||
gopts.var('localtime', val='no|yes',
|
||||
fn=set_bool, default=0,
|
||||
use="Is RTC set to localtime?")
|
||||
@@ -745,7 +749,10 @@ def configure_image(vals):
|
||||
config_image.append(['parallel', vals.parallel])
|
||||
if vals.serial:
|
||||
config_image.append(['serial', vals.serial])
|
||||
if vals.monitor:
|
||||
if vals.monitor_path:
|
||||
config_image.append(['monitor_path', vals.monitor_path])
|
||||
config_image.append(['monitor', 1])
|
||||
elif vals.monitor:
|
||||
config_image.append(['monitor', vals.monitor])
|
||||
if vals.extra:
|
||||
config_image.append(['args', vals.extra])
|
||||
|
||||