Moab Viewpoint
VM Management

VM Management

This page describes how to configure the VM Management page. See Node Management for user documentation of the node management page.

The VM management page consists of a table for displaying VMs, a set of controls above the table for operating on one or more rows selected in the table, and configurable panels for displaying individual VMs in detail. All of these components can be configured in nodes.xml. The format of the related XML is given below.

<nodes>
  ...
  <vm-management>
    <controls>
      ...
    </controls>
    <table>
      ...
    </table>
    <node-details>
      ...
    </node-details>
    <details>
      ...
    </details>
      ...
  </vm-management>
</nodes>

Configuring the Table

The VM management table can be configured at the column-level to show different attributes specifically for VMs. The relevant XML section for configuring the table is nodes > vm-management > table > fields. Each child element of <fields> corresponds to a single column and the columns appear in the same order that the child elements are specified. The name of each element corresponds to data tracked by Moab about VMs, and also contains sensible defaults for display options of the column. The currently allowed field types are:

  • <alias>
  • <disk-available>
  • <disk-total>
  • <disk-utilized>
  • <id>
  • <ip-address>
  • <link-id>
  • <load>
  • <memory-available>
  • <memory-total>
  • <memory-utilized>
  • <os>
  • <parent>
  • <pending-actions>
  • <power>
  • <processors-available>
  • <processors-total>
  • <processors-utilized>
  • <state>
  • <status>
  • <substate>
  • <type>

All field types share a common configuration. The shared attributes are:

  • visible - optional. Default is true. Specifies whether the column should be displayed or hidden.
  • width - optional. Specifies the width in pixels of the column.
  • primary - optional. Default is false. Specifies whether this field forms part or all of primary key for the table records.

The shared child elements of field types are:

  • title - Optional. The name of the column to be displayed to the user.

In addition to the above fields, the table section supports a special kind of column named "composite". The composite column allows one to display a value based on the basic fields listed above by using the value decider framework. Each of the above fields can be accessed with component tags. Unlike the other fields, the composite field requires that both width and title be specified. The contents of the value tag constitute the value decider portion that determines the form of the column values. The structure of the composite tag is described below:

<composite width="{width}">
  <title>{title}</title>
  <value>
    ... 
  </value>
</composite>

One example of a composite value is one that displays both the available disk space and the total configured disk space on vms in gigabytes. Disk values are reported directly as given by Moab. If Moab is reporting disk values in megabytes, one could configure the composite value as shown below. This would display a column values of the form <disk available in GB> / <disk total in GB>.

<composite width="75">
  <title>Disk (GB)</title>
  <value>
    <calculate operation="append-in-order">
      <value order="1">
        <calculate operation="double-to-string" format="#.#">
          <calculate binary-operation="multiply">
            <first>
              <component id="disk-available"/>
            </first>
            <second>.0001</second>
          </calculate>
        </calculate>
      </value>
      <value order="2"> / </value>
      <value order="3">
        <calculate operation="double-to-string" format="#.#">
          <calculate binary-operation="multiply">
            <first>
              <component id="disk-total"/>
            </first>
            <second>.0001</second>
          </calculate>
        </calculate>
      </value>
    </calculate>
  </value>
</composite>

An example vm table configuration is given below:

<table>      
  <fields>        
    <id primary="true" width="150" visible="false">          
      <title>Name</title>        
    </id>        
    <link-id width="150">          
      <title>Name</title>        
    </link-id>        
    <parent/>        
    <status/>        
    <power/>        
    <pending-actions width="100"/>        
    <os width="60">          
      <title>Oper. Sys.</title>        
    </os>        
    <load/>          
      <composite width="75">            
        <title>Disk (GB)</title>          
      <value>            
        <calculate operation="append-in-order">              
          <value order="1">                 
            <calculate operation="double-to-string" format="#.#">                   
              <calculate binary-operation="multiply">                     
                <first>                       
                  <component id="disk-available"/>                     
                </first>                     
                <second>.0001</second>                 
            </calculate>           
        </calculate>         
      </value>         
      <value order="2"> / </value>         
      <value order="3">           
        <calculate operation="double-to-string" format="#.#">             
          <calculate binary-operation="multiply">               
            <first>                 
              <component id="disk-total"/>               
            </first>               
            <second>.0001</second>             
          </calculate>           
        </calculate>         
      </value>       
    </calculate>      
   </value>    
  </composite>    
  <composite width="100">      
    <title>Memory (MB)</title>        
      <value>          
        <calculate operation="append-in-order">            
          <value order="1">              
            <component id="memory-available"/>            
          </value>            
          <value order="2"> / </value>            
          <value order="3">              
            <component id="memory-total"/>            
          </value>          
        </calculate>        
      </value>     
    </composite>     
    <composite width="50">       
      <title>Procs</title>       
      <value>        
        <calculate operation="append-in-order">           
          <value order="1">             
            <component id="processors-available"/>           
          </value>           
          <value order="2"> / </value>           
          <value order="3">             
            <component id="processors-total"/>           
          </value>         
        </calculate>       
      </value>     
    </composite>    
    <ip-address/>     
    </fields>    
