HyperV VM Tasks

This chapter contains the following sections:

Add Hyper-V VM Nic

Summary
Add a VM NIC.
Description
This task adds a VM NIC. This task is supported for the following versions of SCVMM:
  • SCVMM 2012 R2
Inputs
Input Description Mappable To Type Mandatory
Select VM Select the VM on which to perform the action vm Y
Adapter Type Select adapter type gen_​text_​input Y
Enable MAC Spoofing Select if need to enable the MAC spoofing gen_​text_​input
VM Network Select VM network hyperv​VMNetwork​Identity Y
Subnet Select a Subnet hyperv​VMNetwork​Subnet​Identity
Use DHCP Select if DHCP is used for VM IP address allocation
Port Classification Select Port Classification hyperv​Port​Classification​Identity
Outputs
Output Description Type
OUTPUT_​VM_​ID ID of the VM vm
OUTPUT_​VM_​NIC_​IDENTITY VM Nic Identity hyperv​VMNic​Identity

Add VM Disk

Summary
Create a new disk for a VM.
Description
This task adds disks to an existing VM. You can configure the size, type and adapters of the disk. Disks can be only be attached to SCSI adapters.
Inputs
Input Description Mappable To Type Mandatory
Select VM Select the VM on which to perform the action vm Y
Disk Name Specify the name of the Virtual Hard Disk to Add gen_​text_​input Y
Disk Select the disk gen_​text_​input
SCSI Controller Select the SCSI controller gen_​text_​input Y
Type Select whether the disk size is fixed or dynamic in nature gen_​text_​input Y
Size (GB) Select the size of the disk in GB gen_​text_​input Y
Choose Virtual Hard Disk Choose Virtual Hard disk gen_​text_​input Y
Outputs
Output Description Type
OUTPUT_​HYPERV_​VM_​DISK Name of the Disk gen_​text_​input
OUTPUT_​VM_​ID ID of the VM vm

Assign/Unassign VM to SCVMM cloud

Summary
Assign or unassign a VM to or from an SCVMM cloud.
Description
This task assigns or unassigns a VM to or from an SCVMM cloud. This task is supported for the following versions of SCVMM:
  • SCVMM 2012 R2
Inputs
Input Description Mappable To Type Mandatory
Assign VM to cloud Assign VM to cloud Y
Select VM Select the VM on which to perform the action vm Y
Select SCVMM Cloud Specify SCVMM Cloud hyperv​SCVMMCloud​Identity
Outputs
Output Description Type
OUTPUT_​VM_​ID ID of the VM vm
OUTPUT_​SCVMM_​CLOUD_​IDENTITY SCVMM Cloud Identity hyperv​SCVMMCloud​Identity

Clone Hyper-V VM

Summary
Clone a VM.
Description
This task clones a VM. This task is supported for the following versions of SCVMM:
  • SCVMM 2012 R2
Inputs
Input Description Mappable To Type Mandatory
Select VM Select VM vm Y
Select Groups Select Groups cuic_​multi_​user_​group_​ID Y
Category Select a v​DC Category application​Category Y
VM App Charge Frequency Select VM App Charge Frequency hyper​VVMApp​Charge​Frequency
Active VM Application Cost Enter Active VM Application Cost gen_​text_​input
Inactive VM Application Cost Enter In Active VM Application Cost gen_​text_​input
Select VDC Select VDC v​DC Y
VM Name or VM Prefix Enter VM Name or VM Prefix gen_​text_​input
Comment Enter Comment gen_​text_​input
Provision Select Provision provision​Period Y
Provision Time select Date date Y
Lease Time Enter Lease Time Boolean Y
Days Enter Days gen_​text_​input Y
Hours Enter Hours gen_​text_​input Y
Select Data​Store Select Datastore hyper​VDatastore​Identity Y
VM Networks Add one or more networks
Outputs
Output Description Type
OUTPUT_​SR_​ID Rest SR ID gen_​text_​input
OUTPUT_​CLOUD_​NAME Cloud Name gen_​text_​input

Create Hyper-V VM Snapshot

