From 5a501d836b8be485cfdd96bc5d3d43f60821da1c Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Wed, 21 Sep 2011 19:43:38 +0300 Subject: qmp: open chardev as ipv4 --- spice2 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/spice2 b/spice2 index dbe773a..954de50 100755 --- a/spice2 +++ b/spice2 @@ -219,6 +219,8 @@ def set_title(x): sys.stdout.write("\033]0;%s\007" % str(x)) def file_in_use(x): + print "not calling lsof -t %s" % x + return False return not subprocess.call(['lsof', '-t', x], stdout=subprocess.PIPE, stderr=subprocess.PIPE) @@ -477,8 +479,10 @@ def build_qemu_cmdline_and_env(args): str(args.memory), "-cpu", str(args.cpu)] + build_spice_option(args) if args.qmp_port: + # TODO - make it both ipv6 and ipv4? didn't test, but if no ipv4 is given + # the socket may only be ipv6, which complicates a lot of python code needlessly. cmdline.extend(["-chardev", - "socket,id=qmpmon,host=localhost,port=%s,server,nowait" % args.qmp_port, + "socket,id=qmpmon,host=localhost,port=%s,server,nowait,ipv4" % args.qmp_port, "-mon", "chardev=qmpmon,mode=control"]) if args.snapshot: cmdline.append("-snapshot") -- cgit v1.2.3