Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Readme.md #113

Merged
merged 5 commits into from
Jul 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .MetaTestOptIn.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[
"Common Tests - Validate Markdown Files"
]
132 changes: 132 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
# Change log for xHyper-V

## Unreleased

* MSFT_xVMHyperV:
* Increased xVMHyperV StartupMemory and MinimumMemory limits from 17GB to 64GB.
* EnableGuestService works on localized OS (language independent).
* Adds missing Hyper-V-PowerShell feature in examples.
* Added the following resources:
* MSFT_xVMProcessor to manage virtual machine processor options.
* MSFT_xVMHost to managing Hyper-V host settings.
* MSFT_xVMSwitch:
* Added support for Switch Embedded Teaming (SET) in Server 2016.
* Fixed a bug where Get-TargetResource threw an error if a non External switch
is used.
* Updated unit tests to use template version 1.2.0.
* Style fixes.
* Added support for Localization.
* xHyper-V module:
* Added vs code formatting rule settings.
* Fix Markdown rule violations in Readme.md.
* Added .MetaTestOptIn.json for Markdown common test to be included.
* Added Appveyor badge for Dev branch in Readme.md and moved to Branches section.
* Added missing properties for all resources in Readme.md.
* Added and corrected missing / wrong DataTypes and Dsc attributes in Readme.md.
* Updated Readme to match DscResources style.
* Created change log and linked to it from Readme.
* Removed version info from Readme.
* Examples:
* Removed code from Readme and linked to example files instead.
* Moved code to new example files where there was only code in Readme.

## 3.8.0.0

* Fix bug in xVMDvdDrive with hardcoded VM Name.
* Corrected Markdown rule violations in Readme.md.

## 3.7.0.0

* Adding a new resource
* MSFT_xVMNetworkAdapter: Attaches a new VM network adapter to the management
OS or VM.

## 3.6.0.0

