Hyper-V

From Hornbill
Revision as of 10:08, 19 March 2020 by SteveGoldthorpe (talk | contribs) (Created page with "{{bluebanner|Home > Administration > IT Operations Management > ITOM Package Library > Hyper-V|[[:Categ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Home > Administration > IT Operations Management > ITOM Package Library > Hyper-V Index

microsoft_logo.png

Introduction

The Hyper-V package for Hornbill's IT Operations Management (ITOM) contains operations to automate the management of Hyper-V environments.

Related Articles

Target Environment Requirements

Script Execution Machine Requirements

  • The HyperV PowerShell module needs to installed on the machine that will be executing the scripts (the correct Hyper-V Management Package for your OS);
  • If the script execution policy on the machine executing these operations is set to Restricted, then this will need to be updated to something less restrictive. See the PowerShell Documentation for more information.

KeySafe Configuration

Itomtarget keysafe.png

When creating SIS jobs for operations contained within this package, they need to be run on the target machine as a user who has the correct privileges on the target.

To configure your Target Machine account authentication in KeySafe:

  • In the Admin console, navigate to: System > Security > KeySafe;
  • Click on + then select Username + Password;
  • Give the KeySafe Key a Title (this is the name/identifier for the target machine account as you will see it when creating an IT Automation Job, or adding an IT Automation node to a Business Process or Runbook);
  • Optionally add a description;
  • Populate the Username field with the domain/local account username for the account being used on the target machine;
  • Populate the Password field with the password for the above account;
  • Select Create Key to save.

Once you have created your KeySafe Key, you can then use it when creating IT Automation Jobs from this package. See screenshots to the right for examples.

Package Operations

Hyperv job.png

The Hyper-V package contains the following operations, than can be used to create ITOM Jobs directly, or included in your Business Processes and/or IT Operations Management Rubooks.

Start VM

This operation will Start a Hyper-V Virtual Machine.

Extra Credentials

None required.

Input Parameters

  • VMName (MANDATORY) - The name of the Virtual Machine to perform the action against. Supports the * wildcard to perform the action against multiple VMs;
  • HostName - Optionally provide the Hyper-V host to perform the action on. NetBIOS names, IP addresses, and fully qualified domain names are allowable.

Output Parameters

  • errors - Any errors returned by the operation;
  • outcome - Outcome of the operation. Can be OK or FAIL;
  • warnings - Any warnings returned by the operation.

Stop VM

This operation will Stop a Hyper-V Virtual Machine.

Extra Credentials

None required.

Input Parameters

  • VMName (MANDATORY) - The name of the Virtual Machine to perform the action against. Supports the * wildcard to perform the action against multiple VMs;
  • HostName - Optionally provide the Hyper-V host to perform the action on. NetBIOS names, IP addresses, and fully qualified domain names are allowable;
  • Force - Specifies that the shutdown of the virtual machine is to be forced. If the virtual machine has applications with unsaved data, the virtual machine has five minutes to save data and shut down. If the virtual machine is locked, it is shut down immediately;
  • Save - Specifies that the virtual machine is to be saved;
  • TurnOff - Specifies that the virtual machine is to be turned off.

Output Parameters

  • errors - Any errors returned by the operation
  • outcome - Outcome of the operation. Can be OK or FAIL
  • warnings - Any warnings returned by the operation

Suspend VM

This operation will Suspend a Hyper-V Virtual Machine.

Extra Credentials

None required.

Input Parameters

  • VMName (MANDATORY) - The name of the Virtual Machine to perform the action against. Supports the * wildcard to perform the action against multiple VMs;
  • HostName - Optionally provide the Hyper-V host to perform the action on. NetBIOS names, IP addresses, and fully qualified domain names are allowable.

Output Parameters

  • errors - Any errors returned by the operation;
  • outcome - Outcome of the operation. Can be OK or FAIL;
  • warnings - Any warnings returned by the operation.

Resume VM

This operation will Resume a Hyper-V Virtual Machine.

Extra Credentials

None required.

Input Parameters

  • VMName (MANDATORY) - The name of the Virtual Machine to perform the action against. Supports the * wildcard to perform the action against multiple VMs;
  • HostName - Optionally provide the Hyper-V host to perform the action on. NetBIOS names, IP addresses, and fully qualified domain names are allowable.

Output Parameters

  • errors - Any errors returned by the operation;
  • outcome - Outcome of the operation. Can be OK or FAIL;
  • warnings - Any warnings returned by the operation.

Restart VM

This operation will Restart a Hyper-V Virtual Machine.

Extra Credentials

None required.

Input Parameters

  • VMName (MANDATORY) - The name of the Virtual Machine to perform the action against. Supports the * wildcard to perform the action against multiple VMs;
  • HostName - Optionally provide the Hyper-V host to perform the action on. NetBIOS names, IP addresses, and fully qualified domain names are allowable.

Output Parameters

  • errors - Any errors returned by the operation;
  • outcome - Outcome of the operation. Can be OK or FAIL;
  • warnings - Any warnings returned by the operation.

Save VM

This operation will Save a Hyper-V Virtual Machine.

Extra Credentials

None required.

Input Parameters

  • VMName (MANDATORY) - The name of the Virtual Machine to perform the action against. Supports the * wildcard to perform the action against multiple VMs;
  • HostName - Optionally provide the Hyper-V host to perform the action on. NetBIOS names, IP addresses, and fully qualified domain names are allowable.

Output Parameters

  • errors - Any errors returned by the operation;
  • outcome - Outcome of the operation. Can be OK or FAIL;
  • warnings - Any warnings returned by the operation.

Checkpoint VM

This operation will create a Checkpoint for a Hyper-V Virtual Machine.

Extra Credentials

None required.

Input Parameters

  • VMName (MANDATORY) - The name of the Virtual Machine to perform the action against. Supports the * wildcard to perform the action against multiple VMs;
  • HostName - Optionally provide the Hyper-V host to perform the action on. NetBIOS names, IP addresses, and fully qualified domain names are allowable;
  • SnapshotName - Optionally provide the name of the new Snapshot.

Output Parameters

  • errors - Any errors returned by the operation;
  • outcome - Outcome of the operation. Can be OK or FAIL;
  • warnings - Any warnings returned by the operation.

Remove VM Snapshot

This operation will remove a snapshot from a Hyper-V Virtual Machine.

Extra Credentials

None required.

Input Parameters

  • VMName (MANDATORY) - The name of the Virtual Machine to perform the action against. Supports the * wildcard to perform the action against multiple VMs;
  • HostName - Optionally provide the Hyper-V host to perform the action on. NetBIOS names, IP addresses, and fully qualified domain names are allowable;
  • SnapshotName (MANDATORY) - Provide the name of the new Snapshot;
  • IncludeAllChildSnapshots - Optionally define whether all child snapshots should be deleted.

Output Parameters

  • errors - Any errors returned by the operation;
  • outcome - Outcome of the operation. Can be OK or FAIL;
  • warnings - Any warnings returned by the operation.

Enable VM Resource Metering

This operation will enable Resource Metering on a Hyper-V Virtual Machine.

Extra Credentials

None required.

Input Parameters

  • VMName (MANDATORY) - The name of the Virtual Machine to perform the action against. Supports the * wildcard to perform the action against multiple VMs;
  • HostName - Optionally provide the Hyper-V host to perform the action on. NetBIOS names, IP addresses, and fully qualified domain names are allowable.

Output Parameters

  • errors - Any errors returned by the operation;
  • outcome - Outcome of the operation. Can be OK or FAIL;
  • warnings - Any warnings returned by the operation.

Measure VM

This operation will gather resource utilization data for a specific Hyper-V Virtual Machine, where the VM has Resource Metering enabled.

Extra Credentials

None required.

Input Parameters

  • VMName (MANDATORY) - The name of the Virtual Machine to perform the action against. Supports the * wildcard to perform the action against multiple VMs;
  • HostName - Optionally provide the Hyper-V host to perform the action on. NetBIOS names, IP addresses, and fully qualified domain names are allowable.

Output Parameters

  • errors - Any errors returned by the operation;
  • outcome - Outcome of the operation. Can be OK or FAIL;
  • warnings - Any warnings returned by the operation;
  • avgCPU - Average CPU usage;
  • avgRAM - Average RAM usage;
  • maxRAM - Maximum RAM usage;
  • minRam - Minimum RAM usage;
  • totalDisk - Total disk usage;
  • networkInbound - Network inbound usage;
  • networkOutbound - Network outbound usage.