The osc
command line permits to run ssvncviewer
over the websocket
provided by OpenNebula websocket proxy.
osc
is self contained for the moment, you just need to clone this
repository and add it to $PATH
.
It requires the following dependencies:
We now only support python3 since we use f-strings and remove
urlparse
dependency.
Just run the osc
script, it will show you the list of your virtual
macines and ask you which action to run on the selected one.
You can provide the --vm <ID>
to specify the ID of the virtual
machine.
Actually, this script only permit to start a ssvncviewer
over
WebSocket, either by selecting it interactively or by using --startvnc
command line option.
osc
use
one_auth
to play Basic Authentication on Sunstone.
You can provide the --auth
parameter to point to alternative
one_auth
file.
The Sunstone URL is retrieve in the following order:
- from command line parameter
--url
- from environment variable
ONE_SUNSTONE
If your OpenNebula NoVNC is behind a reverse proxy, you will need to
pass options --ws-port
to specify the port number and --ws-path
to
specify the URL path.
By default, --ws-port
is 29876
and --ws-path
is /
but if your
NoVNC is accessible on port 443
under the directory /websockify
(as proposed in issue#2781),
you must use:
osc --url https://one.example.net --ws-port 443 --ws-path /websockify
Actually it can only run ssvncviewer
on one virtual macine.
The goal is to have an interactive shell to successively and concurrently run actions on virtual macines, for example, we can imagine the following use case:
- Start VNC client on virtual macine
X
=> this spawn a newssvncviewer
and come back to the interactive shell - PowerOff virtual macine
Y
=> this start thePOWEROFF
command on the virtual macine, come back to the interactive shell - Start VNC client on virtual macine
Z
=> this spawn a newssvncviewer
and come back to the interactive shell - virtual macine
Y
is nowPOWEROFF
, a message is displayed on the console