Git Product home page Git Product logo

vmware-cli's Introduction

Goals of VMWare CLI

  • Do basic operations with virtual machines running into an ESX / ESXi host
    • Start, stop, shutdown guest, reboot guest
    • List virtual machines and get some configuration informations
  • Do VM Cloning using a VMWare Converter server
    • Cloning on a single host
    • Cloning from an host to antother

Why anoher VMWare CLI ?

You can find the original VMWare CLI here. This CLI does not allow VMWare Converter operation and is based on vmx filename instead of virtual machine names.

Using VMWare CLI

Configure

Edit config.properties and add a section describing a new esx server : esx.my_server.hostname = hostname.toto.com esx.my_server.username = root esx.my_server.password = root_password

Basic commands

Launch interpreter : ./vmware-cli.sh VMWare-Cli>_

Example of available commands :

  • List virtual machines on an esx server : list my_server
  • Power on virtual machine on an esx server : power_on my_server vm_name
  • Power off virtual machine on an esx server : power_off my_server vm_name
  • Get details about a virtual machine on an esx server : show my_server vm_name
  • Move a vm into another resource pool : move_into_resource_pool my_server:vm_name resource_pool_name
  • Configure autostart of virtual machines : autostart_show my_server
  • Get full command list : help
Available commands : - help : this help Esx commands : - list esx_name : list virtual machiness of an esx server - show esx_name:vm_name : show details about a virtual machine - power_off esx_name:vm_name : power off a virtual machine on an esx server - power_on esx_name:vm_name : power on a virtual machine on an esx server - shutdown_guest esx_name:vm_name : try to shutdown a virtual machine on an esx server - reboot_guest esx_name:vm_name : try to reboot a virtual machine on an esx server - reset esx_name:vm_name : reset a virutal machine on an esx server - mount_tools esx_name:vm_name : mounts the vmware tools cd into virtual machine - unmount_tools esx_name:vm_name : mounts the vmware tools cd into virtual machine - move_into_resource_pool esx_name:vm_name resource_pool_name : move virtual machine into resource pool - list_resource_pool esx_name : list resources pool of an esx - autostart_show esx_name : show auto start config for an esx server - autostart_enable esx_name:vm_name : configure virtual machine for auto start - autostart_disable esx_name:vm_name : configure virtual machine for auto start - delete_from_disk esx_name:vm_name : delete a virtual machone from an esx host Converter commands : - list_tasks : lists all tasks of the converter - cancel_task task_id : cancel a converter task - copy_vm esx_source_name:vm_source_name esx_target_name:vm_target_name : copy virtual machine - clear_finished_task : clear all finished tasks

You have completion on commands with Tab.

Remark : you can launch all commands without interpreter : ./vmware_cli.sh list my_server

Installation

Requirements

  • Java 1.6
  • Maven 2.x or higher

Compilation

To compile vmware-cli : git clone git://github.com/bpaquet/vmware-cli.git cd vmware-cli mvn clean install

Download a precompiled version

You can also download the latest version on continuous integration server.

Installation

You have two solution :

  • use vmware-cli from compilation directory : nothing to do !
  • install vmware-cli in another directory :
    • copy the file target\vmware-cli-1.0-SNAPSHOT-jar-with-dependencies.jar into the target directory
    • copy the file vmware-cli.sh into the target directory, and adapt paths into the file

vmware-cli's People

Contributors

pcrane70 avatar mend-for-github-com[bot] avatar

Watchers

James Cloos 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.