Virtual Machine Management

Cloudmesh v4 contains sophisticated virtual machine management services that makes it easy for the user to manage a large number of virtual machines across clouds with a uniform naming scheme.

For now, we will focus on the command line and shell interface.

Command Line and Shell Interface

The command line and shell interface to manage virtual machines are listed next.

vm ping [NAMES] [--cloud=CLOUDS] [N]
vm check [NAMES] [--cloud=CLOUDS]
vm refresh [NAMES] [--cloud=CLOUDS]
vm status [NAMES] [--cloud=CLOUDS]
vm console [NAME] [--force]
vm start [NAMES] [--cloud=CLOUD] [--dryrun]
vm stop [NAMES] [--cloud=CLOUD] [--dryrun]
vm terminate [NAMES] [--cloud=CLOUD] [--dryrun]
vm delete [NAMES] [--cloud=CLOUD] [--dryrun]
vm list [NAMES]
vm boot [--name=NAME]
vm boot [--n=COUNT]
vm run [--name=NAMES] [--username=USERNAME] [--dryrun] COMMAND
vm script [--name=NAMES] [--username=USERNAME] [--dryrun] SCRIPT
vm ip assign [NAMES]
vm ip show [NAMES]
vm ip inventory [NAMES]
vm ssh [NAMES] [--username=USER]
vm rename [OLDNAMES] [NEWNAMES] [--force] [--dryrun]
vm wait [--cloud=CLOUD] [--interval=SECONDS]
vm info [--cloud=CLOUD]
vm username USERNAME [NAMES] [--cloud=CLOUD]
vm resize [NAMES] [--size=SIZE]

Uniform Parameter Management

The parameters across these commands are uniformly managed. Most of the plural form allows a parameterized specification such as a[00-03],a8 which would result in an array ["a0", "a1", "a2", "a3", "a8"]. This especially applies to clouds as well as virtual machine names.

We distinguish the following parameterized options


which specifies one or more clouds in parameterized fashion


which specifies one or more clouds in parameterized fashion

We distinguish the following regular options


a specified interval in seconds


The output format: txt, csv, table


To update the state of the vms specified with clouds and names


The username to be used for connecting with the vm


do not print debug messages


do not execute the command, but just print what would happen


specify a public IP


start the vm with the keypair name

Virtual machine management

Virtual machines can be

  • Created

  • Started

  • Stopped

  • Suspended

  • Resumed

  • Destroyed

Default behavior such as a key management naming scheme as well as ip address and security management is conveniently provided

Key management

Access to the virtual machine is governed by SSH keys. The default key can be uploaded to the cloud with the key command. The name of the key in the cloud can be used to associate it with virtual machines so that this key can be used to log into the VM

Security groups

A security group acts as a virtual firewall for the instance. When we launch an instance, we want to attach security Groups for controlling the traffic in and out of the VM.

Check instances

To check if the instance can execute ssh commands we need to make sure it is ready. The wait command waits till the vm is ready, which the check just performs a test.

cms vm check instance NAMES
cms vm wait instance NAMES

Command Examples

Vm Command




vm start [NAMES] [–cloud=CLOUD] [–dryrun]


vm ping [NAMES] [–cloud=CLOUDS] [N]


vm check [NAMES] [–cloud=CLOUDS]


vm status [NAMES] [–cloud=CLOUDS]


vm ssh [NAME] [–force]


vm stop [NAMES] [–cloud=CLOUD] [–dryrun]


vm terminate [NAMES] [–cloud=CLOUD] [–dryrun]


vm delete [NAMES] [–cloud=CLOUD] [–dryrun]


cms set cloud=aws
cms set counter=0
cms set name.format="vm-{counter}"

vm boot
vm ping
vm check
vm status
vm ssh
vm stop
vm start
vm terminate

# Virtual machine Management

Virtual machines are managed with the vm command