Summary
Create a VM Snapshot.
Description
This task creates a snapshot of a VM.
Inputs
Input Description Mappable To Type Mandatory
Select VM Select the VM for which snapshot need to be created vm Y
Snapshot Name Name of the snapshot gen_​text_​input Y
Description Description gen_​text_​input
Outputs
Output Description Type
OUTPUT_​SNAPSHOT ID of the Snapshot gen_​text_​input
OUTPUT_​VM_​ID ID of the VM vm

Delete All Hyper-V Snapshots

Summary
Delete all the snapshots of a VM.
Description
This task deletes all the snapshots of a VM.
Inputs
Input Description Mappable To Type Mandatory
Select VM Select the VM on which to perform the action vm Y
Outputs
No Outputs

Delete Hyper-V VM

Summary
Delete a Hyperv VM.
Description
This task deletes and archives a HyperV VM.
Inputs
Input Description Mappable To Type Mandatory
Select VM Select the VM to be deleted vm Y
Outputs
Output Description Type
OUTPUT_​VM_​ID ID of the VM vm

Delete Hyper-V VM Snapshot

Summary
Delete a VM Snapshot.
Description
This task deletes a snapshot of a VM.
Inputs
Input Description Mappable To Type Mandatory
Select VM Select the VM for which snapshot need to be created vm Y
Select Snapshot List of snapshots snapshot Y
Outputs
No Outputs

Edit Hyper-V VM Nic

Summary
Edit a VM NIC.
Description
This task edits a VM NIC. This task is supported for the following versions of SCVMM:
  • SCVMM 2012 R2
Inputs
Input Description Mappable To Type Mandatory
Select VM Select the VM on which to perform the action vm Y
Select VM Nic Select VM Nic hyperv​VMNic​Identity Y
Adapter Type Select adapter type gen_​text_​input Y
Enable MAC Spoofing Select if need to enable the MAC spoofing gen_​text_​input
VM Network Select VM network hyperv​VMNetwork​Identity Y
Subnet Select a Subnet hyperv​VMNetwork​Subnet​Identity
Use DHCP Select if DHCP is used for VM IP address allocation
Port Classification Select Port Classification hyperv​Port​Classification​Identity
Outputs
Output Description Type
OUTPUT_​VM_​ID ID of the VM vm
OUTPUT_​VM_​NIC_​IDENTITY VM Nic Identity hyperv​VMNic​Identity

Execute Hyper-V VM Power Action

Summary
Perform a power action on the HyperV instance.
Description
This task is used to perform the power actions on the HyperV instance like Power On, Off, Pause, Resume, Reboot, Archive, Restore, Shutdown, Terminate.
Inputs
Input Description Mappable To Type Mandatory
Select Instance Select the VM on which to perform the action vm Y
VM Action VM Action hyperv​VMPower​Actions Y
Outputs
No Outputs

HyperV - Provision a VM without VDC

Summary
Provision a HyperV VM without VDC policies and Catalog
Description
This task provisions a new HyperV VM without VDC policies and Catalog.It helps to provision the VM by giving parameters required to provision the VM directly. Note: This task is not intended for publishing to the service end user
Inputs
Input Description Mappable To Type Mandatory
VM Name or VM Prefix VM Name or VM Prefix gen_​text_​input Y
Select Image VM Image to provision VM hyperv_​image_​identity Y
Select SCVMM Cloud Specify SCVMM Cloud hyperv​SCVMMCloud​Identity
Enable Guest Customization Enable Guest Customization Boolean
Host Name Template Host Name Template gen_​text_​input
Time Zone Select time zone hyperv​Time​Zone
GUI Run Once Commands Comma separated list of GUI run once commands gen_​text_​input
VM Image Type Select a VM image type hyperv​VMImage​Type
Linux Parameters
Root Password Root Password password
DNS Domain Name DNS Domain Name gen_​text_​input
Windows Parameters
Product ID Enter product ID gen_​text_​input
Username Enter username gen_​text_​input
Administrator Password Enter administrator password password
Organization Name Enter organization Name gen_​text_​input
Full Name Full Name gen_​text_​input
Domain/Workgroup Domain/Workgroup hyperv​Domain​List
Domain Domain gen_​text_​input
Domain Username Domain Username gen_​text_​input
Domain Password Domain Password password
Workgroup Workgroup gen_​text_​input
VM Nics Enter the VM Nics with comma (,) separated in specific text format - [NIC Alias]@[Adapter Type]@[VM Network]@[VM Subnet]@[VLAN Id]@[Is​MACSpoofing​Enabled]@[Is​DHCPEnabled]@[Static IP Pool Id]@[Port​Classification] Ex - NIC1@Synthetic@CFD_​VM_​Network_​No​Isolation@@66@false@true@@@, NIC2@Synthetic@VM_​Network_​VLAN@@false@SCVMM-38-2k16;VLANNetwork​IPPool;6ae309d0-accf-424b-ae15-d7e691dcdd31@High bandwidth gen_​text_​input
Host Node/Cluster Select the Host Node/Cluster scope hyperv​Scope​Selection​Type Y
Host select the host node on which VM should be provisioned hyperv​Host
Datastore Select datastore hyper​VDatastore​Identity Y
Number Of v​CPUs Number of v​CPUs gen_​text_​input
Enable Dynamic Memory Memory Configuration Boolean Y
Memory (MB) Memory (MB) gen_​text_​input
Startup Memory (MB) Memory (MB) gen_​text_​input
Maximum Memory (MB) Memory (MB) gen_​text_​input
Memory Buffer (%) Memory (MB) gen_​text_​input
Memory Weight Memory Weight gen_​text_​input
Custom Disk Size (GB) Custom Disk Size (GB) gen_​text_​input
Max Wait for Network (mins) Wait for network to be up for a specified amount of minutes (at the most) gen_​text_​input
Power On After Deploy Enable this option to power the VM after deployment Boolean
Outputs
Output Description Type
OUTPUT_​VM_​ID ID of the VM vm
OUTPUT_​SR_​ID Rest SR ID gen_​text_​input
OUTPUT_​CLOUD_​NAME Cloud Name gen_​text_​input
OUTPUT_​VM_​NAME VM Name gen_​text_​input
OUTPUT_​VM_​TYPE VM Type gen_​text_​input
OUTPUT_​VM_​IP_​ADDRESS VM IP Address gen_​text_​input
OUTPUT_​CREDENTIAL_​OPTIONS Credential options crendential​Options
OUTPUT_​CREDENTIAL_​USERNAME Username gen_​text_​input
OUTPUT_​CREDENTIAL_​PASSWORD Password password
OUTPUT_​VM_​DEPLOYMENT_​STATUS VM Deployment Status gen_​text_​input

Manage Hyper-V Resource Allocation

Summary
Perform resource allocation on a HyperV VM for a given catalog and vDC.
Description
This task identifies hosts and datastores with which to provision a VM, given a catalog and vDC.
Inputs
Input Description Mappable To Type Mandatory
Select Catalog Select Catalog catalog Y
Select v​DC Select v​DC v​DC Y
Outputs
Output Description Type
OUTPUT_​HYPERV_​PRIMARY_​HOST_​NAME Primary Host Node gen_​text_​input
OUTPUT_​HYPERV_​SECONDARY_​HOST_​NAME Secondary Host Node gen_​text_​input
OUTPUT_​HYPERV_​PRIMARY_​DATASTORE Primary Datastore gen_​text_​input
OUTPUT_​HYPERV_​SECONDARY_​DATASTORE Secondary Datastore gen_​text_​input

Mark/Unmark Hyper-V Golden snapshot

Summary
Mark a snapshot as a golden snapshot.
Description
This task marks or unmarks a snapshot as a golden snapshot. A golden snapshot cannot be deleted. To be removed, a golden snapshot must be marked as a regular snapshot, then deleted. The output of this task is the name of the snapshot that was marked (or unmarked).
Inputs
Input Description Mappable To Type Mandatory
Select VM Select the VM on which to perform the action vm Y
Select Snapshot List of snapshots snapshot Y
Mark As Golden Snapshot Mark or Unmark the selected snapshot as golden snapshot.​ Boolean
Outputs
No Outputs

Provision Hyper-V VM

Summary
Provision a Hyper-V VM. The host and datastore inputs must be allocated before running this task.
Description
This task provisions a Hyper-V VM. The task's host and datastore inputs must be allocated before the task runs. The task does not validate these resources, and fails if they are not properly allocated and connected. If you provide both primary and alternate (secondary) resources, the task selects the appropriate resource based on preference rating. To allocate resources in a workflow, see the "Manage Hyper-V Resource Allocation" task, which selects optimal primary and secondary hosts and datastores from a vDC.
Inputs
Input Description Mappable To Type Mandatory
Select Hyper​V Cloud Select name of the Hyper​V Cloud in this system Y
Select Catalog Select Catalog on which to perform the action catalog Y
Select v​DC Select v​DC on which to perform the action v​DC Y
VM Name or VM Prefix VM Name or VM Prefix gen_​text_​input
Select Primary Host Select Primary host gen_​text_​input
Select Primary Datastore Select Primary Datastore gen_​text_​input
Select Alternate Host Select Alternate host gen_​text_​input
Select Alternate Datastore Select Alternate Datastore gen_​text_​input
Enable High Availability Enable High Availability gen_​text_​input
Number of v​CPUs Number of v​CPUs v​CPUCount
Enable Dynamic Memory Enable Dynamic Memory gen_​text_​input
Memory Memory mem​Size​MB
Startup memory(MB) Startup Memory in MB gen_​text_​input
Maximum memory(MB) Maximum Memory in MB gen_​text_​input
Memory Buffer(%) Memory Buffer(%) gen_​text_​input
Memory Weight Memory Weight gen_​text_​input
Disk Select disk size gen_​text_​input
Max Wait for Network (mins) Wait for network to be up for a specified amount of minutes (at the most)
Outputs
Output Description Type
OUTPUT_​VM_​ID ID of the VM vm
OUTPUT_​SR_​ID Rest SR ID gen_​text_​input

Provision basic HyperV VM

Summary
Provision a HyperV VM.
Description
This task provisions a new VM in selected HyperV cloud using parameters defined in the task.
Inputs
Input Description Mappable To Type Mandatory
Select Hyper​V Cloud Select name of the Hyper​V Cloud in this system gen_​text_​input Y
Select SCVMM Cloud Specify SCVMM Cloud hyperv​SCVMMCloud​Identity
VM Name or VM Prefix VM Name or VM Prefix gen_​text_​input
Select Image VM Image to provision VM hyperv_​image_​lov Y
Select Group Select Group user​Group Y
Select System Policy Select the system policy hyperv​Deployment​Policy​Identity Y
VM Nic(s) Add one or more NICs
Select Primary Host Select Primary host hyperv​Host Y
Select Primary Datastore Select Primary Datastore hyper​VDatastore​Identity Y
Select Alternate Host Select Alternate host hyperv​Host
Select Alternate Datastore Select Alternate Datastore hyper​VDatastore​Identity
Enable High Availability Enable High Availability gen_​text_​input
Number of v​CPUs Number of v​CPUs v​CPUCount
Enable Dynamic Memory Enable Dynamic Memory gen_​text_​input
Memory Memory mem​Size​MB
Startup memory(MB) Startup Memory in MB mem​Size​MB
Maximum memory(MB) Maximum Memory in MB mem​Size​MB
Memory Buffer(%) Memory Buffer(%) Mem​Buffer​List​Provider
Memory Weight Memory Weight Mem​Weight​List​Provider
Disk Select disk size disk​Size​GB
Max Wait for Network (mins) Wait for network to be up for a specified amount of minutes (at the most) Max​Wait​For​Network​List
Enable Guest Customization Enable Guest Customization Enable​Guest​Customization
Select Credential Options Select Credential Options crendential​Options
Outputs
Output Description Type
OUTPUT_​VM_​ID ID of the VM vm
OUTPUT_​SR_​ID Rest SR ID gen_​text_​input
OUTPUT_​CLOUD_​NAME Cloud Name gen_​text_​input
OUTPUT_​VM_​NAME VM Name gen_​text_​input
OUTPUT_​VM_​TYPE VM Type gen_​text_​input
OUTPUT_​VM_​IP_​ADDRESS VM IP Address gen_​text_​input
OUTPUT_​CREDENTIAL_​OPTIONS Credential options crendential​Options
OUTPUT_​CREDENTIAL_​USERNAME Username gen_​text_​input
OUTPUT_​CREDENTIAL_​PASSWORD Password password
OUTPUT_​VM_​DEPLOYMENT_​STATUS VM Deployment Status gen_​text_​input

Remove Hyper-V VM Disk

Summary
Remove a VM Disk.
Description
This task removes a VM disk. Only disks attached to SCSI adapters can be removed.
Inputs
Input Description Mappable To Type Mandatory
Select VM Select the VM on which to perform the action vm Y
Disk Name Specify the name of the Virtual Hard Disk to Remove gen_​text_​input Y
Outputs
No Outputs

Remove Hyper-V VM Nic

Summary
Remove a VM NIC.
Description
This task removes a VM NIC. This task is supported for the following versions of SCVMM:
  • SCVMM 2012 R2
Inputs
Input Description Mappable To Type Mandatory
Select VM Select the VM on which to perform the action vm Y
Select VM Nic Select VM Nic hyperv​VMNic​Identity Y
Outputs
Output Description Type
OUTPUT_​VM_​ID ID of the VM vm
OUTPUT_​VM_​NIC_​IDENTITY VM Nic Identity hyperv​VMNic​Identity

Resize CPU and Memory

Summary
Reconfigure the memory and CPU of a virtual machine.
Description
This task modifies a VM's memory and CPU.
Inputs
Input Description Mappable To Type Mandatory
Select VM Select the VM vm Y
CPU Count Number of CPUs gen_​text_​input
Enable Dynamic Memory Enable Dynamic Memory.​
Memory (MB) Memory in MB gen_​text_​input Y
Startup memory (MB) Startup memory in MB gen_​text_​input Y
Maximum memory (MB) Maximum memory in MB gen_​text_​input Y
Memory buffer(%) Memory buffer(%) gen_​text_​input Y
Memory Weight Memory Weight gen_​text_​input
Outputs
No Outputs

Resize HyperV VM Disk

Summary
Resize a disk on a VM.
Description
This task resizes a VM's disk.
Inputs
Input Description Mappable To Type Mandatory
Select VM Select the VM for which to be resized vm Y
Select Disk VM Disk gen_​text_​input Y
Current Disk Size (GB) VM Disk gen_​text_​input
New Disk Size (GB) New Disk Size of the VM gen_​text_​input Y
Outputs
Output Description Type
OUTPUT_​VM_​ID ID of the VM vm

Resync Hyper-V VM

Summary
Collect inventory of a VM.
Description
This task inventories a VM. The task refreshes the parameters of a VM, including memory, ipaddress, and snapshots.
Inputs
Input Description Mappable To Type Mandatory
Select VM Select the VM on which to perform the action vm Y
Max Wait Time (minutes) Max Wait Time in minutes Y
Outputs
Output Description Type
VM_​ID VMID of the Selected VM gen_​text_​input
VM_​NAME Name of the Selected VM gen_​text_​input
VM_​ACCOUNTNAME Account Name of the Selected VM account​Name
VM_​PRIMARYIP Primary IP Address of the VM ipaddress
VM_​HOST Host of the Selected VM vm​Host
VM_​STATUS Status the VM gen_​text_​input
VM_​NUM_​NICS Number of NICS on the VM gen_​text_​input

Revert Hyper-V VM Snapshot

Summary
Revert a VM snapshot.
Description
This task reverts a snapshot of a VM.
Inputs
Input Description Mappable To Type Mandatory
Select VM Select the VM for which snapshot need to be reverted vm Y
Select Snapshot List of snapshots snapshot Y
Outputs
Output Description Type
OUTPUT_​SNAPSHOT ID of the Snapshot gen_​text_​input
OUTPUT_​VM_​ID ID of the VM vm