2.2 Managing a Virtual Machine in Runtime

There are many ways you can control the VM after it has been deployed. All actions from provisioning to shutting down the VM can be managed directly from the Orchestrate Development Client and through the jobs written and executed by the Orchestrate Server.

Review the following sections for ways to manage VMs in runtime:

2.2.1 Using the Right-Click Menu for Provisioning Actions

You can perform provisioning actions by right-clicking a VM in the tree of the Orchestrate Development Client. You start VMs by provisioning them under the VMs list according to the appropriate provisioning adapter.

For information on provisioning adapters, see Section 2.1, Provisioning a Virtual Machine.

The provisioning actions available from the right-click menu are as follows:

Table 2-1 Right-Click VM Commands

Action

Description

Provision

Starts a VM to a running state. The Orchestrate Server automatically looks for the best VM host machine to run the VM on, unless you have specifically designated another server to run the VM.

If a VM has snapshots, you cannot start the VM on a different host. If a VM that has snapshots is on shared repository, you can register the VM to a different host and start the VM if the host is also connected to a shared repository.

Pause

Prevents the VM from gaining access to the processor of the host machine, although it is still resident in the memory of the host machine.

Resume

Allows a paused VM to access the processor of the host machine again.

Suspend

Pauses the VM and takes a snapshot of its disk and memory status. In the suspended state, a VM can be moved or migrated to another host machine.

Shutdown

Stops a VM from running, just like shutting down a physical machine. The operating system stops and acts as if it is shut down.

Restart

Shuts down and restarts a running VM.

Migrate

vCenter: Migrates the VM from one host machine to another only if both the source and destination host machines have VMotion enabled. VM migrations can be of the following types:

  • A “warm migrate” is the migration of a suspended VM to another host and starting it there with brief resulting downtime (measured in milliseconds). This function requires shared storage.

  • A “hot migrate” (also called a “live migrate”) is the migration of a running VM to another host and starting it there with minimal resulting downtime (measured in milliseconds). This function requires shared storage.

ESX: VM migrations can be of the following types:

  • A “warm migrate” is the migration of a suspended VM to another host and starting it there with brief resulting downtime (measured in milliseconds). This function requires shared storage.

  • A “hot migrate” (also called a “live migrate”) is the migration of a running VM to another host and starting it there with minimal resulting downtime (measured in milliseconds). This function requires shared storage.

Ensure that the source and the destination machines have the same architecture.

Hyper-V: VM Migration is not supported by PlateSpin Orchestrate.

XEN: VM migrations can be of the following types:

  • A “hot migrate” (also called a “live migrate”) is the migration of a running VM to another host and starting it there with minimal resulting downtime (measured in milliseconds). This function requires shared storage.

NOTE: Migration of a Xen VM on Fibre Channel SAN disks is not supported.

Resync State

Ensures that the state of the VM displayed in the Orchestrate Development Client is accurate.

Apply Config

Updates the VM transient configuration. The VM must be running.

Create Template

Makes a VM instance into a template from which other versions can be cloned. This menu item is replaced by the Clone menu item when you right-click a template VM.

Clone

Launches a cloned instance of the template VM.

Delete/Destroy Resource

Removes a VM from the Resources list in the Orchestrate Development Client. If you want to delete the VM from the host machine, select the Destroy VM Instance option.

Move Disk Images

A “move” is the relocation of VM disk images between two storage devices when the VM is in a not running state (including VMs that are suspended with a checkpoint file). This function does not require shared storage; the move is between separate repositories. Select the storage location from the drop-down menu.

You can also move a VM from one VM host machine to another. This is a “cold” migration. VMware Server VMs must be migrated in this manner.

If you want to move a VM of considerable size, appropriately increase the timeout fact value in the VM policy. The default value is 2400. For more information on editing the policy, see Section 1.1, Configuring Policies for VM Provisioning Adapters.

If a VM has snapshots, you cannot move the VM but you can register it to a different host if the VM and the host are connected to a shared repository.

Checkpoint

Creates a named snapshot of a VM image. This image is stored on the disk of the repository machine. Xen VMs cannot have a checkpoint applied to them.

