VMM(1) | User Contributed Perl Documentation | VMM(1) |
vwm - Manage VMware virtual machines
vwm <command> [options]
vwm <command> [-f] [-v+] [-w seconds] [@profile]
vwm clone [-o pool] [-c count] [-a datastore...] [-l folder] <source vm> <new vm name> vwm deploy [synonym of 'clone'] vwm df [-h] [datastore...] vwm host [maintenance|restore|restart|shutdown|disconnect|reconnect] <hosts...> vwm list [-d col1,col2... | perl string] [-t title] [vm|datastore|host|pool|template][s] [patterns...] vwm migrate [-p low|normal|high] [-o pool] <vms...> <host> vwm move [-o pool] <vms...> <datastore> vwm setpool <low|normal|high> <cpu|mem|all> <pools...> vwm show [vm|datastore|host|pool] [items...] vwm snapshot [-t title] <vms...> vwm state <on|off|suspend|reboot|shutdown|restart|standby> <vms...> vwm version
If -a is unspcified the datastore of the source VM is copied as the new clones datastore. If -a is specified the data store will be set during cloning. If -a contains a comma denoted list the datastores will be alternated during cloning. e.g. -a 1,2 copies to datastore 1 then 2 then starts again at 1. Patterns of repeating datastores can be specified - e.g. '-a 1,2,3,2,1'.
Possible lists include (selection can be plural or singular):
vms (default if unspecified) datastores hosts pools
If '-d' is specified without any containing '$' marks the string is evaluated as a CSV with each line extracting the requisite information that would be shown with the 'show' command. See the EXAMPLES section for further information.
If '-d' is specified and contains a '$' it is evaluated as a perl expression with $_ being set to the currently active item.
If '-t' is spcified the titles header for the table is set.
This can be any of the following choices:
on - Power up the specified VMs off - Power down the specified VMs. This is a hard power state so data loss could occur. suspend - Power the machine into standby mode. This is a hard power state which does not rely on VMware tools. restart - Hard power cycle the VMs. Like 'off' this is a forced power state so data loss could occur. shutdown - Try shutting down the machine via VMware tools. standby - Try to put the machine into the soft standby state. reboot - Try shutting down the machine via VMware tools.
Specifies which profile to use when addressing the vServer. This can be an entry within the config file or the URL (with optional login details) e.g.
vwm version @cluster1 vwm version @cluster2 vwm version @https://cluster1.acme.edu vwm version @https://username@cluster1.acme.edu vwm version @https://username:password@cluster1.acme.edu
Examples 1 and two assume 'custer1' and 'customer2' have been defined in the examples file (see EXAMPLES). The further examples specify the connection information on the command line. Specifying the password from the command line is exceptionally silly and should be avoided.
If username and/or password is omitted (such as in examples 3 and 4 above) they will be prompted for when vwm is run.
Specifies how many VMs should be created during a clone operation. The name of the target VM is incremented in the usual Perlish way. e.g.
DBS1, DBS2, DBS3... DBS10 DB00, DB01, DB02... DB99 DBAA, DBAB, DBAC... DBZZ
Specify a data store for operations that require it.
Specify a data store for operations that require it.
Force continue if an error occurs. Normaly if an error occurs vwm will stop processing any operations specified on the command line. If this flag is enabled vwm will continue operation as if no error occured.
Display the numbers of the 'df' command in a human readable format.
Dry run mode. When enabled vwm will continue as normal but no actual call to the VMware VServer is made.
Specifies the folder that the cloned machine should be moved into. If unspecified the source VM's folder is used instead.
Specifies the alternate pool name to use when migrating or cloning machines. If unspecified the source VM's pool is used instead.
Specifies the priority when migrating VMs.
Specifies the string to display between columns when outputing a list.
The title of the snapshot to create or the title row of the list table.
Be more verbose when outputting information to STDERR. Specify multiple times to increase verbosity.
Force a wait for the specified number of seconds between operations.
A command line tool for the manipulation of VMware Virtual Machines (VM).
The /etc/vmmrc and .vmmrc files will be processed to determine VMM's configuration, the latter file taking precedence.
The layout of the config file spcifies which profiles to use.
[GLOBAL] rewrite host = s/^(.+?)\./\1/ verbose = 2 profile = Cluster1 dryrun = 0 human = 1 force = 0 seperator = \t http_proxy = http://myproxy.example.com:8080 https_proxy = http://myproxy.example.com:8080 [Cluster1] url = https://cluster1.acme.edu username = admin password = password [Cluster2] url = https://cluster2.acme.edu username = administrator password = changeme
In the main example Cluster1 will have a 'verbose' option of 2. Cluster2 will have a 'verbose' option of 1 since it overrides the global setting.
VMM requires a few external modules before it can work correctly. Follow the following stages to get everything working.
* Install the VMware Perl SDK from http://www.vmware.com/support/developer/viperltoolkit/
This requires the packages libclass-methodmaker-perl libcrypt-ssleay-perl libsoap-lite-perl libuuid-perl libxml-libxml-perl.
* Setup the config file. See either the CONFIG section above or use the sample file from /usr/share/doc/vmware-manager.
* Run VMM with a simple command to make sure everything is setup right.
vwm version
* Enjoy
Quite probably.
Please report to https://github.com/hash-bang/VMM when found.
Matt Carter <m@ttcarter.com>
2020-04-05 | perl v5.30.0 |