VMM(1)
π VMM(1): vwm π
User Contributed Perl Documentation
okay so bestie, buckle UP π this is the manual page for vwm, and she is that girl. Let's get into it.
β¨ NAME β¨
vwm β Manage VMware virtual machines π₯οΈβ¨
πΈ SYNOPSIS πΈ
vwm <command> [options]
Global syntax:
vwm <command> [-f] [-v+] [-w seconds] [@profile]
Command specific syntax:
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
π COMMANDS π
clone π§¬
Clone a given VM or template to another VM name. If -c is specified, multiple copies get made. Each VM name gets incremented in the usual Perlish way. e.g.: DB1, DB2, DB3 etc.
If -a is unspecified, the datastore of the source VM gets copied as the new clone's datastore. If -a is specified, the datastore gets set during cloning. And if -a holds a comma-denoted list, the datastores get alternated while cloning. e.g. -a 1,2 copies to datastore 1, then 2, then loops back to 1. You can even do repeating patterns β e.g. '-a 1,2,3,2,1'. π
deploy π
Synonym of clone. That's it. Same energy, different name.
df πΎ
Display disk usage information about datastores. If you hand it a list of matches, the datastore list gets filtered down to just those items. So like, a vibe check for your storage.
list π
Display a list of the given items matching a pattern.
Possible lists include (and you can pick plural or singular, she's flexible):
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. Peep the EXAMPLES section for more on that.
If -d is specified and contains a $, it's evaluated as a perl expression, with $_ being set to the currently active item. πͺ
If -t is specified, the titles header for the table is set.
migrate π«
Migrate a given list of VMs to another host. Moving day, but for machines.
move π¦
Move a given list of VMs to another datastore.
setpool ποΈ
Set the share level on the given resource pools.
show π
Show information about a given object. If no specific object type is specified, vm is assumed. And if no specific matching pattern is specified, all objects of that type get listed. No filter, no problem.
snapshot πΈ
Take a snapshot of the matching VM's. If -t is specified, it's used as the title of the snapshot. Otherwise, the current time is used. Time-stamped and cute.
state β‘
Set the state of a list of VMs.
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. Just likeoff, 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.
version π·οΈ
Display various version information about the connected vServer and local API. This command is the default if no actual command is specified (i.e. just running vwm with nothing else specified). She's the main character even when you say nothing.
π OPTIONS π
[@profile]
- Used during: All operations
- Default: First specified profile in config
- Type: Profile name or URL
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 right there 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.
-c
- Used during: migrate
- Default: 1
- Type: Number
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
--display [col1,col2...], -d [col1,col2...]
- Used during: list
- Default: Name
- Type: Command seperated list of columns to display in tabular output when using the
listcommand. See also:-sto specify the seperation character to use between the columns.
Specify a data store for operations that require it.
--datastore [datastore], --ds [datastore], -a [datastore]
- Used during: migrate
- Default: Same as source VM
- Type: Datastore name
Specify a data store for operations that require it.
--force, -f
- Used during: All operations
- Default: off
- Type: Switch
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. Unbothered, moisturized, in her lane. πββοΈ
--human, -h
- Used during: df
- Default: off
- Type: Switch
Display the numbers of the df command in a human readable format.
--dryrun, -n
- Used during: All operations
- Default: off
- Type: Switch
Dry run mode. When enabled, vwm will continue as normal but no actual call to the VMware VServer is made. All vibes, zero consequences. π«§
--folder, -l
- Used during: clone
- Default: Source VM / templates folder
- Type: String
Specifies the folder that the cloned machine should be moved into. If unspecified, the source VM's folder is used instead.
--pool [pool], -o [pool]
- Used during: clone, migrate, move
- Default: Same as the source VM
- Type: Pool name
Specifies the alternate pool name to use when migrating or cloning machines. If unspecified, the source VM's pool is used instead.
--priority [priority], -p [priority]
- Used during: migrate
- Default: low
- Type: Choice of: low, normal, high
Specifies the priority when migrating VMs.
--seperator [character], -s [character]
- Used during: list
- Default:
\t(tab) - Type: String
Specifies the string to display between columns when outputing a list.
--title [title], -t [title]
- Used during: list, snapshot
- Default: The Unix EPOC (for VMs)
- Type: String
The title of the snapshot to create, or the title row of the list table. Two jobs, one flag, she's versatile. β¨
-v, --verbose
- Used during: All operations
- Default: 0
- Type: Accumulating switch
Be more verbose when outputting information to STDERR. Specify multiple times to increase verbosity. Stack it up, girl. π
-w [seconds], -wait [seconds]
- Used during: clone, host, migrate, setpool, state
- Default: 0
- Type: Number of seconds
Force a wait for the specified number of seconds between operations. Patience is a virtue, bestie. β³
π DESCRIPTION π
A command line tool for the manipulation of VMware Virtual Machines (VM).
and that's the whole point of her, honestly π
π EXAMPLES π
okay bestie, this is the part where it all clicks. real commands, real vibes, copy-paste ready. let's go π«Ά
vwm clone VM01 VM02
Clone VM01 to VM02. Since neither the datasource (-d) or pool (-o) is specified these details are copied from VM01. β¨
vwm clone DB00 DB01 -c 30
Clone DB01 to DB02 creating 30 copies. This will actually make the machines DB01 to DB30. Since neither the datasource (-d) or pool (-o) is specified these details are copied from VM01. (yes, the manpage really says that, and yes, we are keeping it exactly as written π
)
vwm clone DB00 DB01 -c 30 -d SAN1,SAN2 -o Active
Same as the above example but spread the datastores across SAN1 and SAN2 and move the machine to the 'Active' pool. spread those stores, queen π
vwm deploy Template-DBServer DB05 -l Databases
Deploys the template Template-DBServer into DB05, moving the destination into the Databases folder.
vwm clone Template-DBServer DB05 -l Databases
This is exactly the same as above. A clone and deploy operations will automatically figure out if the source is a template and act accordingly. it just knows π«
vwm df *2
Display a datastore usage sheet (similar to the Unix df command) for all datastores ending in '2'.
vwm host maintenance Moe Homer
Put the hosts 'Moe' and 'Homer' into maintenance mode (use 'restore' to recover from this). naptime for the hosts π΄
vwm list vms
List all VMs. iconic, simple, perfect.
vwm list vms -d name,host,ip
List all VMs - showing their name, currently allocated host and IP address.
vwm migrate DBS* Carl
Migrate all virtual machines matching 'DBS*' to the 'Carl' host.
vwm migrate DBS* Lenny -w 60 -o Active -p high
Migrate all virtual machines matching 'DBS*' with high priority to the 'Active' pool on the 'Lenny' host waiting 60 seconds between machine.
vwm move DB00 DB01 SAN2 @cluster2
Move VMs DB00 and DB01 to the SAN2 datastore within profile 'cluster2'.
vwm show host Lisa
Show information on host 'Lisa'. tell us everything about Lisa π
vwm snapshot DB04 DB05 -t 'Todays backup'
Take a snapshot of VMs 'DB04' and 'DB05' using the title 'Todays backup'
vwm state on DB00 DB01 -w 30
Turn DB00 and DB01 on waiting 30 seconds between machines.
vwm state on DB00 DB01 -w 30 -f
Turn DB* VMs on. -f ensures that even if any of the machines fail to turn on for any reason the remaining machines will still be sent the 'on' command. the -f is doing the lord's work fr fr π
ποΈ FILES ποΈ
/etc/vmmrcβ VMM config file for all users. the communal one, everybody shares it π«Ά.vmmrcβ VMM config file for the local user. this one is yours π
βοΈ CONFIG βοΈ
The /etc/vmmrc and .vmmrc files will be processed to determine VMM's configuration, the latter file taking precedence. local girl wins, always β¨
The layout of the config file specifies which profiles to use. it looks a lil something like this π
[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
okay now let's break down every single knob in there, no skips π
[GLOBAL]β The meta global section. Any option specified here will be automatically carried into each profiles config.
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. global is the group chat, profile is the DM π
[profile]β The name (case-insensitive) of the profile to define.urlβ The connection URL of the vServer system within the profileusernameandpasswordβ The authentication information when connecting to the vServer.dryrunβ Specify a default dry run value. See-nfor further information.forceβ If an error is encounted during a multiple VM operation the default behaviour is to stop execution. If this setting is set to '1' this behaviour will be overridden and operations will continue even if an error is encounted.http_proxy,https_proxyβ Forceably set theHTTP(s)_PROXYenvironment variable to the provided value before connecting. This is included to assist basic login shells where these variables are not imported correctly.humanβ Always output numbers in a human readable format rather than the raw form.priorityβ Specify a default priority when using any command that is-pcompatible.profileβ Specify the default profile to use if none is explicitally set. If not specified the first found profile in the config file is used.rewrite hostβ Specify a substitution regular expression to use when correcting host names. The value given in the above example will remove any trailing DNS name correctinghost1.a.very.long.dns.comtohost1. glow-up for your hostnames πseperatorβ Specify the seperator character used when outputting tabular data with the 'list' command.verboseβ Specify a default verbosity level. See-vfor further information.
π§ INSTALLATION π§
VMM requires a few external modules before it can work correctly. Follow the following stages to get everything working. setup arc β¨
- 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 ππΈ
π BUGS π
Quite probably.
Please report to https://github.com/hash-bang/VMM when found. we love a self-aware manpage ngl
π AUTHOR π
Matt Carter <m@ttcarter.com>
and that's the whole page bestie π this one's from perl v5.30.0, dated 2020-04-05, and it's the VMM(1) man page. go forth and virtualize, you absolute icon π«Άβ¨π
π¦ where this page comes from
- debian bookworm: vmware-manager 0.2.0-4
- debian trixie: vmware-manager 0.2.0-4
- ubuntu jammy: vmware-manager 0.2.0-4
- ubuntu noble: vmware-manager 0.2.0-4
- ubuntu questing: vmware-manager 0.2.0-4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms