Skip to content
Snippets Groups Projects
Commit ed989d43 authored by Dmitry Fleytman's avatar Dmitry Fleytman Committed by Pekka Enberg
Browse files

run.py: fix --vnc parameter for xen


Current code injects vnc parameters into XL domain configuration
file improperly thus broking run.py for Xen

Signed-off-by: default avatarDmitry Fleytman <dmitry@daynix.com>
Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
parent aff32835
No related branches found
No related tags found
No related merge requests found
...@@ -5,6 +5,7 @@ import argparse ...@@ -5,6 +5,7 @@ import argparse
import os import os
import tempfile import tempfile
import errno import errno
import re
stty_params=None stty_params=None
...@@ -197,9 +198,18 @@ def start_osv_xen(options): ...@@ -197,9 +198,18 @@ def start_osv_xen(options):
print >> sys.stderr, "Unrecognized memory size" print >> sys.stderr, "Unrecognized memory size"
return; return;
vncoptions = re.match("^(?P<vncaddr>[^:]*):?(?P<vncdisplay>[0-9]*$)", options.vnc)
if not vncoptions:
raise Exception('Invalid vnc option format: \"' + options.vnc + "\"")
if vncoptions.group("vncaddr"):
args += [ "vnclisten=%s" % (vncoptions.group("vncaddr")) ]
if vncoptions.group("vncdisplay"):
args += [ "vncdisplay=%s" % (vncoptions.group("vncdisplay")) ]
args += [ args += [
"vnc=%s" % (options.vnc),
"memory=%d" % (memory), "memory=%d" % (memory),
"vcpus=%s" % (options.vcpus), "vcpus=%s" % (options.vcpus),
"maxcpus=%s" % (options.vcpus), "maxcpus=%s" % (options.vcpus),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment