2.3 Managing a Running Virtual Machine

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

Review the following sections for ways to manage running VMs:

2.3.1 Using the Right-Click Menu for Provisioning Actions

You can perform provisioning actions by right-clicking a VM in the Explorer tree of the Orchestrate Development Client.

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-2 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 a shared repository, you can register the VM to a different host and start the VM if the host is also connected to the 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.

NOTE:A suspended VM must be provisioned to make it active again. The Resume action does not perform this function.

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

vSphere: 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. From a user’s perspective, if a VM is suspended, it is effectively “down.” 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.

    For more information, see the VMware VMotion documentation.

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.

Save Config

Requests that the runtime VM configuration be persisted on the VM image for future use.

NOTE:If you add a VNIC or a vDisk to a VM, you must initiate the Save Config action. Clicking the Save icon on the Development Client toolbar does not save the change.

Apply Config

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

Create Template (VM only)

Creates a new template object based on the VM. Other versions of the VM can be cloned from this template. This menu item is replaced by the Clone menu item when you right-click a template VM.

Clone (VM template only)

Creates a standalone VM instance from the template but does not power on that instance. This action is unlike the Provision action from a template, which performs a Clone action, powers on the instance, then destroys the VM instance when it is powered off.

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 4.0, Configuring VM Provisioning Adapters and Discovered VMs.

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 vSphere 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 resource.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 vSphere 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 resource.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 Xen-managed 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.

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.

This action relates to all guest OS-level changes, not hardware changes. With vSphere, guest customization occurs the next time the VM is powered on. The vSphere administrator must have properly configured the vCenter server to handle sysprep and the VMware tools must be installed to the VM.

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.

Shutdown Agent

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

Create Virtual NIC

Manually creates a vNIC on the VM to configure its network interface configuration by way of a vBridge connection.

For more information, see Creating Or Deleting a vNIC in the Development Client in the PlateSpin Orchestrate 2.5 Development Client Reference.

NOTE:You can manually delete the new vNIC after it is created by right-clicking the vNIC object in the Explorer tree, then selecting Delete.

Create Virtual Disk

Manually creates a vDisk image of a specified size (measured in Mb) to associate to the VM.

For more information, see Creating Or Deleting a vDisk in the Development Client in the PlateSpin Orchestrate 2.5 Development Client Reference.

NOTE:You can manually delete the new vDisk after it is created by right-clicking the vDisk object in the Explorer tree, then selecting Delete.

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.

For more information, see Section 4.1.4, Setting Up VNC for a VM Managed by vSphere.

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.5 VM Client Guide and Reference.

2.3.2 Prerequisites for Creating or Deleting vNIC and vDisk Objects on Hyper-V Managed Linux VMs

Although you can create vNICs and vDisks on Windows VMs managed by the Microsoft Hyper-V hypervisor, there is a prerequisite for creating or deleting these objects on a Linux VM managed by Hyper-V.

To make these actions work, it is necessary to install Linux Integration Components from Microsoft. For download and installation information, see the Linux Integration Components page at the Microsoft downloads Web site.

2.3.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.3.4 Managing Virtual Machine Templates

A VM template is a special kind of VM that is not deployed separately.

Review the following tasks to manage VM templates:

This section also includes some information about support for the provisioning actions of a VM template created from a Hyper-V VM. See Hyper-V VM Template Actions.

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 instance of the template VM is provisioned, it appears as a sub-branch of the template’s location in the resources tree.

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.

NOTE:This procedure works only when a VM instance has been cloned from a template. It does not work when a VM instance is provisioned from a template.

Hyper-V VM Template Actions

VM templates created in PlateSpin Orchestrate from discovered Hyper-V VMs have limited functionality. The following actions are supported in a Hyper-V VM template:

  • Provision

  • Move Disk Images

  • Clone

  • Delete/Destroy Resource

  • Resync State

IMPORTANT:Even though the Create Virtual NIC and Create Virtual Disk actions appear to be legitimate actions on the right-click menu of a Hyper-V VM template (that is, they are not dimmed), these are not supported actions.

The following actions are not supported in a Hyper-V VM template:

  • Save Config

  • Checkpoint

  • Restore

  • Install Agent

  • Personalize

  • Create Virtual NIC

  • Create Virtual Disk

2.3.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-3 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).

NOTE:If you manually shut down a running VM (either by logging in to the VM and shutting it down manually or by using any hypervisor-specific tool to shut down the VM), that VM is still displayed in the PlateSpin Orchestrate Client as running. If you then choose the Shutdown action rather than the Resync State action for that VM, the Orchestrate job log shows that the shutdown job fails. This condition always exists unless a Resync operation occurs on the VM or when an Orchestrate Agent on the VM relays its current state to the Orchestrate Server.

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.3.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.