4.0 Scheduler Commands > Commands > mvmctl

Conventions

mvmctl

Synopsis

mvmctl -d <vmid> mvmctl -f <migrationPolicy> mvmctl -m [<options>] <vmid> mvmctl -M dsthost=<newhost><vmid> mvmctl -q<vmid> [--blocking] [--xml] mvmctl -w state=drained

Overview

mvmctl controls the modification, querying, migration, and destruction of virtual machines (VMs).

Format

-d
Name Destroy
Format <vmid>
Description Destroys the specified VM.
Example
> mvmctl -d oldVM		
-f
Name Force Migrate
Format mvmctl -f consolidation|overcommit [--flags=eval [--xml]]
Description Forces the migration policy on the system. The eval flag causes Moab to run through migration routines and report the results without actually migrating the VMs.
Example
> mvmctl -f consolidation --flags=eval				

Moab returns a report like the following:

1: VM 'vm1' from 'h0' to 'h3'
2: VM 'vm2' from 'h0' to 'h5'				
-m
Name Modify
Format [<options>] <vmid>

The <options> variable is a comma-separated list of <attr>=<value> pairs.

Description Modifies the VM.
Example
> mvmctl -m gevent=hitemp:'mymessage' myNewVM 

Gevents can be set using gevent.

> mvmctl -m gmetric=bob:5.6 myNewVM 

Gmetrics can be set using gmetric.

> mvmctl -m os=compute myNewVM 

Reprovisioning is done by changing os.

> mvmctl -m powerstate=off myNewVM 

Power management is done by modifying powerstate.

> mvmctl -m variable=user:bob+purpose:myVM myNewVM
					

Disallow VM migration by using cannotmigrate.

> mvmctl -m flags=cannotmigrate myNewVM
							

Allow a VM to migrate by setting the canmigrate flag.

> mvmctl -m flags=canmigrate myNewVM
				
Notes
  • The variable option is a set-only operation. Previous variables will be over-written.
-M
Name Migrate
Format dsthost=<newhost><vmid>
Description

Migrate the given VM to the destination host.

When you set the vmid to ANY, Moab migrates the VM to any available eligible hypervisor. For this to work, the following conditions must be met:

  • The VM reports a CPULOAD, and it is greater than 0.
  • The VM's AMEMORY is less than its CMEMORY. This indicates that some memory is currently in use and tells Moab that the RM is reporting memory correctly.
  • The VM's state is not "Unknown."
  • All hypervisors report a CPULOAD, and it is greater than 0.
  • All hypervisors report an AMEMORY, and it is less than its CMEMORY.
  • All hypervisors report a hypervisor type.
Example
> mvmctl -M dsthost=node05 myNewVM 

myNewVM migrates to node05.

> mvmctl -M dsthost=ANY vm42 

Moab migrates vm42 to a node based on policy destination limitations (such as the NoVMMigrations flag).

-q
Name Query
Format <vmid> [--blocking] [--xml]
Description Queries the specified VM; that is, it returns detailed information about the given VM. May be used with or without the --xml flag. ALL may also be used to display information about all VMs. This option gathers information from the Moab cache which prevents it from waiting for the scheduler, but the --blocking option can be used to bypass the cache and allow waiting for the scheduler.
Example
> mvmctl -q myNewVM
> mvmctl -q ALL --blocking 
> mvmctl -q ALL --xml 
-w
Name Constraint
Format state=drained
Description Overrides the HIDEDRAINED DISPLAYFLAGS attribute allowing display of VMs in a DRAINED state.
Example
> mvmctl -q -w state=drained

© 2014 Adaptive Computing