Coder Social home page Coder Social logo

esxi-monitor's Introduction

ESXi Monitor

VMware ESXiのWebインターフェイスです.

将来,vSphere Client のようなものになる予定ですが,作りかけです.

API経由ではなく,sshでESXiにログインして操作するため,無償版でも大丈夫です. (事前に,SSH接続を許可する必要があります)

ESXi上のVMの一覧表示や,再起動などをブラウザ上からできます.

VMの作成・削除・複製もとりあえずできますが,まだ実装中です.

Installation

  • 事前にESXiへSSHでログインできることを確認
  • conf/app.jsonを編集,または環境変数ESXI_HOSTで,ESXiのホストを指定してください
  • bundle install
  • ruby esxi-web.rb
  • sinatraのデフォルトポート(4567)で待ち受けているのでブラウザで開く

64bit Windowsで実行時している場合,ログイン時に Creation of file mapping failed with error: 998 が発生することがありますが, pagent等を終了すると大丈夫かもしれません.

API

情報はjsonで取得できます.APIの仕様はコロコロ変わります.

現在の仕様は public/js下のlogin.jsやmonitor.jsを読むのが手っ取り早いです.

GET /api/v1/esxi/status

状態を取得.CSRFのトークンもとりあえずここに入っています.

POST /api/v1/esxi/connect

ログインして接続します.

※ログインしたSSHのコネクションはAPIにアクセスできる誰もが使える状態になります.(現状,セッション単位で管理したりはしません)

GET /api/v1/esxi/disconnect

切断します.

GET /api/v1/esxi/

ESXiの情報を取得します.hostsummary相当.

GET /api/v1/vms

VM一覧を取得.

GET /api/v1/vms/:vmid

VM情報.get.summary相当

DELETE /api/v1/vms/:vmid

VMを削除.

イベントリから削除し,ファイルも削除します.削除すると元には戻せません.

GETT /api/v1/vms/:vmid/power

get.runtimeのpowerState相当.

POST /api/v1/vms/:vmid/power

電源をコントロールします.

on, off, shutdown, reboot のいずれかをリクエストのボディとして送信してください.

POST /api/v1/vms/:vmid/copy

VMの複製をします.

この昨日は実装中で特定の構成の環境しかサポートしません.コピー先の名前とMACアドレスを指定してください.

GET /api/v1/vms/:vmid/guest

VMのゲストの情報.get.guest相当

esxi-monitor's People

Contributors

binzume avatar

Watchers

 avatar

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.