To get help on the command-line for the script use the command:
vmpooler_client_app.py -h
# Create a token (only on first run) $ ./vmpooler_client_app.py token create Please provide LDAP credentials for the VM pooler Username: bob.smith Password: Token: <token> # List available templates $ ./vmpooler_client_app.py vm list redhat redhat-4-x86_64 redhat-5-i386 redhat-5-x86_64 redhat-6-i386 redhat-6-x86_64 redhat-7-x86_64 # Grab a VM $ ./vmpooler_client_app.py vm get redhat-6-x86_64 Hostname: h2qbe7c29ix2w1r # Login and do work $ ssh root@h2qbe7c29ix2w1r # Logout # Give vm back to the pool $ ./vmpooler_client_app.py vm destroy h2qbe7c29ix2w1r
vmpooler_client_app.py
is separated into a few subcommands:
vmpooler_client_app.py * vm * list * get * destroy * destroy_all * info * running * lifetime * get * extend * set * token * create * validate * revoke * config * get * set * list * unset
Help is available for each subcommand by appending -h
to the
command:
vmpooler_client_app.py lifetime set -h
This will list all the available templates.
Usage
vmpooler_client_app.py vm list
Filter available templates via a fuzzy matching pattern.
Usage
vmpooler_client_app.py vm list PATTERN
Example
vmpooler_client_app.py vm list win
Usage
vmpooler_client_app.py vm get TEMPLATE_NAME
Example
vmpooler_client_app.py vm get ubuntu-1404-x86_64
This gives you a concise list of what VMs you have running
Usage
vmpooler_client_app.py vm running
Example Output
l2l7jdlpt6xlptq | Running: 4.27 hours | centos-6-i386 etcgjzxks2vtw9t | Running: 0.15 hours | centos-5-i386
Usage
vmpooler_client_app.py vm destroy VM_NAME
Example
vmpooler_client_app.py vm destroy skj3k4hahdk
Be careful, this will destroy every active VM associate with your token
Usage
vmpooler_client_app.py vm destroy_all
Example Output
Destroying etcgjzxks2vtw9t Destroying l2l7jdlpt6xlptq
Usage
vmpooler_client_app.py lifetime get VM_NAME
Example
vmpooler_client_app.py lifetime get skj3k4hahdk
This command will add a certain number of hours to the lifetime of a VM Usage
vmpooler_client_app.py lifetime extend VM_NAME LIFETIME
Example
vmpooler_client_app.py lifetime extend skj3k4hahdk 2 > Lifetime extended to 10 hours
This command will overwrite the time to live for a VM
Usage
vmpooler_client_app.py lifetime set VM_NAME LIFETIME
Example
vmpooler_client_app.py lifetime set skj3k4hahdk 24
This will work on running and destroyed VMs in the vmpooler.
Usage
vmpooler_client_app.py vm info VM_NAME
Example
vmpooler_client_app.py vm info skj3k4hahdk
WARNING! Know what you’re doing before using this function!
Usage
vmpooler_client_app.py token create
WARNING! Know what you’re doing before using this function!
Usage
vmpooler_client_app.py token revoke TOKEN
Example
vmpooler_client_app.py token revoke sfn3h65earxah6ar9aal3oac2pfx9817
WARNING! Know what you’re doing before using this function!
Usage
vmpooler_client_app.py token validate TOKEN
Example
vmpooler_client_app.py token validate sfn3h65earxah6ar9aal3oac2pfx9817
Usage
vmpooler_client_app.py config get SETTING_NAME
Example
vmpooler_client_app.py config get username
Modify an existing setting or create add a new setting if it doesn’t exist yet.
Usage
vmpooler_client_app.py config set SETTING_NAME VALUE
Examples
vmpooler_client_app.py config set username bob.smith vmpooler_client_app.py config set a_new_setting some_value
Usage
vmpooler_client_app.py config unset SETTING_NAME
Example
vmpooler_client_app.py config unset auth_token
vmpooler_client_app.py config list