-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move documentation to the HyperVDsc GitHub Wiki (#201)
- Loading branch information
Showing
16 changed files
with
101 additions
and
591 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,14 @@ | ||
[ClassVersion("1.0.0"), FriendlyName("Vhd")] | ||
class DSC_Vhd : OMI_BaseResource | ||
{ | ||
[Key, Description("Name of the VHD File")] String Name; | ||
[Key, Description("Folder where the VHD will be created")] String Path; | ||
[Write, Description("Parent VHD file path, for differencing disk")] String ParentPath; | ||
[Write, Description("Maximum size of Vhd to be created")] Uint64 MaximumSizeBytes; | ||
[Write, Description("Virtual disk format - Vhd or Vhdx"), ValueMap{"Vhd","Vhdx"}, Values{"Vhd","Vhdx"}] String Generation; | ||
[Write, Description("Should the VHD be created or deleted"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; | ||
[Read, Description("Virtual Disk Identifier")] String ID; | ||
[Write, Description("Type of Vhd - Dynamic, Fixed, Differencing"), ValueMap{"Dynamic","Fixed","Differencing"}, Values{"Dynamic","Fixed","Differencing"}] String Type; | ||
[Read, Description("Current size of the VHD")] Uint64 FileSizeBytes; | ||
[Read, Description("Is the VHD attached to a VM or not")] Boolean IsAttached; | ||
[Key, Description("The desired VHD file name.")] String Name; | ||
[Key, Description("he desired Path where the VHD will be created.")] String Path; | ||
[Write, Description("Parent VHD file path, for differencing disk.")] String ParentPath; | ||
[Write, Description("Maximum size of VHD to be created.")] Uint64 MaximumSizeBytes; | ||
[Write, Description("Virtual disk format. The default value is `Vhd`."), ValueMap{"Vhd","Vhdx"}, Values{"Vhd","Vhdx"}] String Generation; | ||
[Write, Description("Specifies if the virtual disk should be present (if not it will be created) or absent (if present it will be removed). Default value is `Present`."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; | ||
[Read, Description("Returns the virtual disk identifier.")] String ID; | ||
[Write, Description("The type of virtual disk. The default value is `Dynamic`."), ValueMap{"Dynamic","Fixed","Differencing"}, Values{"Dynamic","Fixed","Differencing"}] String Type; | ||
[Read, Description("Returns the current size of the virtual disk.")] Uint64 FileSizeBytes; | ||
[Read, Description("Returns if the virtual disk is attached to a VM.")] Boolean IsAttached; | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
[ClassVersion("1.0.0"), FriendlyName("VMHyperV")] | ||
class DSC_VMHyperV : OMI_BaseResource | ||
{ | ||
[Key, Description("Name of the VM")] String Name; | ||
[Required, Description("VHD associated with the VM")] String VhdPath; | ||
[Write, Description("Virtual switch(es) associated with the VM")] String SwitchName[]; | ||
[Key, Description("The desired name of the VM.")] String Name; | ||
[Required, Description("The desired VHD associated with the VM.")] String VhdPath; | ||
[Write, Description("Virtual switch(es) associated with the VM. Multiple NICs can now be assigned.")] String SwitchName[]; | ||
[Write, Description("State of the VM."), ValueMap{"Running","Paused","Off"}, Values{"Running","Paused","Off"}] String State; | ||
[Write, Description("Folder where the VM data will be stored")] String Path; | ||
[Write, Description("Virtual machine generation")] Uint32 Generation; | ||
[Write, Description("Startup RAM for the VM.")] Uint64 StartupMemory; | ||
[Write, Description("Minimum RAM for the VM. This enables dynamic memory.")] Uint64 MinimumMemory; | ||
[Write, Description("Maximum RAM for the VM. This enable dynamic memory.")] Uint64 MaximumMemory; | ||
[Write, Description("MAC address(es) of the VM NICs.")] String MACAddress[]; | ||
[Write, Description("Processor count for the VM")] Uint32 ProcessorCount; | ||
[Write, Description("Waits for VM to get valid IP address.")] Boolean WaitForIP; | ||
[Write, Description("If specified, shutdowns and restarts the VM as needed for property changes")] Boolean RestartIfNeeded; | ||
[Write, Description("Should the VM be created or deleted"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; | ||
[Write, Description("Folder where the VM data will be stored.")] String Path; | ||
[Write, Description("Virtual machine's generation. Generation 2 virtual machines **only** support VHDX files. The default value is `1`.")] Uint32 Generation; | ||
[Write, Description("Startup RAM for the VM. If neither MinimumMemory nor MaximumMemory is specified, dynamic memory will be disabled.")] Uint64 StartupMemory; | ||
[Write, Description("Minimum RAM for the VM. Setting this property enables dynamic memory, with the exception; If MinimumMemory, MaximumMemory and StartupMemory is equal, dynamic memory will be disabled.")] Uint64 MinimumMemory; | ||
[Write, Description("Maximum RAM for the VM. Setting this property enables dynamic memory, with the exception; If MinimumMemory, MaximumMemory and StartupMemory is equal, dynamic memory will be disabled.")] Uint64 MaximumMemory; | ||
[Write, Description("MAC address(es) of the VM NICs. Multiple MAC addresses can now be assigned.")] String MACAddress[]; | ||
[Write, Description("Processor count for the VM.")] Uint32 ProcessorCount; | ||
[Write, Description("If specified, waits for the VM to get valid IP address.")] Boolean WaitForIP; | ||
[Write, Description("If specified, will shutdown and restart the VM as needed for property changes.")] Boolean RestartIfNeeded; | ||
[Write, Description("Specifies if the VM should be Present (created) or Absent (removed). The default value is `Present`."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; | ||
[Write, Description("Notes about the VM.")] String Notes; | ||
[Write, Description("Enable secure boot for Generation 2 VMs.")] Boolean SecureBoot; | ||
[Write, Description("Enable Guest Service Interface for the VM.")] Boolean EnableGuestService; | ||
[Write, Description("Specifies if Secure Boot should be enabled for Generation 2 virtual machines. **Only supports generation 2 virtual machines**. Default value is `$true`.")] Boolean SecureBoot; | ||
[Write, Description("Enable Guest Service Interface for the VM. The default value is `$false`.")] Boolean EnableGuestService; | ||
[Write, Description("Enable AutomaticCheckpoints for the VM.")] Boolean AutomaticCheckpointsEnabled; | ||
[Read, Description("VM unique ID")] String ID; | ||
[Read, Description("Status of the VM")] String Status; | ||
[Read, Description("CPU Usage of the VM")] Uint32 CPUUsage; | ||
[Read, Description("Memory assigned to the VM")] Uint64 MemoryAssigned; | ||
[Read, Description("Uptime of the VM")] String Uptime; | ||
[Read, Description("Creation time of the VM")] DateTime CreationTime; | ||
[Read, Description("Does VM has dynamic memory enabled")] Boolean HasDynamicMemory; | ||
[Read, Description("Network adapters' IP addresses of the VM")] String NetworkAdapters[]; | ||
[Read, Description("Returns the unique ID for the VM.")] String ID; | ||
[Read, Description("Returns the current status of the VM.")] String Status; | ||
[Read, Description("Returns the current CPU usage of the VM.")] Uint32 CPUUsage; | ||
[Read, Description("Returns the current memory assigned to the VM.")] Uint64 MemoryAssigned; | ||
[Read, Description("Returns the uptime of the VM.")] String Uptime; | ||
[Read, Description("Returns the creation time of the VM.")] DateTime CreationTime; | ||
[Read, Description("Returns `$true` if the VM has dynamic memory enabled.")] Boolean HasDynamicMemory; | ||
[Read, Description("Returns the IP addresses of the virtual machine's network adapters.")] String NetworkAdapters[]; | ||
}; |
27 changes: 13 additions & 14 deletions
27
source/DSCResources/DSC_VMNetworkAdapter/DSC_VMNetworkAdapter.schema.mof
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,22 @@ | ||
|
||
[ClassVersion("2.0.0.0")] | ||
Class NetworkSettings | ||
{ | ||
[Write] string IpAddress; | ||
[Write] string Subnet; | ||
[Write] string DefaultGateway; | ||
[Write] string DnsServer; | ||
[Write, Description("IpAddress to give the network adapter. Only used if not Dhcp. Required if not Dhcp.")] string IpAddress; | ||
[Write, Description("Subnet to give the network adapter. Only used if not Dhcp. Required if not Dhcp.")] string Subnet; | ||
[Write, Description("DefaultGateway to give the network adapter. Only used if not Dhcp.")] string DefaultGateway; | ||
[Write, Description("DNS server to give the network adapter. Only used if not Dhcp.")] string DnsServer; | ||
}; | ||
|
||
[ClassVersion("2.0.0.0"), FriendlyName("VMNetworkAdapter")] | ||
class DSC_VMNetworkAdapter : OMI_BaseResource | ||
{ | ||
[Key] String Id; | ||
[Required] String Name; | ||
[Required] String SwitchName; | ||
[Required] String VMName; | ||
[Write] String MacAddress; | ||
[Write, EmbeddedInstance("NetworkSettings")] String NetworkSetting; | ||
[Write] String VlanId; | ||
[Write, ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; | ||
[Read] Boolean DynamicMacAddress; | ||
[Key, Description("Unique string for identifying the resource instance.")] String Id; | ||
[Required, Description("Name of the network adapter as it appears either in the management OS or attached to a VM.")] String Name; | ||
[Required, Description("Virtual Switch name to connect to.")] String SwitchName; | ||
[Required, Description("Name of the VM to attach to. If you want to attach new VM Network adapter to the management OS, set this property to 'ManagementOS'.")] String VMName; | ||
[Write, Description("Use this to specify a Static MAC Address. If this parameter is not specified, dynamic MAC Address will be set.")] String MacAddress; | ||
[Write, Description("Network Settings of the network adapter. If this parameter is not supplied, DHCP will be used."), EmbeddedInstance("NetworkSettings")] String NetworkSetting; | ||
[Write, Description("Use this to specify a Vlan id on the Network Adapter.")] String VlanId; | ||
[Write, Description("Ensures that the VM Network Adapter is Present or Absent. The default value is `Present`."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; | ||
[Read, Description("Returns `$true` if the network adapter uses a dynamic MAC address.")] Boolean DynamicMacAddress; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.