Moab Workload Manager

mvmctl

(Moab Virtual Machine Control)

Synopsis

mvmctl -c [<options>] <vmid>
mvmctl -d <vmid>
mvmctl -m [<options>] <vmid>
mvmctl -M dsthost=<newhost> <vmid>
mvmctl -q <vmid> [--xml]

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:

  • 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.
  • 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>]
  • ttl - Time-to-live (walltime) of the VM. Can be in seconds or a time string (125:00:00:00 for 125 days, and so forth). Only viable at create time; cannot be modified.
  • trigger - A trigger to attach to a job. To implement multiple triggers, input mvmctl -c trigger=x&y,trigger=a&b. The syntax is like other command line trigger definitions. Note that some escaping may be required on the command line.
  • Note that the vmid must be unique; Moab returns an error if the name is already taken.

---
Creates a VM.

> mvmctl -c image=stateful,hypervisor=node03,mem=512,procs=2 myNewVM 

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

> mvmctl -c variable=var1:value1+var2=value2,image=rhel51 

   
-d
Destroy
<vmid>
---
Destroys the specified VM.
> mvmctl -d oldVM
   
-m
Modify
[<options>] <vmid>

The <options> parameter 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 

  • 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 
   
-q
Query
<vmid> [--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.

< mvmctl -q myNewVM

< mvmctl -q ALL --xml