[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] xend: Extra qemu options: parallel, serial, monitor



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1261553793 0
# Node ID 52e8af2eba167eb2b0d4aa94048a969ede1ef789
# Parent  d3411ed9bd020b57dfcafc4fb967824fe880f31c
xend: Extra qemu options: parallel,serial,monitor

Allows par/ser ports to be configured with a path to backing device.
Allows qemu monitor to be disabled or redirected.

Signed-off-by: Daniel Kiper <dkiper@xxxxxxxxxxxx>
---
 tools/python/xen/xend/XendConfig.py |    3 ++-
 tools/python/xen/xend/image.py      |   20 +++++++++++++++-----
 tools/python/xen/xm/create.py       |   17 +++++++++++++----
 3 files changed, 30 insertions(+), 10 deletions(-)

diff -r d3411ed9bd02 -r 52e8af2eba16 tools/python/xen/xend/XendConfig.py
--- a/tools/python/xen/xend/XendConfig.py       Wed Dec 23 07:27:21 2009 +0000
+++ b/tools/python/xen/xend/XendConfig.py       Wed Dec 23 07:36:33 2009 +0000
@@ -145,11 +145,12 @@ XENAPI_PLATFORM_CFG_TYPES = {
     'keymap': str,
     'isa' : int,
     'localtime': int,
-    'monitor': int,
+    'monitor': str,
     'nographic': int,
     'nomigrate': int,
     'pae' : int,
     'rtc_timeoffset': int,
+    'parallel': str,
     'serial': str,
     'sdl': int,
     'opengl': int,
diff -r d3411ed9bd02 -r 52e8af2eba16 tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py    Wed Dec 23 07:27:21 2009 +0000
+++ b/tools/python/xen/xend/image.py    Wed Dec 23 07:36:33 2009 +0000
@@ -368,8 +368,17 @@ class ImageHandler:
         if not has_sdl and not has_vnc :
             ret.append('-nographic')
 
-        if int(vmConfig['platform'].get('monitor', 0)) != 0:
-            ret = ret + ['-monitor', 'vc']
+        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']
+            else:
+                ret = ret + ['-monitor', 'null']
+        else:
+            ret = ret + ['-monitor', vmConfig['platform'].get('monitor', 0)]
+
         return ret
 
     def getDeviceModelArgs(self, restore = False):
@@ -756,9 +765,10 @@ class LinuxImageHandler(ImageHandler):
 
     def parseDeviceModelArgs(self, vmConfig):
         ret = ImageHandler.parseDeviceModelArgs(self, vmConfig)
-        # Equivalent to old xenconsoled behaviour. Should make
-        # it configurable in future
-        ret = ["-serial", "pty"] + ret
+        if vmConfig['platform'].get('serial'):
+            ret = ["-serial", vmConfig['platform'].get('serial')] + ret
+        else:
+            ret = ["-serial", "pty"] + ret
         return ret
 
     def getDeviceModelArgs(self, restore = False):
diff -r d3411ed9bd02 -r 52e8af2eba16 tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py     Wed Dec 23 07:27:21 2009 +0000
+++ b/tools/python/xen/xm/create.py     Wed Dec 23 07:36:33 2009 +0000
@@ -503,12 +503,16 @@ gopts.var('fdb', val='FILE',
           fn=set_value, default='',
           use="Path to fdb")
 
+gopts.var('parallel', val='FILE',
+          fn=set_value, default='',
+          use="Path to parallel or pty or vc")
+
 gopts.var('serial', val='FILE',
           fn=set_value, default='',
           use="Path to serial or pty or vc")
 
-gopts.var('monitor', val='no|yes',
-          fn=set_bool, default=0,
+gopts.var('monitor', val='0|1|FILE',
+          fn=set_value, default=1,
           use="""Should the device model use monitor?""")
 
 gopts.var('localtime', val='no|yes',
@@ -737,6 +741,12 @@ def configure_image(vals):
         config_image.append(['root', cmdline_root])
     if vals.videoram:
         config_image.append(['videoram', vals.videoram])
+    if vals.parallel:
+        config_image.append(['parallel', vals.parallel])
+    if vals.serial:
+        config_image.append(['serial', vals.serial])
+    if vals.monitor:
+        config_image.append(['monitor', vals.monitor])
     if vals.extra:
         config_image.append(['args', vals.extra])
     if vals.superpages:
@@ -1052,12 +1062,11 @@ def configure_hvm(config_image, vals):
              'isa',
              'keymap',
              'localtime',
-             'monitor',
              'nographic',
              'opengl', 'oos',
              'pae', 'pci', 'pci_msitranslate', 'pci_power_mgmt',
              'rtc_timeoffset',
-             'sdl', 'serial', 'soundhw', 'stdvga',
+             'sdl', 'soundhw', 'stdvga',
              'timer_mode',
              'usb', 'usbdevice',
              'vcpus', 'vnc', 'vncconsole', 'vncdisplay', 'vnclisten',

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.