All the snapshots of a VM are chronologically listed in the resoruce.vm.snapshots fact, and the latest snapshot is listed in the resource.vm.current_snapshot fact.

If the ESX VM or the Hyper-V VM already has snapshots taken through other management consoles, the snapshots are synchronized with the latest snapshot taken through the Orchestrate Development Client, and are listed in the resoruce.vm.snapshots fact.

Restore

Starts a Checkpoint VM (that is, resumes the operations of a VM made into a stored checkpoint from the moment of storage).

If the ESX VM already has snapshots taken through other management consoles, the snapshots are synchronized with the latest snapshot taken through the Orchestrate Development Client, and are listed in the resoruce.vm.snapshots fact.

Remove Template Dependency

Changes a cloned instance of a VM into a VM instance.

Install Agent

Launches a job that automatically installs the Orchestrate Agent on a VM the next time you provision the VM.

IMPORTANT:If you stop or cancel a running Install Agent job, the VM is locked and you cannot provision the VM. The VM is automatically released after a period of time.

Before performing the Install Agent action, check the prerequisites listed in Automatically Installing the Orchestrate Agent or Personalizing the VM.

Personalize

Allows you to customize the VM. This includes changing elements like the DNS server. The changes are made to a VM that is shut down.

IMPORTANT:If you stop or cancel a running Personalize job, the VM is locked and you cannot provision the VM. The VM is automatically released after a period of time.

Before performing the Personalize action, check the prerequisites listed in Automatically Installing the Orchestrate Agent or Personalizing the VM.

Shutdown Agent

Shuts down the Orchestrate Agent and makes the VM unavailable as a resource.

Cancel Action

Stops an action that has been requested.

Check Host Assignment

Opens a window so you can compare the VM hosts capable of hosting the VM.

Launch Remote Desktop

Launches a VNC terminal in which you can view and control the VM. Specify the credentials configured for the Web service in the appropriate VM policy.

Before performing the Launch Remote Desktop action, check the prerequisites listed in Launching a VNC Terminal of the VM.

HINT:For information about using the PlateSpin Orchestrate VM Client to perform many of these actions, see Managing Virtual Machines in the PlateSpin Orchestrate 2.0 VM Client Guide and Reference.

2.2.2 Prerequisites for Performing Provisioning Actions on ESX VMs

You need to perform certain tasks before performing the Install Agent, Personalize, or the Launch Remote Desktop actions.

Automatically Installing the Orchestrate Agent or Personalizing the VM

Complete this procedure before performing the Install Agent or Personalize actions.

  1. On any Windows or Linux resource, install the Virtual Disk Development Kit (Vmware-Vix-Disklib) from the VMware Web site .

  2. (Conditional) On Linux, ensure that the root partition is not on LVM.

  3. In the Orchestrate Development Client, click Scheduler > vmDiskLibDiscovery > Run Now.

  4. Click Jobs > vmDiskLibDiscovery to view the job execution details on all the resources within the grid.

    The job execution details are displayed in the Joblet tab.

  5. Click the Resources tab to view the resources that have the Virtual Disk Development Kit.

    For the ESX on Windows, the following facts are automatically configured:

    • resource.vmware.disklib with the value set to true.

    • resource.vmware.vmmount_cmd with the value containing the location of vmware-mount.exe.

    For the ESX on Linux, the resource.vmware.disklib fact is automatically set to true.

    If you want to configure a Linux resource, continue with Step 6; else skip to Step 7.

  6. (Conditional) For the ESX on Linux, set the value of resource.vmware.disklibpath fact to the location of lib32 or lib64, depending upon the processor.

  7. (Optional) Install the Orchestrate Agent:

    1. Shut down the VM on which you want to install the Orchestrate Agent.

    2. Right-click the VM, then click Install Agent.

    3. Provision the VM.

      The resource is automatically registered as a VM in the Orchestrate Server if the Orchestrate Server is registered to the DNS server.

  8. (Optional) Personalize the VM:

    1. Click Resources > VMs.

    2. Click the VM you want to personalize.

      The Info/Groups tab is displayed by default.

    3. For a Linux VM, configure all the settings in the Linux Auotprep Config pane.

      For a Windows VM, configure the computer name and the workgroup settings in the Windows Sysprep Config pane

    4. In the Autoprep Network Adapter pane, configure the following settings:

      • Mac Address

      • DHCP or Static IP address settings.