* xVHD: Updated incorrect property name MaximumSize in error message
* Fix Markdown rule violations in Readme.md identified by [markdownlint](https://github.com/mivok/markdownlint/blob/master/docs/RULES.md).
* Created standard Unit/Integration test folder structure.
* Moved unit tests into Unit test folder.
* Renamed the unit tests to meet standards.
* Added the following resources:
* xVMDvdDrive to manage DVD drives attached to a Hyper-V virtual machine.

## 3.5.0.0

* Converted appveyor.yml to install Pester from PSGallery instead of from Chocolatey.
* MSFT_xVMHyperV: Fixed bug in Test-TargetResource throwing when a Vhd's ParentPath
property was null.

## 3.4.0.0

* MSFT_xVMHyperV: Fixed bug causing Test-TargetResource to fail when VM had snapshots.
* MSFT_xVMHyperV: Adds localization support.
* MSFT_xVMSwitch: Fixes bug where virtual switches are duplicated when
BandwidthReservationMode is not specified.

## 3.3.0.0

* xHyperV: Added SecureBoot parameter to enable control of the secure boot BIOS
setting on generation 2 VMs.
* Fixed drive letter when mounting VHD when calling resource xVhdFile. Fixes #20.
* MSFT_xVMHyperV: Changed the SwitchName parameter to string[] to support
assigning multiple NICs to virtual machines.
* MSFT_xVMHyperV: Changed the MACAddress parameter to string[] to support
assigning multiple MAC addresses to virtual machines.
* MSFT_xVMHyperV: Added enabling of Guest Service Interface.
* MSFT_xVMSwitch: Added the BandwidthReservationMode parameter which specifies
how minimum bandwidth is to be configured on a virtual switch

## 3.2.0.0

* Added data type System.String to CheckSum parameter of Get/Set/Test-TargetResource
functions and aligned indentation.
* Minor fixes

## 3.1.0.0

* xVMHyperV: Fixed bug in mof schema (Generation property had two types)
* xVhdFileDirectory: Fixed typo in type comparison
* Readme updates

## 3.0.0.0

* Decoupled VM generation from underlying VHD format in xVMHyperV resource.
* __Breaking change:__ xVMHyperV resource: Generation property type changed
from a String to an Integer.
* The initial generation property was tied to the virtual disk format which was
incorrect and has been rectified.
* This change will only impact configurations that have previously explicitly
specified the VM generation is either "vhd" or "vhdx".

## 2.4.0.0

* Fixed VM power state issue in xVMHyperV resource

## 2.3.0

* Fixed check for presence of param AllowManagementOS.

## 2.2.1

## 2.1

* Added logic to automatically adjust VM's startup memory when only minimum and
maximum memory is specified in configuration
* Fixed the issue that a manually stopped VM cannot be brought back to running
state with DSC

## 2.0

* Added xVhdFileDirectory Resource
* Allowed name to be specified with the extension in xVhd (e.g. the Vhd name could
either be "sample" or "sample.vhd")
* When a VHD cannot be removed because it is already being used by another process,
an error will be thrown.

## 1.0.0.0

* Initial release with the following resources
* xVhd
* xVMHyperV
* xVMSwitch
22 changes: 22 additions & 0 deletions Examples/Sample_xVMHost_Paths.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Configuration HyperVHostPaths
{
param
(
[Parameter(Mandatory=$true, Position=0)]
[ValidateScript({Test-Path $_})]
$VirtualHardDiskPath,

[Parameter(Mandatory=$true, Position=1)]
[ValidateScript({Test-Path $_})]
$VirtualMachinePath
)

Import-DscResource -moduleName xHyper-V

xVMHost HyperVHostPaths
{
IsSingleInstance = 'Yes'
VirtualHardDiskPath = $VirtualHardDiskPath
VirtualMachinePath = $VirtualMachinePath
}
}
72 changes: 72 additions & 0 deletions Examples/Sample_xVMHyperV_MultipleNICs.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
Configuration Sample_xVMHyperV_MultipleNICs
{
param
(
[string[]]$NodeName = 'localhost',

[Parameter(Mandatory)]
[string]$VMName,

[Parameter(Mandatory)]
[string]$VhdPath,

[Parameter(Mandatory)]
[string[]]$SwitchName,

[Parameter()]
[string[]]$MACAddress
)

Import-DscResource -module xHyper-V

Node $NodeName
{
# Install HyperV features, if not installed - Server SKU only
WindowsFeature HyperV
{
Ensure = 'Present'
Name = 'Hyper-V'
}

WindowsFeature HyperVPowerShell
{
Ensure = 'Present'
Name = 'Hyper-V-PowerShell'
}

# Dynamically build the 'DependsOn' array for the 'xVMHyperV' feature
# based on the number of virtual switches specified
$xVMHyperVDependsOn = @('[WindowsFeature]HyperV','[WindowsFeature]HyperVPowerShell')

# Create each virtual switch
foreach ($vmSwitch in $SwitchName)
{
# Remove spaces and hyphens from the identifier
$vmSwitchName = $vmSwitch -replace ' ','' -replace '-',''
# Add the virtual switch dependency
$xVMHyperVDependsOn += "[xVMHyperV]$vmSwitchName"

xVMSwitch $vmSwitchName
{
Ensure = 'Present'
Name = $vmSwitch
Type = 'Internal'
DependsOn = '[WindowsFeature]HyperV','[WindowsFeature]HyperVPowerShell'
}
}

# Ensures a VM with all the properties
xVMHyperV $VMName
{
Ensure = 'Present'
Name = $VMName
VhdPath = $VhdPath
SwitchName = $SwitchName
MACAddress = $MACAddress
# Use the dynamically created dependency list/array
DependsOn = $xVMHyperVDependsOn
}
}
}

Sample_xVMHyperV_MultipleNICs -VMName 'MultiNICVM' -VhdPath 'C:\VMs\MultiNICVM.vhdx' -SwitchName 'Switch 1','Switch-2'
54 changes: 54 additions & 0 deletions Examples/Sample_xVMHyperV_SimpleWithNestedVirtualization.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
configuration Sample_xVMHyperV_SimpleWithNestedVirtualization
{
param
(
[Parameter()]
[string[]]
$NodeName = 'localhost',

[Parameter(Mandatory = $true)]
[string]
$VMName,

[Parameter(Mandatory = $true)]
[string]
$VhdPath,

[Parameter(Mandatory = $true)]
[Uint64]
$Memory
)

Import-DscResource -module xHyper-V

Node $NodeName
{
# Install HyperV feature, if not installed - Server SKU only
WindowsFeature HyperV
{
Ensure = 'Present'
Name = 'Hyper-V'
}

# Ensures a VM with default settings
xVMHyperV NewVM
{
Ensure = 'Present'
Name = $VMName
VhdPath = $VhdPath
Generation = 2
StartupMemory = $Memory
MinimumMemory = $Memory
MaximumMemory = $Memory
DependsOn = '[WindowsFeature]HyperV'
}

# Set the VM options
xVMProcessor NestedVirtualization
{
VMName = $VMName
ExposeVirtualizationExtensions = $true
DependsOn = '[xVMHyperV]NewVM'
}
}
}
47 changes: 47 additions & 0 deletions Examples/Sample_xVMSwitch_ExternalSET.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
Configuration Sample_xVMSwitch_External
{
param
(
[Parameter()]
[string[]]
$NodeName = 'localhost',

[Parameter(Mandatory = $true)]
[string]
$SwitchName,

[Parameter(Mandatory = $true)]
[string[]]
$NetAdapterNames
)

Import-DscResource -module xHyper-V

Node $NodeName
{
# Install HyperV feature, if not installed - Server SKU only
WindowsFeature HyperV
{
Ensure = 'Present'
Name = 'Hyper-V'
}

WindowsFeature HyperVTools
{
Ensure = 'Present'
Name = 'RSAT-Hyper-V-Tools'
DependsOn = '[WindowsFeature]HyperV'
}

# Ensures a VM with default settings
xVMSwitch ExternalSwitch
{
Ensure = 'Present'
Name = $SwitchName
Type = 'External'
NetAdapterName = $NetAdapterNames
EnableEmbeddedTeaming = $true
DependsOn = '[WindowsFeature]HyperVTools'
}
}
}
Loading