Giter VIP home page Giter VIP logo

mks's Introduction

MKS is the protocol for accessing the console of a virtual machine running on VMware vSphere. It is pretty much the same as VNC except the authentication part. This project aims to provide a cross-platform HTML5 client for the MKS protocol.

Installation

Install the project requirements (preferably into a virtualenv) :

$ pip install -r requirements.txt

Usage with vSphere 5.x

Start the MKS proxy. This is websocket proxy which sits between the client and the hypervisor and handles the authentication part. By default it binds to localhost:6090

$ ./mksproxy.py
Starting MKS proxy on localhost:6090

Run the mks.py script and specify the location of the VM with an URL like this:

$ ./mks.py 'mks://user:pass@somehost/?name=foo'

This will connect to 'somehost' (either ESX or vCenter), authenticate with user/pass and then open a web page that displays the VM console of the virtual machine with the name 'foo'. You can also locate the VM by its UUID like this:

$ ./mks.py 'mks://user:pass@somehost/?uuid=5965e99a-5f65-454d-bf0d-46ccc57d08db'

Usage with vSphere 6.0

Same as vSphere 5.x but you don't need to run mksproxy.py. Just run mks.py

How it works

If vSphere 5.x is detected, we use a modified version of noVNC and proxy server which creates websockets and talks to authd. Starting from vSphere 6, websocket consoles are supported out of the box, so we use the stock version of noVNC in this case. Both versions are served from http(s)://rgerganov.github.io/noVNC

Security notice

For simplicity's sake this code doesn't handle security "the right way". Don't use it in production.

mks's People

Contributors

rgerganov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mks's Issues

Not able to establish mks connection by hosting noVNC on local system

How can I setup mks connection by hosting noVNC on my local machine? I am not able to establish ws connection with esxi host when I use "localhost/noVNC" instead of "https://rgerganov.github.io/noVNC/6/". When I use your github noVNC link, I am able to establish a mks connection with ESXi 6 host (for which there is no need to run websockify proxy), but not able to do the same with "localhost/noVNC". Where I get this error "Server disconnected (code: 1006)"

Following is the Firebug screenshot after a failed connection.

image

Note: On my local system I have downloaded noVNC from this "https://github.com/rgerganov/noVNC/tree/gh-pages/"
I have one ESXi 6.0 host in my private environment.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.