Launching a VNC Terminal of the VM

Before starting the Launch Remote Desktop action, perform the following tasks:

  • Ensure that the VM is powered on.

  • In the Orchestrate Development Client, click the Scheduler tab > esxVncServerConfig > Run Job to enable the VNC Server service on the ESX host machine.

2.2.3 Releasing a Virtual Machine from Usage

When the demand and load on your data center decreases, the Orchestrate Server analyzes the remaining resources and releases the most appropriate resource. If a VM meets the requirements of the remaining job demands better than a physical machine, the physical machine is released before the VM is released. This dynamic analysis allows you to make sure that the needs of your data center are met.

2.2.4 Managing Virtual Machine Templates

A VM template is a special kind of VM that is not deployed separately. When the Orchestrate Server needs a VM of the template’s type to be used as a resource, it automatically clones a version of the VM and uses that clone as the VM. You can change cloned VMs into instances of VMs instead of clones.

Review the following tasks to manage VM templates:

Making a Virtual Machine Instance into a Template

  1. In the Orchestrate Development Client, right-click the VM.

  2. Select Create Template.

  3. Name the template.

  4. Specify a repository.

  5. Specify a visible VM host.

  6. Select a recommended host for the VMs to be launched on, if any are present.

  7. Click OK.

When the clone of the template VM is provisioned, it appears as a sub-branch of the template’s location in the resources tree, as in the following Linux and Windows examples:

This clone functions as an instance of a VM and runs as though it were its own version with its own MAC address and other unique identifiers. The UUID is the only new information that is automatically generated for the clone. All the rest of the new information comes from autoprep, including the MAC address if an asterisk (*) is placed in the Mac Address field in the Autoprep Network Adapter section of the Info/Groups tab for the template (the default is a blank field, meaning no MAC address is created), and if the Use Autoprep check box is enabled in the Create VM from Template dialog box.

Changing a Virtual Machine Template Clone to an Instance

  1. If you decide to keep a clone VM, go to the PlateSpin Orchestrate Development Client, right-click it, and select Remove Template Dependency.

    The Remove Template Dependency dialog box is displayed.

  2. Click OK.

2.2.5 Managed Virtual Machine Actions

You can perform many actions on the VM through the Orchestrate Development Client and the Orchestrate VM Client or you can write jobs to have actions performed on the VMs in your data center. The following table lists the managed VM actions that you can perform or use in a written job.

Table 2-2 Managed VM Actions

Action

Description

Provision

Starts a VM. This action clones and start a cloned VM template.

Clone

Creates a new, unique instance of a VM template.

Cold Migrate

Moves the storage location of the configuration and first disk files to another physical storage host. This might allow the VM to start faster.

Shutdown

Stops an active VM instance (including a started template VM).

Delete/Destroy

Removes a VM from the Resources list in the Orchestrate Development Client. If you want to delete the VM from the host machine, select the Destroy VM Instance option.

Suspend

Takes a snapshot of an active VM and pauses it in order to move it to another VM host.

Pause

Prevents the VM from obtaining CPU cycles, but it stays resident.

Resume

Allows a paused VM to access the CPU again.

Create Template

Creates a VM template from a VM instance.

Hot Migrate

Changes the association of the VM, which is residing in a shared storage location, from one host machine to another.

Checkpoint

Create a named snapshot of a moment that can later be accessed to restart from the same point

Restore

Resumes a VM at a previously stored checkpoint.

Install Orchestrator Agent

Opens a VM image and installs the Orchestrate Agent.

Make Standalone

Removes the association of a template and makes the active VM into its own instance.

Check Status

Checks the current state of the VM to verify if the VM is provisioned or shut down.

Personalize

Modifies the Orchestrate Agent properties and disk image that are currently part of a clone.

Save Config

Transfers changes made to a VM to its permanent image storage.

2.2.6 Virtual Machine Technology-Specific Actions

For a detailed breakdown of the actions you can perform on and with a VM, see the appropriate VM technology and configuration section in Section A.0, Virtual Machine Technologies and Actions.