</table>

Primary Keys

In order for many features of the VM Management page to work properly, you must configure at least one field to be a primary key field. We strongly recommend creating an id field as the sole primary key field. You can make this field invisible if you don't want users to see it.

Filtering the Table

The following are valid filters:

  • disk-available: This filters VMs based on available disk.
  • disk-total: This filters VMs based on total or configured disk.
  • disk-utilized: This filters VMs based on their currently utilized disk. Specifically, the filter matches a server if the specified filter value is contained in the utilized disk value for the server. The search is done lexicographically. Some examples:
    • the filter value 6 matches a server with a utilized disk value of 6, 16, 61, or 123456789.
    • The filter value 0 does not match a server with a utilized disk of 12.
  • id: This filters VMs based on their names. The filter matches if the filter value is equal to the VM's name or if the VM's name contains the filter value inside it. The filter is case insensitive. Examples are:
    • The filter value n1 will match servers named n1, n10, n123, fan1, or fan12.
    • The filter value n1 will not match a server named n21.
  • ip-address: This filters VMs based on their current IP address. The search is done the same as with VM name, and the entire IP address is treated as if it were a name.
  • memory-available: This filters VMs based on available memory.
  • memory-total: This filters VMs based on total memory.
  • memory-utilized: This filters VMs based on their currently utilized memory. The search is done the same as with utilized disk.
  • os: This filters VMs based on their operating system. The search is done the same as with VM name.
  • power: This filters VMs based on their power status. The search is done the same as with VM name.
  • processors-available: This filters VMs based on available processors.
  • processors-total: This filters VMs based on configured processors.
  • processors-utilized: This filters VMs based on their currently utilized processors. The search is done the same as with utilized disk.
  • state: This filters VMs based on their current state. The search is done the same as with VM name.
  • substate: Filters based on the substate of a VM.

Table Buttons

The above-table buttons are configured in the <controls> child element of <vm-management>. Supported elements are listed below. Buttons disable themselves when their surrounding context is invalid such as if the button requires a selected record but no table record is selected, or if the type of the selected record doesn't apply to the button.

  • <power-off> - Powers off the currently selected VMs.
  • <power-on> - Powers on the currently selected VMs.
  • <refresh> - Refresh the table and any open details panel.
  • <reprovision> - Reprovisions all selected VMs.
  • <show-pending-actions> - Redirect to the pending actions page for the currently selected VM.

In addition to specifying an action type via the element's name, you can configure the display of the button using any of the following attributes.

  • image-url (optional) - Path to an icon that will be used to display the button.
  • label (optional) - Text to be displayed either on the button or, if an image is specified, to its right side.
  • tooltip (optional) - Tool-tip to be displayed on the button when the mouse hovers over it.

You can also specify the permission access for each button with the <permissions> child element. This element can contain a sequence of <permission> elements that specify a Viewpoint permission a user needs in order to see and use the button. An example permissions configuration might be:

<power-off>
  <permissions>
    <permission name="node.update"/>
  </permissions>
</power-off>

In this example, a user can use the power-off button only if they have the node.update permission.

Details Panel

The VM management page contains a panel for displaying a VM in detail. These sections are configured in the nodes > vm-management > node-details element and the config > server-management > vm-details element respectively. These panels currently allow one to configure a title, a set of controls, and a list of sections to display information in. The title can contain field references that will be replaced with the value of the field of the current object being viewed. Allowable fields are those available for the node table. Most of these fields are specified by prefixing a field name with $ and optionally wrapping it in curly brackets. Examples include $id, ${name}, and $cpu. In addition, one can display a variable in the title using the map variable syntax, which suffixes the field name with a key enclosed in square brackets.

Buttons

Each details panel contains a buttons section that has the same structure as the above-table buttons. They actually support an arbitrary menu structure, but that structure is more likely to be used in the details panel. That is, in addition to the button elements described above, a submenu can be created with a menu element that itself contains child elements. Arbitrarily nested menus can thus be created. Besides containing child elements, a menu element can also specify a boolean attribute vertical, which defaults to "true", that specifies the menu's layout direction. Furthermore, a menu itself can have permissions just like a button. If a user doesn't have permissions to view a menu, then he or she will not see the menu or any of its sub-elements.

