Skip to content

Commit

Permalink
Merge pull request #431 from microsoft/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
Jaromir Kaspar authored Feb 25, 2021
2 parents e00b0bc + a8e4666 commit 736919f
Show file tree
Hide file tree
Showing 43 changed files with 257 additions and 114 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Technically all VMs are located on SOFS share that is presented using DFS-N name

## User Profile Disks host (Windows Server Only)

Azure Stack HCI can also host user profile disks (UPDs). Since UPD is VHD (both native Windows Server functionality and [FSLogix](https://github.com/microsoft/WSLab/tree/master/Scenarios/FSLogix)), Scale-Out File Server can be used as workload pattern is the same as for Virtual Machines.
Azure Stack HCI can also host user profile disks (UPDs). Since UPD is VHD (both native Windows Server functionality and [FSLogix](https://github.com/microsoft/MSLab/tree/master/Scenarios/FSLogix)), Scale-Out File Server can be used as workload pattern is the same as for Virtual Machines.

## SQL

Expand Down
8 changes: 4 additions & 4 deletions Docs/AzureStackHCI/02-AzSHCI-Deployment/02-os-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ You can interactively install or upgrade Windows by using the Windows product me
### Manual steps needed after interactive setup

> [!TIP]
> You can test this in [WSLab](https://aka.ms/WSLab) with following VMs in labconfig:
> You can test this in [MSLab](https://aka.ms/MSLab) with following VMs in labconfig:
>
> 1..4 | ForEach-Object {$VMNames="S2D"; $LABConfig.VMs += @{ VMName = "$VMNames$_" ; Configuration = 'S2D' ; ParentVHD = 'Win2019Core_G2.vhdx'; HDDNumber = 12; HDDSize= 4TB ; **Unattend="None"**}}
>
>To test environment without dhcp, just stop dhcp server with **Stop-Service DHCPServer** on WSLab DC
>To test environment without dhcp, just stop dhcp server with **Stop-Service DHCPServer** on MSLab DC
if DHCP is not enabled, it's necessary to configure IP and domain join machines. The easiest is to run sconfig that will pop up wizard. Following are powershell examples to configure the same

Expand Down Expand Up @@ -369,11 +369,11 @@ Read-Host

## SCVMM

Since deploying operating system with SCVMM is bit complex task, it's well explained within [WSLab scenario](https://github.com/microsoft/WSLab/tree/master/Scenarios/S2D%20and%20Bare%20Metal%20with%20SCVMM).
Since deploying operating system with SCVMM is bit complex task, it's well explained within [MSLab scenario](https://github.com/microsoft/MSLab/tree/master/Scenarios/S2D%20and%20Bare%20Metal%20with%20SCVMM).

## MDT

Unlike SCVMM, Microsoft Deployment toolkit is a free tool. Together with SQL Express with database of your asset, you can perform Zero Touch Installation. See more in [WSLab scenario](https://github.com/microsoft/WSLab/tree/master/Scenarios/AzSHCI%20and%20MDT).
Unlike SCVMM, Microsoft Deployment toolkit is a free tool. Together with SQL Express with database of your asset, you can perform Zero Touch Installation. See more in [MSLab scenario](https://github.com/microsoft/MSLab/tree/master/Scenarios/AzSHCI%20and%20MDT).

## Useful tools in install media

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ To complete following steps it is necessary, that servers are domain joined and
![](03-OS-Configuration/media/MinimumInfrastructure01.png)

> [!TIP]
> You can test OS Configuration in [WSLab](https://aka.ms/WSLab) with following VMs in labconfig:
> You can test OS Configuration in [MSLab](https://aka.ms/MSLab) with following VMs in labconfig:
> 1..4 | ForEach-Object {$VMNames="S2D"; $LABConfig.VMs += @{ VMName = "$VMNames$_" ; Configuration = 'S2D' ; ParentVHD = 'Win2019Core_G2.vhdx'; HDDNumber = 12; HDDSize= 4TB }}
## Install management tools on management machine
Expand Down Expand Up @@ -69,7 +69,7 @@ if ($InstallationType -eq "Client"){

## Perform Windows Update on Servers

Assuming Server Names are S2D1,S2D2,S2D3 and S2D4 (defined in variable $Servers). In WSLab is one [scenario](https://github.com/microsoft/WSLab/tree/master/Scenarios/Windows%20Update), that explains how to invoke Windows Update using WMI/CIM methods. There are different classes in Windows Server 2016 and Windows Server 2019. Therefore in following code is releaseID checked and then depending on that different CIM namespace used. In Deep Dive Scenario you can see, that slightly different argument is used (with AutoSelectOnWebSites=1). [AutoSelectOnWebSites = 1](https://docs.microsoft.com/en-us/windows/win32/api/wuapi/nf-wuapi-iupdatesearcher-search) will also find updates that are flagged to be automatically selected by windows update.
Assuming Server Names are S2D1,S2D2,S2D3 and S2D4 (defined in variable $Servers). In MSLab is one [scenario](https://github.com/microsoft/MSLab/tree/master/Scenarios/Windows%20Update), that explains how to invoke Windows Update using WMI/CIM methods. There are different classes in Windows Server 2016 and Windows Server 2019. Therefore in following code is releaseID checked and then depending on that different CIM namespace used. In Deep Dive Scenario you can see, that slightly different argument is used (with AutoSelectOnWebSites=1). [AutoSelectOnWebSites = 1](https://docs.microsoft.com/en-us/windows/win32/api/wuapi/nf-wuapi-iupdatesearcher-search) will also find updates that are flagged to be automatically selected by windows update.

### Configure

Expand Down Expand Up @@ -129,7 +129,7 @@ Invoke-Command -ComputerName $servers -ScriptBlock {

## Configure Spectre/Meltdown mitigations

It is recommended to review [settings](https://support.microsoft.com/en-us/help/4072698/windows-server-speculative-execution-side-channel-vulnerabilities) that will prevent exploiting Speculative Execution Side Channel vulnerabilities. Settings configuration can be validated using [Speculation Control Module](https://aka.ms/SpeculationControlPS) that is also described in [dedicated WSLab Scenario](https://github.com/microsoft/WSLab/tree/master/Scenarios/Exploring%20SpeculationControlSettings)
It is recommended to review [settings](https://support.microsoft.com/en-us/help/4072698/windows-server-speculative-execution-side-channel-vulnerabilities) that will prevent exploiting Speculative Execution Side Channel vulnerabilities. Settings configuration can be validated using [Speculation Control Module](https://aka.ms/SpeculationControlPS) that is also described in [dedicated MSLab Scenario](https://github.com/microsoft/MSLab/tree/master/Scenarios/Exploring%20SpeculationControlSettings)

Following guidance is applicable to Intel processors.

Expand Down Expand Up @@ -241,7 +241,7 @@ $result | Sort-Object PSComputerName | Format-Table -GroupBy PSComputerName

## Install Agents

This part will just demonstrate how to push and install Local Admin Password Solution (LAPS). Other agents can be installed similar way using PowerShell. Full WSLab scenario is located [here](https://github.com/microsoft/WSLab/tree/master/Scenarios/LAPS).
This part will just demonstrate how to push and install Local Admin Password Solution (LAPS). Other agents can be installed similar way using PowerShell. Full MSLab scenario is located [here](https://github.com/microsoft/MSLab/tree/master/Scenarios/LAPS).

```powershell
$Servers="AzSHCI1","AzSHCI2","AzSHCI3","AzSHCI4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ To complete following steps it is necessary, that servers are [domain joined](\0

It is also necessary to configure physical switches correctly. In general there should be multiple VLANs configured on ports (for Management,Storage and Virtual Machines) with one access VLAN (management). It is also mandatory to configure PfC/ETS when RoCE RDMA is used (DCB Priority Flow Control with priorities 0,3 and 7 with ETS enabled). See [network architecture part](/AzureStackHCI/01-AzSHCI-Planning/04-network-architecture.md). Great switch configuration examples were published by PFE Jan Mortensen at [s2d.dk](http://www.s2d.dk).

There are multiple ways to deploy networking in Azure Stack HCI clusters. Following guidance is for converged setup with one or two SMB subnets. Additional scenarios are covered in WSLab in [S2D and Network Deep Dive scenario](https://github.com/microsoft/WSLab/tree/master/Scenarios/S2D%20and%20Networks%20deep%20dive) and [S2D and Direct Connectivity Scenario](https://github.com/microsoft/WSLab/tree/master/Scenarios/S2D%20and%20Direct%20Connectivity)
There are multiple ways to deploy networking in Azure Stack HCI clusters. Following guidance is for converged setup with one or two SMB subnets. Additional scenarios are covered in MSLab in [S2D and Network Deep Dive scenario](https://github.com/microsoft/MSLab/tree/master/Scenarios/S2D%20and%20Networks%20deep%20dive) and [S2D and Direct Connectivity Scenario](https://github.com/microsoft/MSLab/tree/master/Scenarios/S2D%20and%20Direct%20Connectivity)

## Disable unused adapters

Expand Down Expand Up @@ -61,7 +61,7 @@ Invoke-Command -ComputerName $Servers -ScriptBlock {

### Validate

Note: following example is inside VMs (WSLab), therefore IOV does not work.
Note: following example is inside VMs (MSLab), therefore IOV does not work.

```powershell
$Servers="AzSHCI1","AzSHCI2","AzSHCI3","AzSHCI4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

## Some theory

When creating volumes, there are several factors to consider. One is, that due to overhead from [CSV redirection](https://github.com/microsoft/WSLab/tree/master/Scenarios/TestingCSVRedirection) (CSV is FileSystem redirected if REFS used and even if NTFS is used, Storage Spaces are File redirected). Therefore you want to have at least the same number of volumes as you have nodes (or multiple) to effectively distribute IOPS. Another factor is size of volume itself. While it is supported to create 64TB volume, it might be challenging to restore entire volume in reasonable time if something goes wrong.
When creating volumes, there are several factors to consider. One is, that due to overhead from [CSV redirection](https://github.com/microsoft/MSLab/tree/master/Scenarios/TestingCSVRedirection) (CSV is FileSystem redirected if REFS used and even if NTFS is used, Storage Spaces are File redirected). Therefore you want to have at least the same number of volumes as you have nodes (or multiple) to effectively distribute IOPS. Another factor is size of volume itself. While it is supported to create 64TB volume, it might be challenging to restore entire volume in reasonable time if something goes wrong.

Another aspect is if using [tiers](https://github.com/microsoft/WSLab/tree/master/Scenarios/S2D%20and%20Tiers%20deep%20dive) (templates) or not. Tiers are mandatory for Multi-Resilient volumes (Mirror-Accelerated Parity) - anytime you want to create a volume that consist of more than 1 kind (different tiers). If using system, where are both SSDs and HDDs for capacity, it is wise to either use tiers, or specify mediatype for created volume. For mor information about volumes see [Volume Deep Dive](https://github.com/Microsoft/WSLab/tree/master/Scenarios/S2D%20and%20Volumes%20deep%20dive)
Another aspect is if using [tiers](https://github.com/microsoft/MSLab/tree/master/Scenarios/S2D%20and%20Tiers%20deep%20dive) (templates) or not. Tiers are mandatory for Multi-Resilient volumes (Mirror-Accelerated Parity) - anytime you want to create a volume that consist of more than 1 kind (different tiers). If using system, where are both SSDs and HDDs for capacity, it is wise to either use tiers, or specify mediatype for created volume. For mor information about volumes see [Volume Deep Dive](https://github.com/Microsoft/MSLab/tree/master/Scenarios/S2D%20and%20Volumes%20deep%20dive)

## Create volumes

Following example is based on [AzSHCI Deployment Scenario](https://github.com/microsoft/WSLab/blob/master/Scenarios/AzSHCI%20Deployment/Scenario.ps1)
Following example is based on [AzSHCI Deployment Scenario](https://github.com/microsoft/MSLab/blob/master/Scenarios/AzSHCI%20Deployment/Scenario.ps1)

### Calculate reserve

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions Docs/AzureStackHCI/02-AzSHCI-Deployment/07-deploying-vms.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Deploying VMs

Depending on scale, you might consider using PowerShell to deploy Virtual Machines and join these machines to domain in one iteration. The process is two part. In first part you create a VM on one cluster node (preferably random) and second part adds this VM as clustered resource

## Simple example

```powershell
$VMName="MyVM"
$VolumeName="MirrorDisk1"
$ClusterName="AzSHCI-Cluster"
$ClusterNode="AzSHCI1"
$SwitchName="SETSwitch"
$DiskSize=128GB
$MemoryStartupBytes=1GB
New-VM -Name $VMName `
-NewVHDPath "c:\ClusterStorage\$VolumeName\$VMName\Virtual Hard Disks\$VMName.vhdx" `
-NewVHDSizeBytes $DiskSize `
-SwitchName $SwitchName `
-Generation 2 `
-Path "c:\ClusterStorage\$VolumeName\" `
-MemoryStartupBytes $MemoryStartupBytes `
-CimSession $ClusterNode
Add-ClusterVirtualMachineRole -VMName $VMName -Cluster $ClusterName
```

Since above example just creates blank VM, let's experiment with creating Windows Server Virtual Machine.

## Creating Windows Server/Windows 10 VHD

To create Windows vhd/vhdx can be tool convert-windowsimage used. https://github.com/MicrosoftDocs/Virtualization-Documentation/blob/master/hyperv-tools/Convert-WindowsImage/Convert-WindowsImage.ps1

To simplify conversion process you will find **CreateParentDisk.ps1** tool in mslab. It is available [MSLab GitHub](https://github.com/microsoft/MSLab/blob/master/Tools/CreateParentDisk.ps1) and the only thing needed is to right-click and select "run with PowerShell". The script will download convert-windowsimage and will ask for ISO and MSU (Cumulative Update and Servicing Stack Update). To Download CU and SSU you can use another tool - [DownloadLatestCUs.ps1](https://github.com/microsoft/MSLab/blob/master/Tools/DownloadLatestCUs.ps1).

![](07-Deploying-VMs/media/Explorer01.png)

Once parent VHD is created, we can proceed with VM creation. The end-to-end process on how to create domain-joined VMs with various parameters is documented [here](https://github.com/microsoft/MSLab/tree/master/Scenarios/S2D%20and%20Bulk%20VM%20creation)
File renamed without changes.
File renamed without changes.
12 changes: 12 additions & 0 deletions Docs/AzureStackHCI/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# About AzSHCI documentation

This documentation was released as an addition to [official documentation](https://docs.microsoft.com/en-us/azure-stack/hci/) with intent to demonstrate IT Professionals deployment and management of Azure Stack HCI and S2D at scale using PowerShell.

This documentation is intended to be used by IT Professionals who want's to learn or already are proficient with PowerShell.

The documentation is divided into 4 main parts

* Everything you have to know before you buy/deploy Azure Stack HCI solution **01-AzSHCI-Planning**
* Everything you have to know to successfully deploy Azure Stack HCI solution **02-AzSHCI-Deployment**
* Everything you have to know to operate and understand Azure Stack HCI solution **03-AzSHCI-DeepDive** (Work in Progress)
* Everything you have to know to troubleshoot Azure Stack HCI solution **04-AzSHCI-Troubleshooting** (Work in Progress)
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.
Empty file added Docs/MSLab-Advanced/scvmm.md
Empty file.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
24 changes: 12 additions & 12 deletions Docs/wslab-deployment.md → Docs/mslab-deployment.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
# WSLab Deployment Process
# MSLab Deployment Process

## Prerequisites

This guide assumes you already [Hydrated](../Docs/wslab-hydration.md) VHDs and Domain Controller using first 2 scripts and the result is folder with following files:
This guide assumes you already [Hydrated](../Docs/mslab-hydration.md) VHDs and Domain Controller using first 2 scripts and the result is folder with following files:

![](WSLab-Deployment/media/Explorer01.png)
![](MSLab-Deployment/media/Explorer01.png)

![](WSLab-Deployment/media/PowerShell01.png)
![](MSLab-Deployment/media/PowerShell01.png)

As you can see, in LAB folder is DC, that is ready to be imported. Entire VM configuration is backed up in Virtual Machines.zip. You can also see, that in ParentDisks folder are Windows Server 2019 VHDs, tools.vhdx and tools for creating additional parent disks (such as Windows 10, Windows Server 2016, or Windows Insider) and downloading Cumulative Update.

## Lab Deployment

![](WSLab-Deployment/media/Explorer02.png)
![](MSLab-Deployment/media/Explorer02.png)

The process is simple as right-click and selecting Run with PowerShell. The script will read configuration located in LabConfig.ps1 and will deploy as specified. If default LabConfig is used, it will deploy Domain Controller and four servers for Azure Stack HCI simulation.

During Deployment Process you might see red errors, but these are safe to ignore as it's result of testing Active Directory availability inside Domain Controller.

![](WSLab-Deployment/media/PowerShell02.png)
![](MSLab-Deployment/media/PowerShell02.png)

> [!NOTE]
> If this part loops forever, you probably changed password. The mechanism to detect wrong password specified in LabConfig is not implemented.
The script will finish in ~5 minutes.

![](WSLab-Deployment/media/PowerShell03.png)
![](MSLab-Deployment/media/PowerShell03.png)

![](WSLab-Deployment/media/Hyper-V_Manager01.png)
![](MSLab-Deployment/media/Hyper-V_Manager01.png)

All virtual machines are created under LAB folder

![](WSLab-Deployment/media/PowerShell04.png)
![](MSLab-Deployment/media/PowerShell04.png)

## Lab Cleanup

Once you want to discard lab, you can simply run cleanup by running Cleanup.ps1. Script will prompt you for confirmation. Once confirmed, all VMs will be removed and Domain Controller reverted.

![](WSLab-Deployment/media/Explorer03.png)
![](MSLab-Deployment/media/Explorer03.png)

![](WSLab-Deployment/media/PowerShell05.png)
![](MSLab-Deployment/media/PowerShell05.png)

![](WSLab-Deployment/media/Hyper-V_Manager02.png)
![](MSLab-Deployment/media/Hyper-V_Manager02.png)
18 changes: 9 additions & 9 deletions Docs/wslab-hydration.md → Docs/mslab-hydration.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
# WSLab Hydration
# MSLab Hydration

Process of hydration will prepare all necessary Virtual Hard Disks and will create Domain Controller, so deployment process will take only few minutes.

## Required Files

* [WSLab Scripts](https://aka.ms/wslabzip)
* [MSLab Scripts](https://aka.ms/mslabzip)
* [Windows Server 2019](https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-2019)
* Latest Cumulative Update + Servicing Stack Update

Tip: You can download CU and UR using DownloadLatestCU script that will be created after running 1_Prereqs.ps1

![](WSLab-Hydration/media/DownloadLatestCUs.gif)
![](MSLab-Hydration/media/DownloadLatestCUs.gif)

## 1_Prereq.ps1

After you will download WSLab Scripts, unzip it into some folder and then just run scripts with PowerShell by Right-Click and selecting Run With PowerShell.
After you will download MSLab Scripts, unzip it into some folder and then just run scripts with PowerShell by Right-Click and selecting Run With PowerShell.

![](WSLab-Hydration/media/Explorer01.png)
![](MSLab-Hydration/media/Explorer01.png)

The script will run and will ask for elevation. It will download necessary files (DSC Modules), some example files that will be placed into ToolsDisk folder and some scripts that will be added to ParentDisks folder. ToolsDisk folder can be populated by any tools you might want to have in Tools disk, that can be attached to any VM during deployment phase.

![](WSLab-Hydration/media/Explorer02.png)
![](MSLab-Hydration/media/Explorer02.png)

## 2_CreateParentDisks.ps1

![](WSLab-Hydration/media/Explorer03.png)
![](MSLab-Hydration/media/Explorer03.png)

Running 2_CreateParentDisk.ps1 will ask for Server ISO image. You can use Evaluation media, or if you have access to VL or Visual Studio Subscription, you can use those. This phase is most time consuming (takes 1-2 hours), as it creates VHDs and even Domain Controller with all required roles configured (Using Desired State Configuration).

It highly recommended to provide both Cumulative Update and Servicing Stack Update when prompted. You can download it with tool located in ParentDisks folder.

Once script will finish, it will clean up freshly created domain controller to keep it only in folder (to be ready to be imported during deployment phase). Script will prompt you if unnecessary files should be removed. If you will confirm, it will remove first 2 scripts as it's no longer needed.

![](WSLab-Hydration/media/PowerShell01.png)
![](MSLab-Hydration/media/PowerShell01.png)

![](WSLab-Hydration/media/Explorer04.png)
![](MSLab-Hydration/media/Explorer04.png)

# Tips and Tricks

Expand Down
Loading

0 comments on commit 736919f

Please sign in to comment.