mvmctl

Synopsis

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

Overview

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

Format

-c
Create
[<options>] <vmid>

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

Where the <attr> attribute is one of the following:

  • feature - Dictates initial placement and automatic live migration of the VM. This needs to run on a hypervisor with that feature already installed. Multiple features are specified in the following form:
    <feature=<featurename1>[[:<featurename2>]:...]
    
  • image - The VM type/image to use for the new VM.
  • hypervisor - The node on which the new VM resides.
  • disk - Disk space for the VM OS.
  • mem - Amount of memory to use.
  • procs - Number of processors for the VM.
  • sovereign - Boolean.
  • template - Job template for the VM. The vm_create job inherits the template.
  • variable - User-defined VM variables (of the form <varname>:<value>[+<varname>:<value>] - must be a name/value pair).
  • storage - Storage request (not OS disk storage). Only viable at create time; cannot be modified. Storage is a percent sign-delimited list of storage requests with the following form:
    <type>:<size>@'<mountPoint>'
    • You can define advanced storage options with the following syntax:
    • <TYPE>:<SIZE>@'<MOUNTPOINT>'#'<MOUNTOPTIONS>^<MOUNTOWNER>%...'

      <MOUNTOWNER> and <MOUNTOPTIONS> are Linux mount parameters and are not processed or parsed by Moab. They are passed indiscriminately.

      Multiple storage requests are allowed and are delimited by the percent symbol (%).

  • trigger - A trigger to attach to a VM. The Start trigger is the only trigger you can use on a VM.

    Note that the vmid must be unique; Moab returns an error if the name is already taken.

---
Creates a VM.
> mvmctl -c image=rhel51,hypervisor=n4,storage=gold:3@'/data/mount1'%silver:5@'/data/mount2'%gold:3@'/data/mount3' MyTestVM 

> mvmctl -c image=rhel51,hypervisor=n4,storage=gold:3%silver:5@'/data/mount/silver' MyTestVM 

> mvmctl -c hypervisor=n4,variable=build_email:"exampleadmin"+hosttype:"dev"+identifier:"42424",mem=4096,procs=2,storage=os:16@'/'%nobackup:20@'/tools/ptx6'#'rw^root:root',image=rhel54-stateful test_vm
-d
Destroy
<vmid>
---
Destroys the specified VM.
> mvmctl -d oldVM
				
-f
Force Migrate
mvmctl -f green|overcommit <--flags=eval>
---
Forces the migration policy on the system.
> mvmctl -f green <--flags=eval>
				
-m
Modify
[<options>] <vmid>

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

---
Modifies the VM.
> 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 trigger=etype=start\&atype=exec\&action='trig.py $OID $HOSTLIST' myNewVM 
								
The modify variable uses the same syntax as Create.
> 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
				
  • The variable option is a set-only operation. Previous variables will be over-written.
-M
Migrate
dsthost=<newhost> <vmid>
---
Migrate the given VM to the destination host.
> 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
Query
<vmid> [--blocking] [--xml]
---
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.
> mvmctl -q myNewVM
> mvmctl -q ALL --blocking 
> mvmctl -q ALL --xml 
-w
Constraint
state=drained
---
Overrides the HIDEDRAINED DISPLAYFLAGS attribute allowing display of VMs in a DRAINED state.
> mvmctl -q -w state=drained

Copyright © 2012 Adaptive Computing Enterprises, Inc.®