The scope of a details panel button is the panel itself. Because of this, buttons that require a record to be selected in the VM table, if they were placed above the table, treat the record displayed in the details panel as the selected record. Also, the refresh button refreshes only the details panel.

An example VM buttons configuration is:

...
<controls>
  <refresh/>
    <power-on/>
    <power-off/>
    <reprovision/>
</controls>

VM Details Buttons

The VM details panel supports the above-table buttons, as well as the following extra buttons:

  • <destroy> - Sends a request to destroy the VM.
  • <migrate> - Sends a request to migrate the VM.
  • <reprovision> - Sends a request to reprovision the VM.
  • <start> - Sends a request to start the VM.
  • <stop> - Sends a request to stop the VM.

Sections

Each details panel section specified in XML corresponds to a collapsible section in the details panel. A section itself consists of a title (with no variable interpolation) and a <fields> element that contains a list of fields. These fields have names that correspond directly to the table fields described previously in the fields section.

In addition, the following fields are supported for both panels:

Note Several fields actually display a collection or list of scalar values. By default, these values are printed as a label of comma-separated values. However, if the field is given the attribute multiline="true", the field is displayed as a multi-select box with each individual collection value displayed on its own line. The fields that currently have this feature are labeled as collection fields.
  • <generic-events> - A table.
  • <generic-metrics> - A table.
  • <header> - This is used to add a line of header text meant to be a sub-header inside a details section or to separate groups of values in a details section.
  • <os-options> - A collection.
  • <variables> - A table.
  • <description>
  • < hypervisor>
  • <job-id>
  • <last-migration-time>
  • <migration-count>

Example

You can expand the sample code window below for an example of what a complete VM details panel might look like:

<details>
  <title>Virtual Machine: $id</title>
  <controls>
    <start image-url="images/play.png"/>
    <stop image-url="images/stop.png"/>
    <reprovision image-url="images/reprovision.png"/>
    <migrate image-url="images/migrate.gif">
    </migrate>
    <destroy image-url="images/vm-destroy.png">
    </destroy>
    <show-pending-actions image-url="images/filter_vm.png"/>
  </controls>
  <sections>
    <section>
      <title>General</title>
      <fields>
        <id>
          <title>Name></title>
        </id>
        <ip-address>
          <title>Network Address</title>
        </ip-address>
        <job-id/>
      </fields>
    </section>
    <section>
      <title>Status</title>
      <fields>
        <substate>
          <title>State</title>
        </substate>
        <composite>
          <title>VM State</title>
          <value>
            <calculate operation="conditional">
              <option>
                <value>Started</value>
                <condition comparison="equal">
                  <first>
                    <component id="power"/>
                  </first>
                  <second>On</second>
                </condition>
              </option>
              <option>
                <value>Stopped</value>
                <condition>
                  <value>true</value>
                </condition>
              </option>
            </calculate>
          </value>
        </composite>
        <state>
          <title>Compute RM State</title>
        </state>
        <os/>
        <os-options multiline="true"/>
      </fields>
    </section>
    <section>
      <title>Utilization</title>
      <fields>
        <composite>
          <title>Processor</title>
          <value>
            <calculate operation="append-in-order">
              <value order="1">
                <component id="processors-available"/>
              </value>
              <value order="2"> Available, </value>
              <value order="3">
                <component id="processors-total"/>
              </value>
              <value> Total</value>
            </calculate>
          </value>
        </composite>
        <composite>
          <title>Memory (MB)</title>
          <value>
            <calculate operation="append-in-order">
              <value order="1">
                <component id="memory-available"/>
              </value>
              <value order="2"> Available, </value>
              <value order="3">
                <component id="memory-total"/>
              </value>
              <value> Total</value>
            </calculate>
          </value>
        </composite>
        <composite>
          <title>Disk (MB)</title>
          <value>
            <calculate operation="append-in-order">
              <value order="1">
                <component id="disk-available"/>
              </value>
              <value order="2"> Available, </value>
              <value order="3">
                <component id="disk-total"/>
              </value>
              <value> Total</value>
            </calculate>
          </value>
        </composite>
      </fields>
    </section>
  </sections>
</vm-details>

Linking

The VM Management Page can contain links to the Node Management Page. By including the <parent> tag in the vm-management > table > fields > parent location a link to each VMs parent makes it possible to navigate to the Node Management Page with the specified node.