From: "Alex Braunegg" <alex.braunegg@gmail.com>
To: xen-devel@lists.xen.org
Subject: [PATCH] libxl/libxl_dm.c: Enable websocket functionality
Date: Thu, 4 Feb 2016 08:50:22 +1100 [thread overview]
Message-ID: <56b27623.954b620a.b9ec7.ffff96d4@mx.google.com> (raw)
Hi all,
I have been testing the Xen 4.6.0 packages - however there is no way that I
have found to enable websocket support in any of the xen / qemu
configuration files.
The only way that I have been able to do this is with the following patch -
which works perfectly for my use case on a CentOS 6.x derived system:
-------------------------------------
diff -uNr xen-4.6.0.original/tools/libxl/libxl_dm.c
xen-4.6.0.modified/tools/libxl/libxl_dm.c
--- xen-4.6.0.original/tools/libxl/libxl_dm.c 2015-10-06
01:33:39.000000000 +1100
+++ xen-4.6.0.modified/tools/libxl/libxl_dm.c 2016-01-29
08:50:18.860371704 +1100
@@ -440,11 +440,11 @@
}
vncarg = vnc->listen;
} else {
- vncarg = libxl__sprintf(gc, "%s:%d", vnc->listen,
+ vncarg = libxl__sprintf(gc,
"%s:%d,websocket,x509=/etc/pki/xen", vnc->listen,
vnc->display);
}
} else
- vncarg = libxl__sprintf(gc, "127.0.0.1:%d", vnc->display);
+ vncarg = libxl__sprintf(gc,
"127.0.0.1:%d,websocket,x509=/etc/pki/xen", vnc->display);
if (vnc->passwd && vnc->passwd[0]) {
vncarg = libxl__sprintf(gc, "%s,password", vncarg);
@@ -806,11 +806,11 @@
}
vncarg = vnc->listen;
} else {
- vncarg = libxl__sprintf(gc, "%s:%d", vnc->listen,
+ vncarg = libxl__sprintf(gc,
"%s:%d,websocket,x509=/etc/pki/xen", vnc->listen,
vnc->display);
}
} else
- vncarg = libxl__sprintf(gc, "127.0.0.1:%d", vnc->display);
+ vncarg = libxl__sprintf(gc,
"127.0.0.1:%d,websocket,x509=/etc/pki/xen", vnc->display);
if (vnc->passwd && vnc->passwd[0]) {
vncarg = libxl__sprintf(gc, "%s,password", vncarg);
-------------------------------------
This however introduces 2 hard-coded items:
- Websocket will be enabled each time VNC is enabled.
- x509 certificate path
By default, the websocket port mirrors the vnc port = so vnc port = 5900,
then websocket port = 5700 and so on.
A better solution however in my mind would be to store the websocket & x509
path in the .cfg file for each virtual machine:
-------------------------------------
vnc=1
vncconsole=1
vnclisten='0.0.0.0'
vncpasswd='abcd1234'
vncdisplay=0
websocket=1 <- where 0 = disabled, 1 = enabled
x509={path} <- File system path to x509 files to cater for OS
system variance or user preference, would also allow for different
certificates per websocket connection if required
-------------------------------------
Best regards,
Alex
next reply other threads:[~2016-02-03 21:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-03 21:50 Alex Braunegg [this message]
2016-02-04 10:50 ` [PATCH] libxl/libxl_dm.c: Enable websocket functionality Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56b27623.954b620a.b9ec7.ffff96d4@mx.google.com \
--to=alex.braunegg@gmail.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.