From 6d1e0876e44c9665069cfa5c478e3a00eb79ed2a Mon Sep 17 00:00:00 2001 From: Johan Ljunggren Date: Sun, 12 Jun 2022 13:36:56 +0200 Subject: [PATCH] Move documentation to the HyperVDsc GitHub Wiki (#201) --- .github/PULL_REQUEST_TEMPLATE.md | 7 +- CHANGELOG.md | 1 + README.md | 487 ------------------ .../DSCResources/DSC_VHD/DSC_Vhd.schema.mof | 21 +- .../DSC_VMDvdDrive/DSC_VMDvdDrive.schema.mof | 2 +- .../DSC_VMHardDiskDrive.schema.mof | 10 +- .../DSC_VMHardDiskDrive/README.md | 4 +- .../DSC_VMHost/DSC_VMHost.schema.mof | 12 +- .../DSC_VMHyperV/DSC_VMHyperV.schema.mof | 46 +- .../DSC_VMNetworkAdapter.schema.mof | 27 +- .../DSC_VMNetworkAdapter/README.md | 2 +- .../DSC_VMProcessor.schema.mof | 14 +- .../DSC_VMScsiController.schema.mof | 8 +- .../DSC_VMSwitch/DSC_VMSwitch.schema.mof | 20 +- .../DSC_VhdFileDirectory.schema.mof | 25 +- .../DSC_VhdFileDirectory/README.md | 6 +- 16 files changed, 101 insertions(+), 591 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 8c6462e..9123af5 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -41,10 +41,9 @@ - [ ] Added an entry to the change log under the Unreleased section of the file CHANGELOG.md. Entry should say what was changed and how that affects users (if applicable), and reference the issue being resolved (if applicable). -- [ ] Resource documentation added/updated in README.md. -- [ ] Resource parameter descriptions added/updated in README.md, schema.mof and comment-based - help. -- [ ] Comment-based help added/updated. +- [ ] Resource documentation updated in the resource's README.md. +- [ ] Resource parameter descriptions updated in schema.mof. +- [ ] Comment-based help updated, including parameter descriptions. - [ ] Localization strings added/updated in all localization files as appropriate. - [ ] Examples appropriately added/updated. - [ ] Unit tests added/updated. See [DSC Community Testing Guidelines](https://dsccommunity.org/guidelines/testing-guidelines). diff --git a/CHANGELOG.md b/CHANGELOG.md index 8823ccb..98d6ef9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ For older change log history see the [historic changelog](HISTORIC_CHANGELOG.md) - Updated DSCResources, Examples, Modules and Tests for new naming. - Updated README.md from _xHyper-V_ to _HyperVDsc - Renamed default branch to `main` - Fixes [Issue #198](https://github.com/dsccommunity/HyperVDsc/issues/198). + - Moved documentation to the HyperVDsc GitHub Wiki. ## [3.18.0] - 2022-06-04 diff --git a/README.md b/README.md index 336df93..3dcdaad 100644 --- a/README.md +++ b/README.md @@ -41,490 +41,3 @@ You can review the [Examples](/source/Examples) directory in the HyperVDsc modul for some general use scenarios for all of the resources that are in the module. The resource examples are also available in the [HyperVDsc Wiki](https://github.com/dsccommunity/HyperVDsc/wiki). - -## Resources - -* [**VHD**](#Vhd) manages VHDs in a Hyper-V host. -* [**VhdFile**](#Vhdfile) manages files or directories in a VHD. - You can use it to copy files/folders to the VHD, remove files/folders from a VHD, - and change attributes of a file in a VHD (e.g. change a file attribute to - 'ReadOnly' or 'Hidden'). - This resource is particularly useful when bootstrapping DSC Configurations - into a VM. -* [**VMDvdDrive**](#Vmdvddrive) manages DVD drives attached to a Hyper-V - virtual machine. -* [**VMHardDiskDrive**](#Vmharddiskdrive) manages VHD(X)s attached to a Hyper-V virtual machine. -* [**VMHost**](#Vmhost) manages Hyper-V host settings. -* [**VMHyperV**](#Vmhyperv) manages VMs in a Hyper-V host. -* [**VMNetworkAdapter**](#Vmnetworkadapter) manages VMNetadapters attached to - a Hyper-V virtual machine or the management OS. -* [**VMProcessor**](#Vmprocessor) manages Hyper-V virtual machine processor options. -* [**VMScsiController**](#Vmscsicontroller) manages the SCSI controllers attached to a Hyper-V virtual machine. -* [**VMSwitch**](#Vmswitch) manages virtual switches in a Hyper-V host. - -### VHD - -Manages VHDs in a Hyper-V host. - -#### Requirements for VHD - -* The Hyper-V Role has to be installed on the machine. -* The Hyper-V PowerShell module has to be installed on the machine. - -#### Parameters for VHD - -* **`[String]` Name** _(Key)_: The desired VHD file name. -* **`[String]` Path** _(Key)_: The desired Path where the VHD will be created. -* **`[String]` ParentPath** _(Write)_: Parent VHD file path, for differencing disk. -* **`[Uint64]` MaximumSizeBytes** _(Write)_: Maximum size of VHD to be created. -* **`[String]` Generation** _(Write)_: Virtual disk format. - The default value is Vhd. { *Vhd* | Vhdx }. -* **`[String]` Type** _(Write)_: Virtual disk type. - The default value is Dynamic. { *Dynamic* | Fixed | Differencing }. -* **`[String]` Ensure** _(Write)_: Ensures that the VHD is Present or Absent. - The default value is Present. { *Present* | Absent }. - -#### Read-Only Properties from Get-TargetResource for VHD - -* **`[String]` ID** _(Read)_: Virtual Disk Identifier. -* **`[String]` Type** _(Read)_: Type of Vhd - Dynamic, Fixed, Differencing. -* **`[Uint64]` FileSizeBytes** _(Read)_: Current size of the VHD. -* **`[Boolean]` IsAttached** _(Read)_: Is the VHD attached to a VM or not. - -#### Examples VHD - -* [Create a new VHD](/source/Examples/Sample_Vhd_NewVHD.ps1) -* [Create a new Fixed VHD](/source/Examples/Sample_Vhd_FixedVHD.ps1) -* [Create a differencing VHD](/source/Examples/Sample_Vhd_DiffVHD.ps1) - -### VhdFile - -Manages files or directories in a VHD. - You can use it to copy files/folders to the VHD, remove files/folders from a VHD, - and change attributes of a file in a VHD (e.g. change a file attribute to - 'ReadOnly' or 'Hidden'). - This resource is particularly useful when bootstrapping DSC Configurations - into a VM. - -#### Requirements for VhdFile - -* The Hyper-V Role has to be installed on the machine. -* The Hyper-V PowerShell module has to be installed on the machine. - -#### Parameters for VhdFile - -* **`[String]` VhdPath** _(Key)_: Path to the VHD. -* **`[DSC_FileDirectory[]]` FileDirectory** _(Required)_: The FileDirectory objects - to copy to the VHD (as used in the "File" resource). - Please see the Examples section for more details. -* **`[String]` CheckSum** _(Write)_: Indicates the checksum type to use when determining - whether two files are the same. The default value is ModifiedDate. - { *ModifiedDate* | SHA-1 | SHA-256 | SHA-512 }. - -##### DSC_FileDirectory Class - -* **`[String]` DestinationPath** _(Required)_: Indicates the location where you want - to ensure the state for a file or directory. -* **`[String]` SourcePath** _(Write)_: Indicates the path from which to copy the - file or folder resource. -* **`[String]` Ensure** _(Write)_: Indicates if the file or directory exists. - Set this property to "Absent" to ensure that the file or directory does not exist. - Set it to "Present" to ensure that the file or directory does exist. - { Present | Absent }. -* **`[String]` Type** _(Write)_: Indicates if the resource being configured is a - directory or a file. Set this property to "Directory" to indicate that the resource - is a directory. Set it to "File" to indicate that the resource is a file. - { File | Directory }. -* **`[Boolean]` Recurse** _(Write)_: Indicates if subdirectories are included. - Set this property to $true to indicate that you want subdirectories to be included. -* **`[Boolean]` Force** _(Write)_: Certain file operations (such as overwriting a - file or deleting a directory that is not empty) will result in an error. Using the - Force property overrides such errors. -* **`[String]` Content** _(Write)_: Specifies the contents of a file, such as a - particular string. -* **`[String[]]` Attributes** _(Write)_: Specifies the desired state of the attributes - for the targeted file or directory. { ReadOnly | Hidden | System | Archive }. - -#### Read-Only Properties from Get-TargetResource for VhdFile - -None - -#### Examples VhdFile - -* [Multiple examples](/source/Examples) - -### VMDvdDrive - -Manages DVD drives attached to a Hyper-V virtual machine. - -#### Requirements for VMDvdDrive - -* The Hyper-V Role has to be installed on the machine. -* The Hyper-V PowerShell module has to be installed on the machine. - -#### Parameters for VMDvdDrive - -* **`[String]` VMName** _(Key)_: Specifies the name of the virtual machine - to which the DVD drive is to be added. -* **`[Uint32]` ControllerNumber** _(Key)_: Specifies the number of the controller - to which the DVD drive is to be added. -* **`[Uint32]` ControllerLocation** _(Key)_: Specifies the number of the location - on the controller at which the DVD drive is to be added. -* **`[String]` Path** _(Write)_: Specifies the full path to the virtual hard disk - file or physical hard disk volume for the added DVD drive. -* **`[String]` Ensure** _(Write)_: Specifies if the DVD Drive should exist or not. - The default value is Present. { *Present* | Absent }. - -#### Read-Only Properties from Get-TargetResource for VMDvdDrive - -None - -#### Examples VMDvdDrive - -* [Create a VM, given a VHDX and add a DVD Drives](/source/Examples/Sample_VMHyperV_SimpleWithDVDDrive.ps1) - -### VMHardDiskDrive - -Manages VHD(X)s attached to a Hyper-V virtual machine. -When ControllerNumber or ControllerLocation is not provided, the same logic as - Set-VMHardDiskDrive cmdlet is used. - -#### Requirements for VMHardDiskDrive - -* The Hyper-V Role has to be installed on the machine. -* The Hyper-V PowerShell module has to be installed on the machine. - -#### Parameters for VMHardDiskDrive - -* **`[String]` VMName** _(Key)_: Specifies the name of the virtual machine - whose hard disk drive is to be manipulated. -* **`[String]` VhdPath** _(Key)_: Specifies the full path of the VHD file to be - manipulated. -* **`[String]` ControllerType** _(Write)_: Specifies the type of controller to which - the hard disk drive is to be set. The default value is SCSI. { *SCSI* | IDE }. -* **`[Uint32]` ControllerNumber** _(Write)_: Specifies the number of the controller - to which the hard disk drive is to be set. - For IDE: { 0, 1 }, for SCSI: { 0 | 1 | 2 | 3 }. - Defaults to 0. -* **`[Uint32]` ControllerLocation** _(Write)_: Specifies the number of the location - on the controller at which the hard disk drive is to be set. - For IDE: { 0 | 1 }, for SCSI: { 0 .. 63 }. - Defaults to 0. -* **`[String]` Ensure** _(Write)_: Specifies if the hard disk drive should exist or - not. The default value is Present. { *Present* | Absent }. - -#### Read-Only Properties from Get-TargetResource for VMHardDiskDrive - -None - -#### Examples VMHardDiskDrive - -* [Create a VM, with an OS drive and an additional data drive](/source/Examples/Sample_VMHardDiskDrive_VMWithExtraDisk.ps1) -* [Create a VM, with an OS drive and 4 data drives](/source/Examples/Sample_VMHardDiskDrive_VMWith4AdditionalDisks.ps1) - -### VMHost - -Manages Hyper-V host settings. - -#### Requirements for VMHost - -* The Hyper-V Role has to be installed on the machine. -* The Hyper-V PowerShell module has to be installed on the machine. - -#### Parameters for VMHost - -* **`[String]` IsSingleInstance** _(Key)_: Specifies the resource is a single instance, - the value must be 'Yes'. { *Yes* }. -* **`[Boolean]` EnableEnhancedSessionMode** _(Write)_: Indicates whether users - can use enhanced mode when they connect to virtual machines on this server - by using Virtual Machine Connection. -* **`[String]` FibreChannelWwnn** _(Write)_: Specifies the default value of - the World Wide Node Name on the Hyper-V host. -* **`[String]` FibreChannelWwpnMaximum** _(Write)_: Specifies the maximum value - that can be used to generate World Wide Port Names on the Hyper-V host. - Use with the FibreChannelWwpnMinimum parameter to establish a range of WWPNs - that the specified Hyper-V host can assign to virtual Fibre Channel adapters. -* **`[String]` FibreChannelWwpnMinimum** _(Write)_: Specifies the minimum value - that can be used to generate the World Wide Port Names on the Hyper-V host. - Use with the FibreChannelWwpnMaximum parameter to establish a range of WWPNs - that the specified Hyper-V host can assign to virtual Fibre Channel adapters. -* **`[String]` MacAddressMaximum** _(Write)_: Specifies the maximum MAC address - using a valid hexadecimal value. Use with the MacAddressMinimum parameter - to establish a range of MAC addresses that the specified Hyper-V host can assign - to virtual machines configured to receive dynamic MAC addresses. -* **`[String]` MacAddressMinimum** _(Write)_: Specifies the minimum MAC address - using a valid hexadecimal value. Use with the MacAddressMaximum parameter to - establish a range of MAC addresses that the specified Hyper-V host can assign - to virtual machines configured to receive dynamic MAC addresses. -* **`[Uint32]` MaximumStorageMigrations** _(Write)_: Specifies the maximum number - of storage migrations that can be performed at the same time on the Hyper-V host. -* **`[Uint32]` MaximumVirtualMachineMigrations** _(Write)_: Specifies the maximum - number of live migrations that can be performed at the same time - on the Hyper-V host. -* **`[Boolean]` NumaSpanningEnabled** _(Write)_: Specifies whether virtual machines - on the Hyper-V host can use resources from more than one NUMA node. -* **`[Uint32]` ResourceMeteringSaveIntervalMinute** _(Write)_: Specifies how often - the Hyper-V host saves the data that tracks resource usage. The range is a minimum - of 60 minutes to a maximum 1440 minutes (24 hours). -* **`[Boolean]` UseAnyNetworkForMigration** _(Write)_: Specifies how networks are - selected for incoming live migration traffic. If set to $True, any available network - on the host can be used for this traffic. If set to $False, incoming live migration - traffic is transmitted only on the networks specified in the MigrationNetworks - property of the host. -* **`[String]` VirtualHardDiskPath** _(Write)_: Specifies the default folder to - store virtual hard disks on the Hyper-V host. -* **`[String]` VirtualMachineMigrationAuthenticationType** _(Write)_: Specifies the - type of authentication to be used for live migrations. { Kerberos | CredSSP }. -* **`[String]` VirtualMachineMigrationPerformanceOption** _(Write)_: Specifies the - performance option to use for live migration. { TCPIP | Compression | SMB }. -* **`[String]` VirtualMachinePath** _(Write)_: Specifies the default folder - to store virtual machine configuration files on the Hyper-V host. -* **`[Boolean]` VirtualMachineMigrationEnabled** _(Write)_: Indicates whether Live - Migration should be enabled or disabled on the Hyper-V host. - -#### Read-Only Properties from Get-TargetResource for VMHost - -None - -#### Examples VMHost - -* [Change VM Host paths](/source/Examples/Sample_VMHost_Paths.ps1) - -### VMHyperV - -Manages VMs in a Hyper-V host. - -The following properties **cannot** be changed after VM creation: - -* VhdPath -* Path -* Generation - -#### Requirements for VMHyperV - -* The Hyper-V Role has to be installed on the machine. -* The Hyper-V PowerShell module has to be installed on the machine. - -#### Parameters for VMHyperV - -* **`[String]` Name** _(Key)_: The desired VM name. -* **`[String]` VhdPath** _(Required)_: The desired VHD associated with the VM. -* **`[String[]]` SwitchName** _(Write)_: Virtual switch(es) associated with the VM. - Multiple NICs can now be assigned. -* **`[String]` State** _(Write)_: State of the VM: { Running | Paused | Off }. -* **`[String]` Path** _(Write)_: Folder where the VM data will be stored. -* **`[Uint32]` Generation** _(Write)_: Virtual machine generation. - Generation 2 virtual machines __only__ support VHDX files. - The default value is 1. { *1* | 2 }. -* **`[Boolean]` SecureBoot** _(Write)_: Enables or disables secure boot - __only on generation 2 virtual machines__. - The default value is $true. -* **`[Uint64]` StartupMemory** _(Write)_: Startup RAM for the VM. - If neither MinimumMemory nor MaximumMemory is specified, dynamic memory will be disabled. -* **`[Uint64]` MinimumMemory** _(Write)_: Minimum RAM for the VM. - Setting this property enables dynamic memory. Exception: - If MinimumMemory, MaximumMemory and StartupMemory is equal, dynamic memory will be disabled. -* **`[Uint64]` MaximumMemory** _(Write)_: Maximum RAM for the VM. - Setting this property enables dynamic memory. Exception: - If MinimumMemory, MaximumMemory and StartupMemory is equal, dynamic memory will be disabled. -* **`[String[]]` MACAddress** _(Write)_: MAC address(es) of the VM. - Multiple MAC addresses can now be assigned. -* **`[Uint32]` ProcessorCount** _(Write)_: Processor count for the VM. -* **`[Boolean]` WaitForIP** _(Write)_: If specified, waits for the VM to get - valid IP address. -* **`[Boolean]` RestartIfNeeded** _(Write)_: If specified, will shutdown and - restart the VM as needed for property changes. -* **`[String]` Ensure** _(Write)_: Ensures that the VM is Present or Absent. - The default value is Present. { *Present* | Absent }. -* **`[String]` Notes** _(Write)_: Notes about the VM. -* **`[Boolean]` EnableGuestService** _(Write)_: Enable Guest Service Interface - for the VM. The default value is $false. - -#### Read-Only Properties from Get-TargetResource for VMHyperV - -* **`[String]` ID** _(Read)_: VM unique ID. -* **`[String]` Status** _(Read)_: Status of the VM. -* **`[Uint32]` CPUUsage** _(Read)_: CPU Usage of the VM. -* **`[Uint64]` MemoryAssigned** _(Read)_: Memory assigned to the VM. -* **`[String]` Uptime** _(Read)_: Uptime of the VM. -* **`[DateTime]` CreationTime** _(Read)_: Creation time of the VM. -* **`[Boolean]` HasDynamicMemory** _(Read)_: Does VM has dynamic memory enabled. -* **`[String[]]` NetworkAdapters** _(Read)_: Network adapters' IP addresses of - the VM". - -#### Examples VMHyperV - -* [Create a VM (Simple)](/source/Examples/Sample_VMHyperV_Simple.ps1) -* [Create a VM with dynamic memory](/source/Examples/Sample_VMHyperV_DynamicMemory.ps1) -* [Create a VM (Complete)](/source/Examples/Sample_VMHyperV_Complete.ps1) -* [Create a VM with multiple NICs attached to multiple switches](/source/Examples/Sample_VMHyperV_MultipleNICs.ps1) - -### VMNetworkAdapter - -Manages VMNetadapters attached to a Hyper-V virtual machine or the management OS. - -#### Requirements for VMNetworkAdapter - -* The Hyper-V Role has to be installed on the machine. -* The Hyper-V PowerShell module has to be installed on the machine. - -#### Parameters for VMNetworkAdapter - -* **`[String]` Id** _(Key)_: Unique string for identifying the resource instance. -* **`[String]` Name** _(Required)_: Name of the network adapter as it appears either - in the management OS or attached to a VM. -* **`[String]` SwitchName** _(Required)_: Virtual Switch name to connect to. -* **`[String]` VMName** _(Required)_: Name of the VM to attach to. - If you want to attach new VM Network adapter to the management OS, - set this property to 'Management OS'. -* **`[NetworkSettings]` NetworkSetting** _(Write)_: Network Settings of the network adapter. - If this parameter is not supplied, DHCP will be used. -* **`[String]` MacAddress** _(Write)_: Use this to specify a Static MAC Address. - If this parameter is not specified, dynamic MAC Address will be set. -* **`[String]` VlanId** _(Write)_: Use this to specify a Vlan id on the -* Network Adapter. -* **`[String]` Ensure** _(Write)_: Ensures that the VM Network Adapter is - Present or Absent. The default value is Present. { *Present* | Absent }. - -##### NetworkSettings Class - -* **`[String]` IpAddress** _(Write)_: IpAddress to give the network adapter. - Only used if not Dhcp. Required if not Dhcp. -* **`[String]` Subnet** _(Write)_: Subnet to give the network adapter. - Only used if not Dhcp. Required if not Dhcp. -* **`[String]` DefaultGateway** _(Write)_: DefaultGateway to give the network adapter. - Only used if not Dhcp. -* **`[String]` DnsServer** _(Write)_: DNSServer to give the network adapter. - Only used if not Dhcp. - -#### Read-Only Properties from Get-TargetResource for VMNetworkAdapter - -* **`[Boolean]` DynamicMacAddress** _(Read)_: Does the VMNetworkAdapter use a - Dynamic MAC Address. - -#### Examples VMNetworkAdapter - -* [Add a new VM Network adapter in the management OS](/source/Examples/Sample_VMNetworkAdapter_ManagementOS.ps1) -* [Add multiple VM Network adapters to a VM](/source/Examples/Sample_VMNetworkAdapter_MultipleVM.ps1) -* [Add a couple of VM Network adapters in the management OS](/source/Examples/Sample_VMNetworkAdapter_MultipleManagementOS.ps1) -* [Add multiple VM Network adapters to a VM using status MAC addresses](/source/Examples/Sample_VMNetworkAdapter_MultipleVMMACAddress.ps1) -* [Add VM Network adapters to a VM with a Vlan tag](/source/Examples/Sample_VMNetworkAdapter_VMVlanTagging.ps1) -* [Add VM Network adapters to a VM with a static IpAddress](/source/Examples/Sample_VMNetworkAdapter_VMStaticNetworkSettings.ps1) - -### VMProcessor - -Manages Hyper-V virtual machine processor options. - -#### Requirements for VMProcessor - -* The Hyper-V Role has to be installed on the machine. -* The Hyper-V PowerShell module has to be installed on the machine. - -#### Parameters for VMProcessor - -* **`[String]` VMName** _(Key)_: Specifies the name of the virtual machine - on which the processor is to be configured. -* **`[Boolean]` EnableHostResourceProtection** _(Write)_: Specifies whether to - enable host resource protection. NOTE: Only supported on Windows 10 and Server 2016. -* **`[Boolean]` ExposeVirtualizationExtensions** _(Write)_: Specifies whether - nested virtualization is enabled. NOTE: Only supported on - Windows 10 and Server 2016. -* **`[Uint64]` HwThreadCountPerCore** _(Write)_: Specifies the maximum thread core - per processor core. NOTE: Only supported on Windows 10 and Server 2016. -* **`[Uint64]` Maximum** _(Write)_: Specifies the maximum percentage of resources - available to the virtual machine processor to be configured. - Allowed values range from 0 to 100. -* **`[Uint32]` MaximumCountPerNumaNode** _(Write)_: Specifies the maximum number - of processors per NUMA node to be configured for the virtual machine. -* **`[Uint32]` MaximumCountPerNumaSocket** _(Write)_: Specifies the maximum number - of sockets per NUMA node to be configured for the virtual machine. -* **`[Unit32]` RelativeWeight** _(Write)_: 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. -* **`[Uint64]` Reserve** _(Write)_: Specifies the percentage of processor resources - to be reserved for this virtual machine. Allowed values range from 0 to 100. -* **`[String]` ResourcePoolName** _(Write)_: Specifies the name of the processor - resource pool to be used. -* **`[Boolean]` CompatibilityForMigrationEnabled** _(Write)_: Specifies whether - the virtual processors features are to be limited for compatibility when migrating - the virtual machine to another host. -* **`[Boolean]` CompatibilityForOlderOperatingSystemsEnabled** _(Write)_: Specifies - whether the virtual processor’s features are to be limited for compatibility - with older operating systems. -* **`[Boolean]` RestartIfNeeded** _(Write)_: If specified, shutdowns and restarts - the VM if needed for property changes. - -#### Read-Only Properties from Get-TargetResource for VMProcessor - -None - -#### Examples VMProcessor - -* [Create a secure boot gen 2 VM for a given VHD with nested virtualisation enabled](/source/Examples/Sample_VMHyperV_SimpleWithNestedVirtualization.ps1) - -### VMScsiController - -Manages the SCSI controllers attached to a Hyper-V virtual machine. -When removing a controller, all the disks still connected to the controller will be detached. - -#### Requirements for VMScsiController - -* The Hyper-V Role has to be installed on the machine. -* The Hyper-V PowerShell module has to be installed on the machine. - -#### Parameters for VMScsiController - -* **`[String]` VMName** _(Key)_: Specifies the name of the virtual machine whose SCSI - controller is to be manipulated. -* **`[Uint32]` ControllerNumber** _(Key)_: Specifies the number of the controller to - be set: { 0 | 1 | 2 | 3 }. -* **`[String]` Ensure** _(Write)_: Specifies if the SCSI controller should exist or - not. The default value is Present. { *Present* | Absent }. - -#### Read-Only Properties from Get-TargetResource for VMScsiController - -None - -#### Examples VMScsiController - -* [Add a secondary SCSI controller](/source/Examples/Sample_VMScsiController_AddControllers.ps1) - -### VMSwitch - -Manages virtual switches in a Hyper-V host. - -#### Requirements for VMSwitch - -* The Hyper-V Role has to be installed on the machine. -* The Hyper-V PowerShell module has to be installed on the machine. - -#### Parameters for VMSwitch - -* **`[String]` Name** _(Key)_: The desired VM Switch name. -* **`[String]` Type** _(Key)_: The desired type of switch. - { External | Internal | Private } -* **`[String[]]` NetAdapterName** _(Write)_: Network adapter name(s) - for external switch type. -* **`[Boolean]` AllowManagementOS** _(Write)_: Specify if the VM host - has access to the physical NIC. The default value is $false. -* **`[Boolean]` EnableEmbeddedTeaming** _(Write)_: Should embedded NIC teaming - be used (Windows Server 2016 only). The default value is $false. -* **`[String]` BandwidthReservationMode** _(Write)_: Specify the QoS mode used - (options other than NA are only supported on Hyper-V 2012+). - The default value is NA. { Default | Weight | Absolute | None | *NA* }. -* **`[String]` LoadBalancingAlgorithm** _(Write)_: Specify the Load Balancing algorithm which should be used for the embedded NIC teaming. - { Dynamic | HyperVPort }. -* **`[Boolean]` Id** _(Write)_: Specify the desired Unique ID of the Hyper-V switch. If not specified the ID will be generated by the system every time the Hyper-V Switch is created. (Windows Server 2016 only) -* **`[String]` Ensure** _(Write)_: Ensures that the VM Switch is Present or Absent. - The default value is Present. { *Present* | Absent }. - -#### Read-Only Properties from Get-TargetResource for VMSwitch - -* **`[String]` NetAdapterInterfaceDescription** _(Read)_: Description of the - network interface. - -#### Examples VMSwitch - -* [Create an internal VM Switch](/source/Examples/Sample_VMSwitch_Internal.ps1) -* [Create an external VM Switch](/source/Examples/Sample_VMSwitch_External.ps1) -* [Create an external VM Switch with embedded teaming](/source/Examples/Sample_VMSwitch_ExternalSET.ps1) diff --git a/source/DSCResources/DSC_VHD/DSC_Vhd.schema.mof b/source/DSCResources/DSC_VHD/DSC_Vhd.schema.mof index b01c195..86ec522 100644 --- a/source/DSCResources/DSC_VHD/DSC_Vhd.schema.mof +++ b/source/DSCResources/DSC_VHD/DSC_Vhd.schema.mof @@ -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; }; - diff --git a/source/DSCResources/DSC_VMDvdDrive/DSC_VMDvdDrive.schema.mof b/source/DSCResources/DSC_VMDvdDrive/DSC_VMDvdDrive.schema.mof index 3a7876f..0353064 100644 --- a/source/DSCResources/DSC_VMDvdDrive/DSC_VMDvdDrive.schema.mof +++ b/source/DSCResources/DSC_VMDvdDrive/DSC_VMDvdDrive.schema.mof @@ -5,5 +5,5 @@ class DSC_VMDvdDrive : OMI_BaseResource [Key, Description("Specifies the number of the controller to which the DVD drive is to be added.")] Uint32 ControllerNumber; [Key, Description("Specifies the number of the location on the controller at which the DVD drive is to be added.")] Uint32 ControllerLocation; [Write, Description("Specifies the full path to the virtual hard disk file or physical hard disk volume for the added DVD drive.")] String Path; - [Write, Description("Specifies if the DVD Drive should exist or not."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; + [Write, Description("Specifies if the DVD Drive should exist or not. The default value is `Present`."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; }; diff --git a/source/DSCResources/DSC_VMHardDiskDrive/DSC_VMHardDiskDrive.schema.mof b/source/DSCResources/DSC_VMHardDiskDrive/DSC_VMHardDiskDrive.schema.mof index 6d8c6af..5442cf6 100644 --- a/source/DSCResources/DSC_VMHardDiskDrive/DSC_VMHardDiskDrive.schema.mof +++ b/source/DSCResources/DSC_VMHardDiskDrive/DSC_VMHardDiskDrive.schema.mof @@ -2,9 +2,9 @@ class DSC_VMHardDiskDrive : OMI_BaseResource { [Key, Description("Specifies the name of the virtual machine whose hard disk drive is to be manipulated.")] String VMName; - [Key, Description("Specifies the full path to the location of the VHD that represents the hard disk drive.")] String Path; - [Write, Description("Specifies the controller type - IDE/SCSI where the disk is attached. If not specified, it defaults to SCSI."), ValueMap{"IDE","SCSI"}, Values{"IDE","SCSI"}] String ControllerType; - [Write, Description("Specifies the number of the controller where the disk is attached. If not specified, it defaults to 0."), ValueMap{"0","1","2","3"}, Values{"0","1","2","3"}] Uint32 ControllerNumber; - [Write, Description("Specifies the number of the location on the controller where the disk is attached. If not specified, it defaults to 0.")] Uint32 ControllerLocation; - [Write, Description("Specifies if the hard disk drive must be present or absent. If not specified, it defaults to Present."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; + [Key, Description("Specifies the full path of the VHD file to be manipulated.")] String Path; + [Write, Description("Specifies the type of controller (IDE/SCSI) to which the hard disk drive is to be set. If not specified, it defaults to `SCSI`."), ValueMap{"IDE","SCSI"}, Values{"IDE","SCSI"}] String ControllerType; + [Write, Description("Specifies the number of the controller to which the hard disk drive is to be set. For IDE the possible values are `0` or `1`, for SCSI the possible values are `0`, `1`, `2`, or `3`. If not specified, it defaults to `0`."), ValueMap{"0","1","2","3"}, Values{"0","1","2","3"}] Uint32 ControllerNumber; + [Write, Description("Specifies the number of the location on the controller at which the hard disk drive is to be set. Possible values for IDE are `0` or `1`, and for SCSI the possible values are between `0` to `63`. If not specified, it defaults to `0`.")] Uint32 ControllerLocation; + [Write, Description("Specifies if the hard disk drive must be present (exist) or absent (not exist). If not specified, it defaults to `Present`."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; }; diff --git a/source/DSCResources/DSC_VMHardDiskDrive/README.md b/source/DSCResources/DSC_VMHardDiskDrive/README.md index 9ca45a7..276e3db 100644 --- a/source/DSCResources/DSC_VMHardDiskDrive/README.md +++ b/source/DSCResources/DSC_VMHardDiskDrive/README.md @@ -2,8 +2,8 @@ Manages VHD(X)s attached to a Hyper-V virtual machine. -When ControllerNumber or ControllerLocation is not provided, the same logic -as Set-VMHardDiskDrive cmdlet is used. +When parameter `ControllerNumber` or `ControllerLocation` is not provided, +the same logic as `Set-VMHardDiskDrive` command is used. ## Requirements diff --git a/source/DSCResources/DSC_VMHost/DSC_VMHost.schema.mof b/source/DSCResources/DSC_VMHost/DSC_VMHost.schema.mof index 6a91db3..a8a0088 100644 --- a/source/DSCResources/DSC_VMHost/DSC_VMHost.schema.mof +++ b/source/DSCResources/DSC_VMHost/DSC_VMHost.schema.mof @@ -4,15 +4,15 @@ class DSC_VMHost : OMI_BaseResource [Key, Description("Specifies the resource is a single instance, the value must be 'Yes'."), ValueMap{"Yes"}, Values{"Yes"}] String IsSingleInstance; [Write, Description("Indicates whether users can use enhanced mode when they connect to virtual machines on this server by using Virtual Machine Connection.")] Boolean EnableEnhancedSessionMode; [Write, Description("Specifies the default value of the World Wide Node Name on the Hyper-V host.")] String FibreChannelWwnn; - [Write, Description("Specifies the maximum value that can be used to generate World Wide Port Names on the Hyper-V host.")] String FibreChannelWwpnMaximum; - [Write, Description("Specifies the minimum value that can be used to generate the World Wide Port Names on the Hyper-V host.")] String FibreChannelWwpnMinimum; - [Write, Description("Specifies the maximum MAC address using a valid hexadecimal value.")] String MacAddressMaximum; - [Write, Description("Specifies the minimum MAC address using a valid hexadecimal value.")] String MacAddressMinimum; + [Write, Description("Specifies the maximum value that can be used to generate the World Wide Port Names on the Hyper-V host. Use with the FibreChannelWwpnMinimum parameter to establish a range of WWPNs that the specified Hyper-V host can assign to virtual Fibre Channel adapters.")] String FibreChannelWwpnMaximum; + [Write, Description("Specifies the minimum value that can be used to generate the World Wide Port Names on the Hyper-V host. Use with the FibreChannelWwpnMaximum parameter to establish a range of WWPNs that the specified Hyper-V host can assign to virtual Fibre Channel adapters.")] String FibreChannelWwpnMinimum; + [Write, Description("Specifies the maximum MAC address using a valid hexadecimal value. Use with the MacAddressMinimum parameter to establish a range of MAC addresses that the specified Hyper-V host can assign to virtual machines configured to receive dynamic MAC addresses.")] String MacAddressMaximum; + [Write, Description("Specifies the minimum MAC address using a valid hexadecimal value. Use with the MacAddressMaximum parameter to establish a range of MAC addresses that the specified Hyper-V host can assign to virtual machines configured to receive dynamic MAC addresses.")] String MacAddressMinimum; [Write, Description("Specifies the maximum number of storage migrations that can be performed at the same time on the Hyper-V host.")] Uint32 MaximumStorageMigrations; [Write, Description("Specifies the maximum number of live migrations that can be performed at the same time on the Hyper-V host.")] Uint32 MaximumVirtualMachineMigrations; [Write, Description("Specifies whether virtual machines on the Hyper-V host can use resources from more than one NUMA node.")] Boolean NumaSpanningEnabled; - [Write, Description("Specifies how often the Hyper-V host saves the data that tracks resource usage. The range is a minimum of 60 minutes to a maximum of 1440 (24 hours).")] Uint32 ResourceMeteringSaveIntervalMinute; - [Write, Description("Specifies how networks are selected for incoming live migration traffic.")] Boolean UseAnyNetworkForMigration; + [Write, Description("Specifies how often the Hyper-V host saves the data that tracks resource usage. The range is a minimum of 60 minutes to a maximum of 1440 minutes (24 hours).")] Uint32 ResourceMeteringSaveIntervalMinute; + [Write, Description("Specifies how networks are selected for incoming live migration traffic. If set to `$true`, any available network on the host can be used for this traffic. If set to `$false`, incoming live migration traffic is transmitted only on the networks specified in the MigrationNetworks property of the host.")] Boolean UseAnyNetworkForMigration; [Write, Description("Specifies the default folder to store virtual hard disks on the Hyper-V host.")] String VirtualHardDiskPath; [Write, Description("Specifies the type of authentication to be used for live migrations. The acceptable values for this parameter are 'Kerberos' and 'CredSSP'."), ValueMap{"CredSSP","Kerberos"}, Values{"CredSSP","Kerberos"}] String VirtualMachineMigrationAuthenticationType; [Write, Description("Specifies the performance option to use for live migration. The acceptable values for this parameter are 'TCPIP', 'Compression' and 'SMB'."), ValueMap{"TCPIP","Compression","SMB"}, Values{"TCPIP","Compression","SMB"}] String VirtualMachineMigrationPerformanceOption; diff --git a/source/DSCResources/DSC_VMHyperV/DSC_VMHyperV.schema.mof b/source/DSCResources/DSC_VMHyperV/DSC_VMHyperV.schema.mof index d1dedbc..8416488 100644 --- a/source/DSCResources/DSC_VMHyperV/DSC_VMHyperV.schema.mof +++ b/source/DSCResources/DSC_VMHyperV/DSC_VMHyperV.schema.mof @@ -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[]; }; diff --git a/source/DSCResources/DSC_VMNetworkAdapter/DSC_VMNetworkAdapter.schema.mof b/source/DSCResources/DSC_VMNetworkAdapter/DSC_VMNetworkAdapter.schema.mof index 4e0d731..fcc010c 100644 --- a/source/DSCResources/DSC_VMNetworkAdapter/DSC_VMNetworkAdapter.schema.mof +++ b/source/DSCResources/DSC_VMNetworkAdapter/DSC_VMNetworkAdapter.schema.mof @@ -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; }; diff --git a/source/DSCResources/DSC_VMNetworkAdapter/README.md b/source/DSCResources/DSC_VMNetworkAdapter/README.md index d741285..0ddd758 100644 --- a/source/DSCResources/DSC_VMNetworkAdapter/README.md +++ b/source/DSCResources/DSC_VMNetworkAdapter/README.md @@ -1,6 +1,6 @@ # Description -Manages VM net adapters attached to a Hyper-V virtual machine or the +Manages VM network adapters attached to a Hyper-V virtual machine or the management OS. ## Requirements diff --git a/source/DSCResources/DSC_VMProcessor/DSC_VMProcessor.schema.mof b/source/DSCResources/DSC_VMProcessor/DSC_VMProcessor.schema.mof index ce3b97e..0f5a3ed 100644 --- a/source/DSCResources/DSC_VMProcessor/DSC_VMProcessor.schema.mof +++ b/source/DSCResources/DSC_VMProcessor/DSC_VMProcessor.schema.mof @@ -2,16 +2,16 @@ class DSC_VMProcessor : OMI_BaseResource { [Key, Description("Specifies the name of the virtual machine on which the processor is to be configured.")] String VMName; - [Write, Description("Specifies whether to enable host resource protection.")] Boolean EnableHostResourceProtection; - [Write, Description("Specifies whether nested virtualization is enabled.")] Boolean ExposeVirtualizationExtensions; - [Write, Description("Specifies the maximum thread core per processor core.")] Uint64 HwThreadCountPerCore; - [Write, Description("Specifies the maximum percentage of resources available to the virtual machine processor to be configured. Allowed values range from 0 to 100.")] Uint64 Maximum; + [Write, Description("Specifies whether to enable host resource protection. **NOTE:** Only supported on Windows 10 and Server 2016 or higher.")] Boolean EnableHostResourceProtection; + [Write, Description("Specifies whether nested virtualization is enabled. **NOTE:** Only supported on Windows 10 and Server 2016 or higher.")] Boolean ExposeVirtualizationExtensions; + [Write, Description("Specifies the maximum thread core per processor core. **NOTE:** Only supported on Windows 10 and Server 2016 or higher.")] Uint64 HwThreadCountPerCore; + [Write, Description("Specifies the maximum percentage of resources available to the virtual machine processor to be configured. Allowed values range from `0` to `100`.")] Uint64 Maximum; [Write, Description("Specifies the maximum number of processors per NUMA node to be configured for the virtual machine.")] Uint32 MaximumCountPerNumaNode; [Write, Description("Specifies the maximum number of sockets per NUMA node to be configured for the virtual machine.")] Uint32 MaximumCountPerNumaSocket; - [Write, Description("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.")] Uint32 RelativeWeight; - [Write, Description("Specifies the percentage of processor resources to be reserved for this virtual machine. Allowed values range from 0 to 100.")] Uint64 Reserve; + [Write, Description("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`.")] Uint32 RelativeWeight; + [Write, Description("Specifies the percentage of processor resources to be reserved for this virtual machine. Allowed values range from `0` to `100`.")] Uint64 Reserve; [Write, Description("Specifies the name of the processor resource pool to be used.")] String ResourcePoolName; [Write, Description("Specifies whether the virtual processors features are to be limited for compatibility when migrating the virtual machine to another host.")] Boolean CompatibilityForMigrationEnabled; [Write, Description("Specifies whether the virtual processor’s features are to be limited for compatibility with older operating systems.")] Boolean CompatibilityForOlderOperatingSystemsEnabled; - [Write, Description("If specified, shutdowns and restarts the VM if needed for property changes.")] Boolean RestartIfNeeded; + [Write, Description("If set to `$true` then shutdowns and restarts are allowed for the VM when needed for property changes.")] Boolean RestartIfNeeded; }; diff --git a/source/DSCResources/DSC_VMScsiController/DSC_VMScsiController.schema.mof b/source/DSCResources/DSC_VMScsiController/DSC_VMScsiController.schema.mof index e299038..0146dc8 100644 --- a/source/DSCResources/DSC_VMScsiController/DSC_VMScsiController.schema.mof +++ b/source/DSCResources/DSC_VMScsiController/DSC_VMScsiController.schema.mof @@ -1,8 +1,8 @@ [ClassVersion("1.0.0"), FriendlyName("VMScsiController")] class DSC_VMScsiController : OMI_BaseResource { - [Key, Description("Specifies the name of the virtual machine whose SCSI controller status is to be controlled")] String VMName; - [Key, Description("Specifies the number of the SCSI controller whose status is to be controlled. If not specified, it defaults to 0."), ValueMap{"0","1","2","3"}, Values{"0","1","2","3"}] Uint32 ControllerNumber; - [Write, Description("Specifies if the SCSI controller should exist or not. If not specified, it defaults to Present."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Write, Description("Specifies if the VM should be restarted if needed for property changes. If not specified, it defaults to False.")] Boolean RestartIfNeeded; + [Key, Description("Specifies the name of the virtual machine whose SCSI controller is to be manipulated.")] String VMName; + [Key, Description("Specifies the number of the SCSI controller to be set. If not specified, it defaults to 0."), ValueMap{"0","1","2","3"}, Values{"0","1","2","3"}] Uint32 ControllerNumber; + [Write, Description("Specifies if the SCSI controller should exist or not. If not specified, it defaults to `Present`."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; + [Write, Description("If set to `$true` then shutdowns and restarts are allowed for the VM when needed for property changes. If not specified, it defaults to `$false`.")] Boolean RestartIfNeeded; }; diff --git a/source/DSCResources/DSC_VMSwitch/DSC_VMSwitch.schema.mof b/source/DSCResources/DSC_VMSwitch/DSC_VMSwitch.schema.mof index cc8cf81..74630d9 100644 --- a/source/DSCResources/DSC_VMSwitch/DSC_VMSwitch.schema.mof +++ b/source/DSCResources/DSC_VMSwitch/DSC_VMSwitch.schema.mof @@ -1,14 +1,14 @@ [ClassVersion("1.0.0.0"), FriendlyName("VMSwitch")] class DSC_VMSwitch : OMI_BaseResource { - [Key, Description("Name of the VM Switch")] String Name; - [Key, Description("Type of switch"), ValueMap{"External","Internal","Private"}, Values{"External","Internal","Private"}] String Type; - [Write, Description("Network adapter name(s) for external switch type")] String NetAdapterName[]; - [Write, Description("Specify if the VM host has access to the physical NIC")] Boolean AllowManagementOS; - [Write, Description("Should embedded NIC teaming be used (Windows Server 2016 only)")] Boolean EnableEmbeddedTeaming; - [Write, Description("Type of Bandwidth Reservation Mode to use for the switch"), ValueMap{"Default","Weight","Absolute","None","NA"}, Values{"Default","Weight","Absolute","None","NA"}] String BandwidthReservationMode; - [Write, Description("Specifies the load balancing algorithm that this switch team uses"), ValueMap{"Dynamic","HyperVPort"}, Values{"Dynamic","HyperVPort"}] String LoadBalancingAlgorithm; - [Write, Description("Whether switch should be present or absent"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Write, Description("Unique ID for the switch (Only settable on Windows Server 2016!)")] String Id; - [Read, Description("Description of the network interface")] String NetAdapterInterfaceDescription; + [Key, Description("The desired VM Switch name.")] String Name; + [Key, Description("The desired type of switch."), ValueMap{"External","Internal","Private"}, Values{"External","Internal","Private"}] String Type; + [Write, Description("Network adapter name(s) for external switch type.")] String NetAdapterName[]; + [Write, Description("Specify if the VM host has access to the physical NIC. The default value is `$false`.")] Boolean AllowManagementOS; + [Write, Description("Should embedded NIC teaming be used (Windows Server 2016 or higher only). The default value is `$false`.")] Boolean EnableEmbeddedTeaming; + [Write, Description("Specify the QoS mode used (options other than NA are only supported on Hyper-V 2012 or higher). The default value is `NA`."), ValueMap{"Default","Weight","Absolute","None","NA"}, Values{"Default","Weight","Absolute","None","NA"}] String BandwidthReservationMode; + [Write, Description("Specify the Load Balancing algorithm which should be used for the embedded NIC teaming."), ValueMap{"Dynamic","HyperVPort"}, Values{"Dynamic","HyperVPort"}] String LoadBalancingAlgorithm; + [Write, Description("Ensures that the VM Switch is Present or Absent. The default value is `Present`."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; + [Write, Description("Specify the desired Unique ID of the Hyper-V switch. If not specified the ID will be generated by the system every time the Hyper-V Switch is created. (Windows Server 2016 or higher only)")] String Id; + [Read, Description("Returns the description of the network interface.")] String NetAdapterInterfaceDescription; }; diff --git a/source/DSCResources/DSC_VhdFileDirectory/DSC_VhdFileDirectory.schema.mof b/source/DSCResources/DSC_VhdFileDirectory/DSC_VhdFileDirectory.schema.mof index 0a994f0..0186aa0 100644 --- a/source/DSCResources/DSC_VhdFileDirectory/DSC_VhdFileDirectory.schema.mof +++ b/source/DSCResources/DSC_VhdFileDirectory/DSC_VhdFileDirectory.schema.mof @@ -2,23 +2,20 @@ [ClassVersion("1.0.0.0")] Class DSC_FileDirectory { - [Required] string DestinationPath; - [Write] string SourcePath; - [Write,ValueMap{"Present", "Absent"},Values{"Present", "Absent"}] string Ensure; - [Write,ValueMap{"File", "Directory"},Values{"File", "Directory"}] string Type; - [Write] boolean Recurse; - [Write] boolean Force ; - [write] string Content; - [Write,ValueMap{"ReadOnly", "Hidden", "System", "Archive"},Values{"ReadOnly", "Hidden", "System", "Archive"}] string Attributes[]; + [Required, Description("Indicates the location where you want to ensure the state for a file or directory.")] string DestinationPath; + [Write, Description("Indicates the path from which to copy the file or folder resource.")] string SourcePath; + [Write, Description("Indicates if the file or directory exists. Set this property to `Absent` to ensure that the file or directory does not exist. Set it to `Present` to ensure that the file or directory does exist."), ValueMap{"Present", "Absent"},Values{"Present", "Absent"}] string Ensure; + [Write, Description("Indicates if the resource being configured is a directory or a file. Set this property to `Directory` to indicate that the resource is a directory. Set it to `File` to indicate that the resource is a file."), ValueMap{"File", "Directory"},Values{"File", "Directory"}] string Type; + [Write, Description("Indicates if subdirectories are included. Set this property to `$true` to indicate that you want subdirectories to be included.")] boolean Recurse; + [Write, Description("Certain file operations (such as overwriting a file or deleting a directory that is not empty) will result in an error. Using the Force property overrides such errors.")] boolean Force; + [Write, Description("Specifies the contents of a file, such as a particular string.")] string Content; + [Write, Description("Specifies the desired state of the attributes for the targeted file or directory."), ValueMap{"ReadOnly", "Hidden", "System", "Archive"},Values{"ReadOnly", "Hidden", "System", "Archive"}] string Attributes[]; }; [ClassVersion("1.0.0.0"), FriendlyName("VhdFile")] class DSC_VhdFileDirectory : OMI_BaseResource { - [Key, Description("Path to the VHD")] String VhdPath; - [Required, EmbeddedInstance("DSC_FileDirectory"), Description("The FileDirectory objects to copy to the VHD")] String FileDirectory[]; - [Write,ValueMap{"ModifiedDate","SHA-1","SHA-256","SHA-512"},Values{"ModifiedDate","SHA-1","SHA-256","SHA-512"}] string CheckSum; + [Key, Description("Path to the VHD.")] String VhdPath; + [Required, EmbeddedInstance("DSC_FileDirectory"), Description("The FileDirectory objects to copy to the VHD (as used in the _File_ resource).")] String FileDirectory[]; + [Write, Description("Indicates the checksum type to use when determining whether two files are the same. The default value is `ModifiedDate`."), ValueMap{"ModifiedDate","SHA-1","SHA-256","SHA-512"},Values{"ModifiedDate","SHA-1","SHA-256","SHA-512"}] string CheckSum; }; - - - diff --git a/source/DSCResources/DSC_VhdFileDirectory/README.md b/source/DSCResources/DSC_VhdFileDirectory/README.md index 205db6b..47ebf7e 100644 --- a/source/DSCResources/DSC_VhdFileDirectory/README.md +++ b/source/DSCResources/DSC_VhdFileDirectory/README.md @@ -4,8 +4,10 @@ Manages files or directories in a VHD. You can use it to copy files/folders to the VHD, remove files/folders from a VHD, and change attributes of a file in a VHD (e.g. change a -file attribute to 'ReadOnly' or 'Hidden'). This resource is particularly -useful when bootstrapping DSC Configurations into a VM. +file attribute to 'ReadOnly' or 'Hidden'). + +This resource is particularly useful when bootstrapping DSC Configurations +into a VM. ## Requirements