Difference between revisions of "Hyper-V"

From Hornbill
Jump to navigation Jump to search
 
(9 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{bluebanner|[[Main_Page|Home]] > [[Administration]] > [[IT_Operations_Management|IT Operations Management]] > [[ITOM_Package_Library|ITOM Package Library]] > Hyper-V|[[:Category:ITOM|Index]]}}
+
This document can now be found at its new location in the [https://docs.hornbill.com/itom-packages/welcome Hornbill Document Library].
[[File:microsoft_logo.png|microsoft_logo.png|300px]]
 
{{IntroAndLinks|The Hyper-V package for Hornbill's IT Operations Management (ITOM) contains operations to automate the management of Hyper-V environments.
 
|
 
<!-- Related Links go here -->
 
:* [[IT_Operations_Management|IT Operations Management]]
 
:* [[Business_Process_Designer|Business Process Designer]]
 
:* [[Hornbill_KeySafe|KeySafe]]
 
}}
 
  
==Target Environment Requirements==
+
    [[file:hornbill-document-library.png|ITOM Package Reference|link=https://docs.hornbill.com/itom-packages/welcome]]
 
+
[[Category:HDOC]]
===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 [https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.security/set-executionpolicy?view=powershell-6 PowerShell Documentation] for more information.
 
 
 
==KeySafe Configuration==
 
[[File:Itomtarget_keysafe.png|300px|right|link=https://wiki.hornbill.com/images/a/aa/Hyperv_job.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 '''[[Hornbill_KeySafe|KeySafe]]''':
 
 
 
* In the Admin console, navigate to: System > Security > KeySafe;
 
* Click on + then select <code>Username + Password</code>;
 
* 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==
 
[[File:hyperv_job.png|300px|right|link=https://wiki.hornbill.com/images/b/b8/Diskcleanup_job.png]]
 
 
 
The Hyper-V package contains the following operations, than can be used to create ITOM Jobs directly, or included in your [[Business_Process_Designer|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====
 
 
 
* <code>VMName</code> '''(MANDATORY)''' - The name of the Virtual Machine to perform the action against. Supports the * wildcard to perform the action against multiple VMs;
 
* <code>HostName</code> - Optionally provide the Hyper-V host to perform the action on. NetBIOS names, IP addresses, and fully qualified domain names are allowable.
 
 
 
====Output Parameters====
 
 
 
* <code>errors</code> - Any errors returned by the operation;
 
* <code>outcome</code> - Outcome of the operation. Can be OK or FAIL;
 
* <code>warnings</code> - Any warnings returned by the operation.
 
 
 
===Stop VM===
 
 
 
This operation will Stop a Hyper-V Virtual Machine.
 
 
 
====Extra Credentials====
 
 
 
None required.
 
 
 
====Input Parameters====
 
 
 
* <code>VMName</code> '''(MANDATORY)''' - The name of the Virtual Machine to perform the action against. Supports the * wildcard to perform the action against multiple VMs;
 
* <code>HostName</code> - Optionally provide the Hyper-V host to perform the action on. NetBIOS names, IP addresses, and fully qualified domain names are allowable;
 
* <code>Force</code> - 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;
 
* <code>Save</code> - Specifies that the virtual machine is to be saved;
 
* <code>TurnOff</code> - Specifies that the virtual machine is to be turned off.
 
 
 
====Output Parameters====
 
 
 
* <code>errors</code> - Any errors returned by the operation
 
* <code>outcome</code> - Outcome of the operation. Can be OK or FAIL
 
* <code>warnings</code> - Any warnings returned by the operation
 
 
 
===Suspend VM===
 
 
 
This operation will Suspend a Hyper-V Virtual Machine.
 
 
 
====Extra Credentials====
 
 
 
None required.
 
 
 
====Input Parameters====
 
 
 
* <code>VMName</code> '''(MANDATORY)''' - The name of the Virtual Machine to perform the action against. Supports the * wildcard to perform the action against multiple VMs;
 
* <code>HostName</code> - Optionally provide the Hyper-V host to perform the action on. NetBIOS names, IP addresses, and fully qualified domain names are allowable.
 
 
 
====Output Parameters====
 
 
 
* <code>errors</code> - Any errors returned by the operation;
 
* <code>outcome</code> - Outcome of the operation. Can be OK or FAIL;
 
* <code>warnings</code> - Any warnings returned by the operation.
 
 
 
===Resume VM===
 
 
 
This operation will Resume a Hyper-V Virtual Machine.
 
 
 
====Extra Credentials====
 
 
 
None required.
 
 
 
====Input Parameters====
 
 
 
* <code>VMName</code> '''(MANDATORY)''' - The name of the Virtual Machine to perform the action against. Supports the * wildcard to perform the action against multiple VMs;
 
* <code>HostName</code> - Optionally provide the Hyper-V host to perform the action on. NetBIOS names, IP addresses, and fully qualified domain names are allowable.
 
 
 
====Output Parameters====
 
 
 
* <code>errors</code> - Any errors returned by the operation;
 
* <code>outcome</code> - Outcome of the operation. Can be OK or FAIL;
 
* <code>warnings</code> - Any warnings returned by the operation.
 
 
 
===Restart VM===
 
 
 
This operation will Restart a Hyper-V Virtual Machine.
 
 
 
====Extra Credentials====
 
 
 
None required.
 
 
 
====Input Parameters====
 
 
 
* <code>VMName</code> '''(MANDATORY)''' - The name of the Virtual Machine to perform the action against. Supports the * wildcard to perform the action against multiple VMs;
 
* <code>HostName</code> - Optionally provide the Hyper-V host to perform the action on. NetBIOS names, IP addresses, and fully qualified domain names are allowable.
 
 
 
====Output Parameters====
 
 
 
* <code>errors</code> - Any errors returned by the operation;
 
* <code>outcome</code> - Outcome of the operation. Can be OK or FAIL;
 
* <code>warnings</code> - Any warnings returned by the operation.
 
 
 
===Save VM===
 
 
 
This operation will Save a Hyper-V Virtual Machine.
 
 
 
====Extra Credentials====
 
 
 
None required.
 
 
 
====Input Parameters====
 
 
 
* <code>VMName</code> '''(MANDATORY)''' - The name of the Virtual Machine to perform the action against. Supports the * wildcard to perform the action against multiple VMs;
 
* <code>HostName</code> - Optionally provide the Hyper-V host to perform the action on. NetBIOS names, IP addresses, and fully qualified domain names are allowable.
 
 
 
====Output Parameters====
 
 
 
* <code>errors</code> - Any errors returned by the operation;
 
* <code>outcome</code> - Outcome of the operation. Can be OK or FAIL;
 
* <code>warnings</code> - 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====
 
 
 
* <code>VMName</code> '''(MANDATORY)''' - The name of the Virtual Machine to perform the action against. Supports the * wildcard to perform the action against multiple VMs;
 
* <code>HostName</code> - Optionally provide the Hyper-V host to perform the action on. NetBIOS names, IP addresses, and fully qualified domain names are allowable;
 
* <code>SnapshotName</code> - Optionally provide the name of the new Snapshot.
 
 
 
====Output Parameters====
 
 
 
* <code>errors</code> - Any errors returned by the operation;
 
* <code>outcome</code> - Outcome of the operation. Can be OK or FAIL;
 
* <code>warnings</code> - 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====
 
 
 
* <code>VMName</code> '''(MANDATORY)''' - The name of the Virtual Machine to perform the action against. Supports the * wildcard to perform the action against multiple VMs;
 
* <code>HostName</code> - Optionally provide the Hyper-V host to perform the action on. NetBIOS names, IP addresses, and fully qualified domain names are allowable;
 
* <code>SnapshotName</code> '''(MANDATORY)''' - Provide the name of the new Snapshot;
 
* <code>IncludeAllChildSnapshots</code> - Optionally define whether all child snapshots should be deleted.
 
 
 
====Output Parameters====
 
 
 
* <code>errors</code> - Any errors returned by the operation;
 
* <code>outcome</code> - Outcome of the operation. Can be OK or FAIL;
 
* <code>warnings</code> - 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====
 
 
 
* <code>VMName</code> '''(MANDATORY)''' - The name of the Virtual Machine to perform the action against. Supports the * wildcard to perform the action against multiple VMs;
 
* <code>HostName</code> - Optionally provide the Hyper-V host to perform the action on. NetBIOS names, IP addresses, and fully qualified domain names are allowable.
 
 
 
====Output Parameters====
 
 
 
* <code>errors</code> - Any errors returned by the operation;
 
* <code>outcome</code> - Outcome of the operation. Can be OK or FAIL;
 
* <code>warnings</code> - 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====
 
 
 
* <code>VMName</code> '''(MANDATORY)''' - The name of the Virtual Machine to perform the action against. Supports the * wildcard to perform the action against multiple VMs;
 
* <code>HostName</code> - Optionally provide the Hyper-V host to perform the action on. NetBIOS names, IP addresses, and fully qualified domain names are allowable.
 
 
 
====Output Parameters====
 
 
 
* <code>errors</code> - Any errors returned by the operation;
 
* <code>outcome</code> - Outcome of the operation. Can be OK or FAIL;
 
* <code>warnings</code> - Any warnings returned by the operation;
 
* <code>avgCPU</code> - Average CPU usage;
 
* <code>avgRAM</code> - Average RAM usage;
 
* <code>maxRAM</code> - Maximum RAM usage;
 
* <code>minRam</code> - Minimum RAM usage;
 
* <code>totalDisk</code> - Total disk usage;
 
* <code>networkInbound</code> - Network inbound usage;
 
* <code>networkOutbound</code> - Network outbound usage.
 
 
 
===Set Memory===
 
 
 
This operation will set the memory details for a specific Hyper-V Virtual Machine. The target VM must be in a shutdown state, as per the [https://docs.microsoft.com/en-us/powershell/module/hyper-v/set-vmmemory?view=win10-ps Set-VMMemory documentation].
 
 
 
====Input Parameters====
 
 
 
* <code>VMName</code>: The name of the Virtual Machine to perform the action against;
 
* <code>HostName</code>: Optionally provide the Hyper-V host to perform the action on. NetBIOS names, IP addresses, and fully qualified domain names are allowable;
 
* <code>DynamicMemoryEnabled</code>: Specifies whether dynamic memory is to be enabled on the virtual machine to be configured;
 
* <code>MinimumBytes</code>: Specifies the minimum amount of memory to be used by a virtual machine which has dynamic memory enabled. Supports values such as 512MB, 1GB etc;
 
* <code>StartupBytes</code>: Specifies the initial amount of memory to be assigned to a virtual machine with dynamic memory enabled, or the total amount of memory to be assigned to a virtual machine with dynamic memory disabled;
 
* <code>MaximumBytes</code>: Specifies the maximum amount of memory to be used by a virtual machine which has dynamic memory enabled. Supports values such as 512MB, 1GB etc;
 
* <code>Priority</code>: Sets the priority for memory availability to this virtual machine relative to other virtual machines on the virtual machine host. Allowed values range from 0 to 100. Set to -1 to disable this mandatory parameter;
 
* <code>Buffer</code>: Specifies the percentage of memory to reserve as a buffer in the virtual machine to be configured. Allowed values range from 5 to 2000. Set to -1 to disable this mandatory parameter;
 
* <code>MaximumAmountPerNumaNodeBytes</code>: Specifies the maximum amount of memory per NUMA node in the virtual machine to be configured. Supports values such as 512MB, 1GB etc;
 
* <code>ResourcePoolName</code>: Specifies the name of the memory resource pool for this virtual machine.
 
 
 
====Output Parameters====
 
 
 
* <code>errors</code> - Any errors returned by the operation;
 
* <code>outcome</code> - Outcome of the operation. Can be OK or FAIL;
 
* <code>warnings</code> - Any warnings returned by the operation.
 
 
 
===Set Processor===
 
 
 
This operation will set the processor details for a specific Hyper-V Virtual Machine. The target VM must be in a shutdown state, as per the [https://docs.microsoft.com/en-us/powershell/module/hyper-v/set-vmprocessor?view=win10-ps Set-VMProcessor documentation]
 
 
 
====Input Parameters====
 
 
 
* <code>VMName</code> : The name of the Virtual Machine to perform the action against;
 
* <code>HostName</code> : Optionally provide the Hyper-V host to perform the action on. NetBIOS names, IP addresses, and fully qualified domain names are allowable;
 
* <code>Count</code> : Specifies the number of virtual processors for the virtual machine;
 
* <code>CompatibilityForMigrationEnabled</code> : Specifies whether the virtual processor's features are to be limited for compatibility when migrating the virtual machine to another host;
 
* <code>CompatibilityForOlderOperatingSystemsEnabled</code> : Specifies whether the virtual processor's features are to be limited for compatibility with older operating systems;
 
* <code>HwThreadCountPerCore</code> : Specifies the number of virtual SMT threads exposed to the virtual machine;
 
* <code>Maximum</code> ; Specifies the maximum percentage of resources available to the virtual machine processor to be configured. Allowed values range from 0 to 100;
 
* <code>Reserve</code> : pecifies the percentage of processor resources to be reserved for this virtual machine. Allowed values range from 0 to 100;
 
* <code>RelativeWeight</code> : Specifies the priority for allocating the physical computer's processing power to this virtual machine relative to others. Allowed values range from 1 to 10000;
 
* <code>MaximumCountPerNumaNode</code> : Specifies the maximum number of processors per NUMA node to be configured for the virtual machine;
 
* <code>MaximumCountPerNumaSocket</code> : Specifies the maximum number of sockets per NUMA node to be configured for the virtual machine;
 
* <code>ResourcePoolName</code> : Specifies the name of the processor resource pool to be used;
 
* <code>EnableHostResourceProtection</code> : Specifies whether to enable host resource protection on the virtual machine;
 
* <code>ExposeVirtualizationExtensions</code> : Specifies whether the hypervisor should expose the presence of virtualization extensions to the virtual machine, which enables support for nested virtualization.
 
 
 
====Output Parameters====
 
 
 
* <code>errors</code> - Any errors returned by the operation;
 
* <code>outcome</code> - Outcome of the operation. Can be OK or FAIL;
 
* <code>warnings</code> - Any warnings returned by the operation.
 
 
 
[[Category:ITOM]]
 

Latest revision as of 18:51, 11 April 2024

This document can now be found at its new location in the Hornbill Document Library.

   ITOM Package Reference