Skip to content
This repository was archived by the owner on Jul 26, 2022. It is now read-only.

Repository files navigation

vcloud-client - a tool to manage vCloud datacenter objects

vcloud-client is a tool to manage objects in vCloud Director, using the vCloud API.

There are several modes of operation, all of which can be found in the synopsis below. Each mode has a different set of required and optional arguments, which can also be found in the synopsis. Help mode can be used in a context sensitive manner. For example, -h will show all the modes, and -h ADDVM will show help about the ADDVM mode.

All commands require proper authentication. This can be provided on the command line by using -u -p -s or by creating a configuration file and specifying it with -c config-file.

vcloud-client is licensed under the GPLv3 license. For more information, see the LICENSE file. This project uses libraries and routines which may have a different license. Refer to the included licenses in the source files and/or JAR files for more information.

BUILDING

Building vcloud-client requires the following:

  1. Oracle Java or OpenJDK >= 6
  2. Apache Ant >= 1.8

Then you can simply call ant dist to create a dist folder with everything vcloud-client needs to run. You can also use ant package-tar to create a tarball

SYNOPSIS

vcloud-client -a | -h <COMMAND> | -l <TYPE> | -r | -t | -v | -w | -x | -y | -z [-c <FILE>] [-p <PASSWORD>] [-s <SERVER>] [-u <USER>]

HELP

vcloud-client -h <COMMAND>

VERSION

vcloud-client -v

LIST

vcloud-client [-c <FILE>] -l <TYPE> [-p <PASSWORD>] [-s <SERVER>] [-u <USER>]

ADDVM

vcloud-client -a [-c <FILE>] --catalog <CATALOG> --description <DESC> --fqdn <FQDN> --ip <IP> --network <NETWORK> --organization <ORG> [-p <PASSWORD>] [-s <SERVER>] --template <TEMPLATE> [-u <USER>] --vapp <VAPP> --vdc <VDC>

REMOVEVM

vcloud-client [-c <FILE>] --organization <ORG> [-p <PASSWORD>] -r [-s <SERVER>] [-u <USER>] --vapp <VAPP> --vdc <VDC> --vm <VM>

POWERONVM

vcloud-client [-c <FILE>] --organization <ORG> [-p <PASSWORD>] [-s <SERVER>] [-u <USER>] --vapp <VAPP> --vdc <VDC> --vm <VM> -y

POWEROFFVM

vcloud-client [-c <FILE>] --organization <ORG> [-p <PASSWORD>] [-s <SERVER>] -t [-u <USER>] --vapp <VAPP> --vdc <VDC> --vm <VM>

SHUTDOWNVM

vcloud-client [-c <FILE>] --organization <ORG> [-p <PASSWORD>] [-s <SERVER>] [-u <USER>] --vapp <VAPP> --vdc <VDC> --vm <VM> -z

RESIZEDISK

vcloud-client [-c <FILE>] --disk-name <DISK> --disk-size <SIZE> --organization <ORG> [-p <PASSWORD>] [-s <SERVER>] [-u <USER>] --vapp <VAPP> --vdc <VDC> --vm <VM> -w

CONSOLIDATEVM

vcloud-client [-c <FILE>] --organization <ORG> [-p <PASSWORD>] [-s <SERVER>] [-u <USER>] --vapp <VAPP> --vdc <VDC> --vm <VM> -x

OPTIONS

-a--add-vmarg

Add a new VM from a vApp Template to an existing vApp

--catalogCATALOG

Select this catalog

-c--configFILE

Use a configuration file

--descriptionDESC

Description of object to create

--disk-nameDISK

Name of disk to resize

--disk-sizeSIZE

New size of disk in MB

--fqdnFQDN

Name of object to create

-h--helpCOMMAND

Show help and examples

--ipIP

IP of the object to create

-l--listTYPE

List vCloud objects (org|vdc|vapp|catalog|vm)

--networkNETWORK

Network of the object to create

--organizationORG

Select this Organization

-p--passwordPASSWORD

vCloud Director password

-r--remove-vmarg

Remove a VM from an existing vApp

-s--serverSERVER

vCloud Director server URI

--templateTEMPLATE

Select this template

-t--poweroff-vmarg

Stop an existing VM (hard shutdown)

-u--usernameUSER

vCloud Director username

--vappVAPP

Select this vApp

--vdcVDC

Select this Virtual Data Center

--vmVM

Select this VM

-v--versionarg

Show version information

-w--resize-diskarg

Resize the disk of an existing VM

-x--consolidate-vmarg

Consolidate all disks of an existing VM

-y--poweron-vmarg

Start an existing VM

-z--shutdown-vmarg

Shutdown an existing VM (soft shutdown)

CONFIGURATION

All command line parameters can optionally be provided using a configuration file. Exception on this are the mode selectors. The configuration file uses a simple format, which is:

option=value

option is the same as the long options which can be specified on the command line. For example, this is a valid configuration line:

username=user@Organization

Configuration options are parsed in the following order:

  1. The -c option.
  2. All options provided on the command line, in the order they are specified. It is possible to override already specified configuration options by specifying them again. Duplicate options will take the value of the last one specified. An example configuration file can be found in the distribution package.

BUGS

No major known bugs exist at this time.

AUTHOR

Nick Douma (n.douma@nekoconeko.nl)

About

vcloud-client is a tool to manage objects in vCloud Director, using the vCloud API.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages