HyperVState contains DSC resources to control state parameters of Hyper-V virtual machines.
It can be used to switch the default parameters of the HyperV configuration at the end of the DSC configuration. So you can create all VM definitions at the beginning, install Windows Updates, make some necessary reboots and safely start these VMs at last step in the DSC configuration after all critical actions are done.
Source |
|
DSC Resource |
|
Documentation |
Parameter | Attribute | DataType | Description | Allowed Values |
---|---|---|---|---|
Hashtable[] |
Set of virtual machines Only Generation 2 machines are supported! |
Parameter | Attribute | DataType | Description | Allowed Values |
---|---|---|---|---|
Name |
Key |
String |
The desired VM name. |
|
State |
String |
State of the VM. |
|
|
AutomaticStartAction |
String |
Specifies the action the virtual machine is to take upon start. |
|
|
AutomaticStartDelay |
Int32 |
Specifies the number of seconds by which the virtual machine’s start should be delayed. |
||
AutomaticStopAction |
String |
Specifies the action the virtual machine is to take when the virtual machine host shuts down. |
|
HyperVState:
VMMachines:
- Name: XXXADC
State: Running
AutomaticStartAction: Start
AutomaticStartDelay: 30
AutomaticStopAction: Shutdown
- Name: XXXAPP
State: Running
AutomaticStartDelay: 60
AutomaticStopAction: Save
Datum.yml
(Excerpt)lookup_options:
HyperVState:
merge_hash: deep
HyperVState\VMMachines:
merge_hash_array: UniqueKeyValTuples
merge_options:
tuple_keys:
- Name