Skip to content

Commit

Permalink
Merge pull request #1 from Microsoft/master
Browse files Browse the repository at this point in the history
Syncing
  • Loading branch information
AndreasSobczyk authored Aug 28, 2018
2 parents 7d0e6a9 + f4f36c4 commit 05c79c8
Show file tree
Hide file tree
Showing 259 changed files with 7,790 additions and 54,650 deletions.
9 changes: 0 additions & 9 deletions 1709/LabConfig.ps1

This file was deleted.

21 changes: 0 additions & 21 deletions 1709/readme.md

This file was deleted.

18 changes: 18 additions & 0 deletions Insider/LabConfig.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
$LabConfig=@{ DomainAdminName='LabAdmin'; AdminPassword='LS1setup!'; Prefix = 'WSLabInsider-'; SwitchName = 'LabSwitch'; DCEdition='4' ; Internet=$false ;AdditionalNetworksConfig=@(); VMs=@(); ServerVHDs=@()}

1..4 | % {$VMNames="S2D"; $LABConfig.VMs += @{ VMName = "$VMNames$_" ; Configuration = 'S2D' ; ParentVHD = 'Win2019Core_17744.vhdx'; SSDNumber = 0; SSDSize=800GB ; HDDNumber = 12; HDDSize= 4TB ; MemoryStartupBytes= 1GB ; MemoryMinimumBytes=512MB }}
#optional Win10 management machine
#$LabConfig.VMs += @{ VMName = 'WinAdminCenter' ; Configuration = 'Simple' ; ParentVHD = 'Win10RS4_G2.vhdx' ; MemoryStartupBytes= 1GB ; MemoryMinimumBytes=1GB ; AddToolsVHD=$True ; DisableWCF=$True }
#or with nested virtualization enabled
#1..4 | % {$VMNames="S2D"; $LABConfig.VMs += @{ VMName = "$VMNames$_" ; Configuration = 'S2D' ; ParentVHD = 'Win2019Core_17744.vhdx'; SSDNumber = 0; SSDSize=800GB ; HDDNumber = 12; HDDSize= 4TB ; MemoryStartupBytes= 2GB ; NestedVirt=$True }}

$LabConfig.ServerVHDs += @{
Edition="4"
VHDName="Win2019_17744.vhdx"
Size=60GB
}
$LabConfig.ServerVHDs += @{
Edition="3"
VHDName="Win2019Core_17744.vhdx"
Size=30GB
}
Binary file added Insider/Screenshots/ReconnectHangs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Insider/Screenshots/ReconnectHangs1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
68 changes: 23 additions & 45 deletions Insider/readme.md
Original file line number Diff line number Diff line change
@@ -1,76 +1,54 @@
# Server Insider lab 17623
# Server Insider lab 17744

## Howto
To create Insider lab, you can reuse your already hydrated lab (DC can be reused), or hydrate all from scratch. You can use both VHD or ISO. VHD can be copied to Parent disks, and then its reused or ISO can be chosen during create parent disk phase (if not present in parent disks)

[Download location](https://www.microsoft.com/en-us/software-download/windowsinsiderpreviewserver)

You can create Win10 VHD with script provided in tools folder. You can then give a try to project Honolulu (just uncomment Win10 machine in labconfig and deploy honolulu there)
You can create Win10 VHD with script provided in tools folder. You can then give a try to Windows Admin Center (former project Honolulu). Just uncomment Win10 machine in labconfig and deploy Win Admin Center there.

## Note

If hydrating from scratch, make sure you use latest scripts as DSC needed some adjustments.
known bug: **S2D fails to enable in 17623 inside VMs**

![](/Insider/Screenshots/enableS2Dfail.png)

**Workaround - EnableClusterS2D using following script** However if you have Rack fault domain/Chassis fault domain, it would be more complex.

````PowerShell
Enable-ClusterS2D -CimSession $ClusterName -AutoConfig:0 -Confirm:$false -Verbose -SkipEligibilityChecks
Invoke-Command -ComputerName $ClusterName -ScriptBlock {
#Create Pool
$phydisks = Get-StorageSubSystem -FriendlyName "*$using:ClusterName" | Get-PhysicalDisk -CanPool $true
$pool=New-StoragePool -FriendlyName "S2D on $using:ClusterName" -PhysicalDisks $phydisks -StorageSubSystemFriendlyName "*$using:ClusterName"
#Set mediatype to HDD
$pool | get-physicaldisk | Set-PhysicalDisk -MediaType HDD
#Create tiers
if (($using:Servers).count -eq 2){
New-StorageTier -FriendlyName Capacity -MediaType HDD -ResiliencySettingName Mirror -StoragePoolFriendlyName "S2D on $using:ClusterName" -PhysicalDiskRedundancy 1
}elseif(($using:Servers).count -eq 3){
New-StorageTier -FriendlyName Capacity -MediaType HDD -ResiliencySettingName Mirror -StoragePoolFriendlyName "S2D on $using:ClusterName" -PhysicalDiskRedundancy 2
}elseif(($using:servers).count -gt 3){
New-StorageTier -FriendlyName Capacity -MediaType HDD -ResiliencySettingName Parity -StoragePoolFriendlyName "S2D on $using:ClusterName" -PhysicalDiskRedundancy 2
New-StorageTier -FriendlyName Performance -MediaType HDD -ResiliencySettingName Mirror -StoragePoolFriendlyName "S2D on $using:ClusterName" -PhysicalDiskRedundancy 2
}
}
````
If hydrating from scratch, make sure you use latest scripts as DSC needed some adjustments. I also fixed NestedVirt CPU issue, so make sure deploy.ps1 is latest.

## LabConfig for vNext LTSC preview

````PowerShell
$LabConfig=@{ DomainAdminName='LabAdmin'; AdminPassword='LS1setup!'; Prefix = 'ws2016labInsider-'; SwitchName = 'LabSwitch'; DCEdition='DataCenter'; CreateClientParent=$false ; ClientEdition='Enterprise'; PullServerDC=$false ; Internet=$false ;AdditionalNetworksConfig=@(); VMs=@(); ServerVHDs=@()}
```PowerShell
$LabConfig=@{ DomainAdminName='LabAdmin'; AdminPassword='LS1setup!'; Prefix = 'WSLabInsider-'; SwitchName = 'LabSwitch'; DCEdition='4' ; PullServerDC=$false ; Internet=$false ;AdditionalNetworksConfig=@(); VMs=@(); ServerVHDs=@()}
1..4 | % {$VMNames="S2D"; $LABConfig.VMs += @{ VMName = "$VMNames$_" ; Configuration = 'S2D' ; ParentVHD = 'Win2019Core_17623.vhdx'; SSDNumber = 0; SSDSize=800GB ; HDDNumber = 12; HDDSize= 4TB ; MemoryStartupBytes= 1GB ; MemoryMinimumBytes=1GB }}
#$LabConfig.VMs += @{ VMName = 'Honolulu' ; Configuration = 'Simple' ; ParentVHD = 'Win10_G2.vhdx' ; MemoryStartupBytes= 1GB ; MemoryMinimumBytes=1GB ; AddToolsVHD=$True ; DisableWCF=$True }
1..4 | % {$VMNames="S2D"; $LABConfig.VMs += @{ VMName = "$VMNames$_" ; Configuration = 'S2D' ; ParentVHD = 'Win2019Core_17744.vhdx'; SSDNumber = 0; SSDSize=800GB ; HDDNumber = 12; HDDSize= 4TB ; MemoryStartupBytes= 1GB ; MemoryMinimumBytes=512MB }}
#optional Win10 management machine
#$LabConfig.VMs += @{ VMName = 'WinAdminCenter' ; Configuration = 'Simple' ; ParentVHD = 'Win10RS4_G2.vhdx' ; MemoryStartupBytes= 1GB ; MemoryMinimumBytes=1GB ; AddToolsVHD=$True ; DisableWCF=$True }
#or with nested virtualization enabled
#1..4 | % {$VMNames="S2D"; $LABConfig.VMs += @{ VMName = "$VMNames$_" ; Configuration = 'S2D' ; ParentVHD = 'Win2019Core_17744.vhdx'; SSDNumber = 0; SSDSize=800GB ; HDDNumber = 12; HDDSize= 4TB ; MemoryStartupBytes= 2GB ; NestedVirt=$True }}
$LabConfig.ServerVHDs += @{
Edition="DataCenter"
VHDName="Win2019_17623.vhdx"
Edition="4"
VHDName="Win2019_17744.vhdx"
Size=60GB
}
$LabConfig.ServerVHDs += @{
Edition="DataCenterCore"
VHDName="Win2019Core_17623.vhdx"
Edition="3"
VHDName="Win2019Core_17744.vhdx"
Size=30GB
}
````
```

## LabConfig for SAC (if you reuse DC from 14393 and just copy VHD to parent disks)

````PowerShell
```PowerShell
$LabConfig=@{ DomainAdminName='LabAdmin'; AdminPassword='LS1setup!'; Prefix = 'ws2016lab-'; SwitchName = 'LabSwitch'; DCEdition='DataCenter'; AdditionalNetworksConfig=@(); VMs=@(); ServerVHDs=@()}
1..4 | % {$VMNames="S2D"; $LABConfig.VMs += @{ VMName = "$VMNames$_" ; Configuration = 'S2D' ; ParentVHD = 'Windows_InsiderPreview_Server_VHDX_17623.vhdx'; SSDNumber = 0; SSDSize=800GB ; HDDNumber = 12; HDDSize= 4TB ; MemoryStartupBytes= 1GB ; MemoryMinimumBytes=1GB }}
$LabConfig.VMs += @{ VMName = 'PasteScriptsHere' ; Configuration = 'Simple' ; ParentVHD = 'Windows_InsiderPreview_Server_VHDX_17623.vhdx'; MemoryStartupBytes= 1GB ;MemoryMinimumBytes=1GB }
$LabConfig.VMs += @{ VMName = 'Honolulu' ; Configuration = 'Simple' ; ParentVHD = 'Win10_G2.vhdx' ; MemoryStartupBytes= 1GB ; MemoryMinimumBytes=1GB ; AddToolsVHD=$True ; DisableWCF=$True }
1..4 | % {$VMNames="S2D"; $LABConfig.VMs += @{ VMName = "$VMNames$_" ; Configuration = 'S2D' ; ParentVHD = 'Windows_InsiderPreview_Server_VHDX_17744.vhdx'; SSDNumber = 0; SSDSize=800GB ; HDDNumber = 12; HDDSize= 4TB ; MemoryStartupBytes= 1GB ; MemoryMinimumBytes=1GB }}
$LabConfig.VMs += @{ VMName = 'PasteScriptsHere' ; Configuration = 'Simple' ; ParentVHD = 'Windows_InsiderPreview_Server_VHDX_17744.vhdx'; MemoryStartupBytes= 1GB ;MemoryMinimumBytes=1GB }
#optional Win10 management machine
#$LabConfig.VMs += @{ VMName = 'WinAdminCenter' ; Configuration = 'Simple' ; ParentVHD = 'Win10RS4_G2.vhdx' ; MemoryStartupBytes= 1GB ; MemoryMinimumBytes=1GB ; AddToolsVHD=$True ; DisableWCF=$True }
````
```

## Result

![](/Insider//Screenshots/cluadmin.png)


## Known issues
41 changes: 27 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
- [Videos](#videos)
- [HowTo](#howto)
- [Step 1 Download required files (prerequisities):](#step-1-download-required-files-prerequisities)
- [Windows Server 2016](#windows-server-2016)
- [or Windows Server 2019](#or-windows-server-2019)
- [Step 2 Create folder and Unzip scripts there](#step-2-create-folder-and-unzip-scripts-there)
- [Step 3 (Optional) Check the LabConfig.p1](#step-3-optional-check-the-labconfigp1)
- [Step 3 (Optional) Check the LabConfig.ps1](#step-3-optional-check-the-labconfigps1)
- [Step 4 Right-click and run with PowerShell 1_Prereq.ps1](#step-4-right-click-and-run-with-powershell-1_prereqps1)
- [Step 5 (optional) Copy SCVMM files (or your tools) to toolsVHD folder](#step-5-optional-copy-scvmm-files-or-your-tools-to-toolsvhd-folder)
- [Step 6 Right-click and run with PowerShell 2_CreateParentDisks.ps1](#step-6-right-click-and-run-with-powershell-2_createparentdisksps1)
Expand All @@ -20,20 +22,21 @@
<!-- /TOC -->

# Project Description
* Deployment Automation of Windows Server 2016 labs on WS2016/Windows10 Hyper-V

* Deployment Automation of Windows Server labs on WS2016/Windows10 Hyper-V
* Simply deploy your lab just with these scripts and ISO file.
* Lab can run LAB on Windows 10, Windows Server 2016 (both Core and GUI) or even in [Azure VM](/Scenarios/Running%20ws2016lab%20in%20Azure)
* Lab can run LAB on Windows 10, Windows Server 2016 (both Core and GUI) or even in [Azure VM](/Scenarios/Running%20WSLab%20in%20Azure)
* Major differentiator is that once hydrated (first 2 scripts), deploy takes ~5 minutes. Cleanup is ~10s.
* Options for setting up a Windows Server 2016-based lab are simpler than with some of the other available lab automation systems as the project is based on well-crafted Powershell scripts and, rather than XML or DSC configuration files.
* Options for setting up a Windows Server 2016-based lab are simpler than with some of the other available lab automation systems as the project is based on well-crafted Powershell scripts rather than XML or DSC configuration files.
* Scripts are not intentionally doing everything. You can spend nice time studying scenarios.
* This solution is used in Microsoft Premier Workshop for Software Defined Storage, Hyper-V and System Center VMM. If you have Premier Contract, contact your TAM and our trainers can deliver this workshop for you.
* Follow [#ws2016lab](https://twitter.com/search?f=tweets&vertical=default&q=%23ws2016lab) hash tag to get latest news.

* Check [this](https://github.com/Microsoft/ws2016lab/tree/master/Scenarios) page for end to end scenarios! It's just a small portion I wrote for internally for consultants and PFEs in Microsoft
* Check [this](https://github.com/Microsoft/WSLab/tree/master/Scenarios) page for end to end scenarios! It's just a small portion I wrote for internally for consultants and PFEs in Microsoft

* Want to try Windows Server insider builds? Check [this](https://github.com/Microsoft/ws2016lab/tree/master/Insider) page
* Want to try Windows Server insider builds? Check [this](https://github.com/Microsoft/WSLab/tree/master/Insider) page

* Want to try Windows Server 1709? Check [this](https://github.com/Microsoft/ws2016lab/tree/master/1709) page
* Want to try Windows Server 1709? Check [this](https://github.com/Microsoft/WSLab/tree/master/1709) page

# Videos

Expand All @@ -51,15 +54,25 @@ Note: Some videos may be a bit outdated as there is continous inovation going on
# HowTo

## Step 1 Download required files (prerequisities):
* [Scripts](https://github.com/Microsoft/ws2016lab/blob/master/scripts.zip?raw=true)
* [Windows Server 2016](https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-2016)
* [Latest Cumulative Update](http://catalog.update.microsoft.com/v7/site/Search.aspx?q=Cumulative%20Update%20for%20Windows%20Server%202016%20for%20x64-based%20Systems%20) for Windows Server 2016 and [Servicing Stack Update](https://www.catalog.update.microsoft.com/Search.aspx?q=2017-11%20Update%20for%20Windows%20Server%202016%20for%20x64-based%20Systems%20(KB4049065)%20)

* [Scripts](https://github.com/Microsoft/WSLab/blob/master/scripts.zip?raw=true)

### Windows Server 2016

* [ISO](https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-2016)
* [Latest Cumulative Update](http://catalog.update.microsoft.com/v7/site/Search.aspx?q=Cumulative%20Update%20for%20Windows%20Server%202016%20for%20x64-based%20Systems%20) for Windows Server 2016 and [Servicing Stack Update](https://www.catalog.update.microsoft.com/Search.aspx?q=2018-05%20Update%20for%20Windows%20Server%202016%20for%20x64-based%20Systems%20(KB4132216)%20)

### or Windows Server 2019

* [LTSC ISO](https://www.microsoft.com/en-us/software-download/windowsinsiderpreviewserver)
* [Insider labconfig.ps1](/Insider/LabConfig.ps1)

## Step 2 Create folder and Unzip scripts there

![](/Screenshots/ScriptsExtracted.png)

## Step 3 (Optional) Check the LabConfig.p1
## Step 3 (Optional) Check the LabConfig.ps1

* Edit it to specify the lab setup that you require (such as different domain name, Domain Admin name...) This script file documents the detailed configuration options that are available. (The default script will generate a lab with a Windows Server 2016 DataCenter Domain Controller and 4 Windows Server 2016 Core servers ready to be set up with Storage Spaces Direct.)

**Default Labconfig**
Expand Down Expand Up @@ -138,7 +151,7 @@ Note: Some videos may be a bit outdated as there is continous inovation going on
![](/Screenshots/2_CreateParentDisksResultDC.png)

## Step 7 Right-click and run with PowerShell Deploy.ps1
* Deploy.ps1 will deploy servers as specified in Labconfig.ps1 By default, it will deploy servers for S2D Hyperconverged [scenario](https://github.com/Microsoft/ws2016lab/tree/master/Scenarios)
* Deploy.ps1 will deploy servers as specified in Labconfig.ps1 By default, it will deploy servers for S2D Hyperconverged [scenario](https://github.com/Microsoft/WSLab/tree/master/Scenarios)

![](/Screenshots/Deploy.png)

Expand All @@ -148,7 +161,7 @@ Note: Some videos may be a bit outdated as there is continous inovation going on

## Step 8 Continue with S2D Hyperconverged Scenario

* [S2D Hyperconverged Scenario page](https://github.com/Microsoft/ws2016lab/tree/master/Scenarios/S2D%20Hyperconverged)
* [S2D Hyperconverged Scenario page](https://github.com/Microsoft/WSLab/tree/master/Scenarios/S2D%20Hyperconverged)
* will guide you to deploy 4 Node Storage Spaces Direct cluster.
* Note: scenario is completely separate script. You use it when logged into DC. Take your time and look what it does as you can easily learn from it. If you are not in rush, run it line by line in PowerShell or PowerShell ISE and look with GUI what has changed to fully understand what's happening.

Expand All @@ -164,7 +177,7 @@ Note: Some videos may be a bit outdated as there is continous inovation going on

## Step 10 Try different scenarios

* [scenarios page](https://github.com/Microsoft/ws2016lab/tree/master/Scenarios/)
* [scenarios page](https://github.com/Microsoft/WSLab/tree/master/Scenarios/)
* Just replace LabConfig and Deploy again (takes 5-10 minutes to spin up new VMs)

# Tips and tricks
Expand Down
Loading

0 comments on commit 05c79c8

Please sign in to comment.