Projet

Général

Profil

OSC » Historique » Version 13

« Précédent - Version 13/17 (diff) - Suivant » - Version actuelle
Gérald Schwartzmann, 15/01/2016 12:04


OSC

OSC est un script permettant de se connecter aux machines virtuelles OpenNebula avec un client lourd VNC (ssvncviewer).

Installer ssvncviewer, python-gevent et python-websocket :

# apt-get install -y ssvnc python-gevent python-websocket python-bs4 python-requests

Télécharger le script OSC et le rendre exécutable :

$ wget https://raw.githubusercontent.com/baby-gnu/one-sunstone-rest-client/master/osc
$ chmod +x osc

Créer le fichier d'authentification :

$ mkdir ~/.one/
$ vi ~/.one/one_auth

Contenu du fichier ~/.one/one_auth :

 <LOGIN_NEBULA>:<PASSWORD_NEBULA>

Exécuter la commande interactive :

$ python osc --url http://one.eole.lan/

Ou directement :

$ python osc --url http://one.eole.lan/ --vm <ID_VM> --startvnc

<ID_VM> est l'ID OpenNebula de la machine virtuelle (voir dans l'interface "Virtual Resources" => "Virtual Machines" => "ID").

FAQ

$ python osc --url http://one.eole.lan/
Traceback (most recent call last):
  File "osc", line 36, in <module>
    from bs4 import BeautifulSoup
ImportError: No module named bs4

Installer python-bs4 et non python3-bs4