Skip to content

Commit

Permalink
Merge pull request #457 from microsoft/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
jaromirk authored Sep 10, 2021
2 parents 95a74e1 + af609d7 commit bcdfaea
Show file tree
Hide file tree
Showing 40 changed files with 1,047 additions and 414 deletions.
28 changes: 28 additions & 0 deletions Docs/MSLab-Advanced/creating-parent-disk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#Creating Parent Disk

If you need additional VHD (like Windows 11, or Azure Stack HCI OS), you can create it by simply navigating to ParentDisks folder and running PowerShell

![](Docs/media/MSLAB-Advanced_CreateParentDisk_Explorer01.png)

You will be asked for ISO file and latest cumulative update that you can download using "DownloadLatestCUs.ps1" script.

![](Docs/media/MSLAB-Advanced_CreateParentDisk_PowerShell01.png)

ISO file can be downloaded from various locations such as:

* [Visual Studio Suubscription Downloads](https://my.visualstudio.com/Downloads)
* [Evaluation Center](https://www.microsoft.com/en-us/evalcenter/)
* [Windows Insider Preview](https://www.microsoft.com/en-us/software-download/windowsinsiderpreviewiso)
* [UUP Dump](https://uupdump.net/) - unofficial to, not supported, but good enough for labs if ISO is not (yet) available

Script will also ask what edition you would like to use

![](Docs/media/MSLAB-Advanced_CreateParentDisk_PowerShell02.png)

Name of VHD and size (you can just hit enter to leave it blank)

![](Docs/media/MSLAB-Advanced_CreateParentDisk_PowerShell03.png)

In few minutes, the VHD will be created

![](Docs/media/MSLAB-Advanced_CreateParentDisk_PowerShell04.png)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Docs/mslab-hydration.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Process of hydration will prepare all necessary Virtual Hard Disks and will crea
## Required Files

* [MSLab Scripts](https://aka.ms/mslabzip)
* [Windows Server 2019](https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-2019)
* [Windows Server 2022](https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-2022)
* 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
Expand Down
7 changes: 7 additions & 0 deletions Scenarios/AzSHCI and MDT/LabConfig.ps1
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
$LabConfig=@{ DomainAdminName='LabAdmin'; AdminPassword='LS1setup!' ; <#Prefix = 'WSLab-'#> ; DCEdition='4'; Internet=$true ; TelemetryLevel='Full' ; TelemetryNickname='' ; AdditionalNetworksConfig=@(); VMs=@()}

#MDT machine (GUI is needed as Core does not have WDSUtil)
$LabConfig.VMs += @{ VMName = 'MDT' ; Configuration = 'S2D' ; ParentVHD = 'Win2022_G2.vhdx' ; SSDNumber = 1; SSDSize=1TB ; MGMTNICs=1 }

#optional Windows 11 machine for management
$LabConfig.VMs += @{ VMName = 'Win11' ; ParentVHD = 'Win1121H2_G2.vhdx' ; MGMTNICs=1}

1,305 changes: 937 additions & 368 deletions Scenarios/AzSHCI and MDT/Scenario.ps1

Large diffs are not rendered by default.

Binary file modified Scenarios/AzSHCI and MDT/Screenshots/DHCP01.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 modified Scenarios/AzSHCI and MDT/Screenshots/Eventvwr01.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 modified Scenarios/AzSHCI and MDT/Screenshots/Explorer01.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 modified Scenarios/AzSHCI and MDT/Screenshots/Explorer02.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 modified Scenarios/AzSHCI and MDT/Screenshots/Explorer03.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 modified Scenarios/AzSHCI and MDT/Screenshots/Explorer04.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 modified Scenarios/AzSHCI and MDT/Screenshots/Explorer05.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 modified Scenarios/AzSHCI and MDT/Screenshots/Explorer06.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Scenarios/AzSHCI and MDT/Screenshots/MDT01.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 modified Scenarios/AzSHCI and MDT/Screenshots/MDT02.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 modified Scenarios/AzSHCI and MDT/Screenshots/MDT03.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 modified Scenarios/AzSHCI and MDT/Screenshots/MDT04.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 modified Scenarios/AzSHCI and MDT/Screenshots/MDT05.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 modified Scenarios/AzSHCI and MDT/Screenshots/MDT06.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 modified Scenarios/AzSHCI and MDT/Screenshots/MDT07.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 Scenarios/AzSHCI and MDT/Screenshots/MDT08.png
Binary file modified Scenarios/AzSHCI and MDT/Screenshots/PowerShell01.png
Binary file modified Scenarios/AzSHCI and MDT/Screenshots/PowerShell02.png
Binary file modified Scenarios/AzSHCI and MDT/Screenshots/PowerShell03.png
Binary file modified Scenarios/AzSHCI and MDT/Screenshots/PowerShell04.png
Binary file modified Scenarios/AzSHCI and MDT/Screenshots/PowerShell05.png
74 changes: 50 additions & 24 deletions Scenarios/AzSHCI and MDT/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@

- [AzSHCI and MDT](#azshci-and-mdt)
- [About the lab](#about-the-lab)
- [LabConfig with enabled telemetry (Full)](#labconfig-with-enabled-telemetry-full)
- [LabConfig with enabled telemetry Full](#labconfig-with-enabled-telemetry-full)
- [The lab](#the-lab)
- [Region download and install binaries](#region-download-and-install-binaries)
- [Region prereqs](#region-prereqs)
- [Region configure MDT](#region-configure-mdt)
- [Region configure MDT run-as account](#region-configure-mdt-run-as-account)
- [Region configure Bootstrap ini and generate WinPE](#region-configure-bootstrap-ini-and-generate-winpe)
- [Region Install and configure WDS](#region-install-and-configure-wds)
- [Region Configure MDT monitoring](#region-configure-mdt-monitoring)
- [Region replace customsettings.ini ith all DB data to query wizard output](#region-replace-customsettingsini-ith-all-db-data-to-query-wizard-output)
- [Region configure SQL to be able to access it remotely using MDTUSer account](#region-configure-sql-to-be-able-to-access-it-remotely-using-mdtuser-account)
- [Region Run from Hyper-V Host to create new, empty VMs](#region-run-from-hyper-v-host-to-create-new-empty-vms)
- [Create hash table out of machines that attempted to boot last 5 minutes](#create-hash-table-out-of-machines-that-attempted-to-boot-last-5-minutes)
- [Create DHCP reservation for machines](#create-dhcp-reservation-for-machines)
- [Region add deploy info to AD Object and MDT Database](#region-add-deploy-info-to-ad-object-and-mdt-database)
- [Region replace customsettings.ini ith all DB data to query (wizard output)](#region-replace-customsettingsini-ith-all-db-data-to-query-wizard-output)
- [Region configure SQL to be able to access it remotely using MDTUSer account](#region-configure-sql-to-be-able-to-access-it-remotely-using-mdtuser-account)
- [Reboot machines](#reboot-machines)

<!-- /TOC -->
Expand All @@ -26,36 +26,52 @@

In this lab you will learn how to deploy Azure Stack HCI nodes with Microsoft Deployment Toolkit (MDT). Scripts demonstrates unattend installation of all components (ADK, ADKPE, SQL Express, MDT), required configuration, setup of WDS that responds only to known computers, adding servers either by querying local event log for attempted deployments or simply populating with Hash table and many more!

This demonstration is simplified, as in real world scenarios you will need to inject drivers, install software and configure OS. This scenario is great start for designing production deployments! All runs from DC (demonstrating installation on remote computer would introduce additional complexity, and it would be harder to understand scenario itself).
This demonstration is simplified, as in real world scenarios you will need to inject drivers, install software and configure OS. This scenario is great start for designing production deployments! All runs from DC or management machine (Windows 10) demonstrating installation on remote computer.

Same scenario can be used to deploy physical (DELL) servers as lab can connect to physical adapters.

![](/Scenarios/AzSHCI%20and%20MDT/Screenshots/LabInfo01.png)

Previous iteration of scenario (without dedicated MDT and physical machines) is demonstrated here:

[![WSLab in MVPDays](/Docs/media/Deploying_AzSHCI_with_MDT.png)](https://youtu.be/Vipbhkv9wyM)
[![MSLab in MVPDays](/Docs/media/Deploying_AzSHCI_with_MDT.png)](https://youtu.be/Vipbhkv9wyM)

## LabConfig with enabled telemetry (Full)

Notice, that following labconfig contains physical switch NIC names (NIC1 and NIC2) that will be added into vSwitch created by MSLab.

Lab also contains Windows 11. To create VHD, you can [use "CreateParentDisk.ps1" script](/Docs/MSLab-Advanced/creating-parent-disk.md).

```powershell
$LabConfig=@{ DomainAdminName='LabAdmin'; AdminPassword='LS1setup!' ; <#Prefix = 'WSLab-'#> ; DCEdition='4'; Internet=$true ; TelemetryLevel='Full' ; TelemetryNickname='' ; AdditionalNetworksConfig=@(); VMs=@()}
$LabConfig=@{SwitchNics="NIC1","NIC2"; DomainAdminName='LabAdmin'; AdminPassword='LS1setup!' ; <#Prefix = 'WSLab-'#> ; DCEdition='4'; Internet=$true ; TelemetryLevel='Full' ; TelemetryNickname='MDT' ; AdditionalNetworksConfig=@(); VMs=@()}
#MDT machine (GUI is needed as Core does not have WDSUtil)
$LabConfig.VMs += @{ VMName = 'MDT' ; Configuration = 'S2D' ; ParentVHD = 'Win2022_G2.vhdx' ; SSDNumber = 1; SSDSize=1TB ; MGMTNICs=1 }
#optional Windows 11 machine for management
$LabConfig.VMs += @{ VMName = 'Win11' ; ParentVHD = 'Win1121H2_G2.vhdx' ; MGMTNICs=1}
```

# The lab

Run all code from DC. Follow [Scenario.ps1](/Scenarios/AzSHCI%20and%20MDT/Scenario.ps1). Notice one part that needs to be adjusted and ran from hyper-v host (to create empty VMs and boot it)
Run all code from DC or Management machine. Follow [Scenario.ps1](/Scenarios/AzSHCI%20and%20MDT/Scenario.ps1). Notice one part that needs to be adjusted and ran from hyper-v host (to create empty VMs and boot it).

![](/Scenarios/AzSHCI%20and%20MDT/Screenshots/PowerShell_ISE01.png)

## Region download and install binaries
## Region prereqs

This region will download following binaries

![](/Scenarios/AzSHCI%20and%20MDT/Screenshots/Explorer01.png)

and install SQL, ADK and MDT. Note: it will download components from internet as ADK and SQL are just online installers.
and install SQL, ADK and MDT to MDT Server and ADK and MDT to management machine. Note: it will download components from internet as ADK and SQL are just online installers.

![](/Scenarios/AzSHCI%20and%20MDT/Screenshots/Explorer02.png)

## Region configure MDT

This region configures WinPE settings, imports AzSHCI OS, configures SQL to allow named pipes, adds Task Sequence and configures MDT to use database.
This region configures WinPE settings, imports AzSHCI OS, configures SQL to use TCP/IP or named pipes, adds Task Sequence and configures MDT to use database.

![](/Scenarios/AzSHCI%20and%20MDT/Screenshots/MDT01.png)

Expand All @@ -73,7 +89,7 @@ Demonstrates setting up MDT account to be able to access deployment share, and a

## Region configure Bootstrap ini and generate WinPE

Configures bootstrap ini, so when booting WinPE, it uses MDTUser identity and connects to DC to deployment share.
Configures bootstrap ini, so when booting WinPE, it uses MDTUser identity and connects to DC to deployment share. Also PowerShell is enabled in Windows PE.

![](/Scenarios/AzSHCI%20and%20MDT/Screenshots/Explorer03.png)

Expand All @@ -83,14 +99,26 @@ Installs WDS feature, configures WDS to not require F12 for prestaged machines a

![](/Scenarios/AzSHCI%20and%20MDT/Screenshots/PowerShell02.png)

![](/Scenarios/AzSHCI%20and%20MDT/Screenshots/WDS01.png)

## Region Configure MDT monitoring

Creates MDT monitoring Firewall rule and enables monitoring on deployment share.

![](/Scenarios/AzSHCI%20and%20MDT/Screenshots/PowerShell03.png)

## Region replace customsettings.ini ith all DB data to query (wizard output)

![](/Scenarios/AzSHCI%20and%20MDT/Screenshots/MDT08.png)

Same as if you would click on "Configure Database Rules" (with all options selected) as on picture below

![](/Scenarios/AzSHCI%20and%20MDT/Screenshots/MDT07.png)

## Region configure SQL to be able to access it remotely using MDTUSer account

Will configure firewall rule to allow named pipes remote access and will enable MDTAccount as db_datareader using sqlserver powershell module

![](/Scenarios/AzSHCI%20and%20MDT/Screenshots/PowerShell05.png)

## Region Run from Hyper-V Host to create new, empty VMs

Creates 4 VMs in specified directory (you can adjust memory startup bytes, or number of VMs). By default there are 4 VMs, 4GB RAM each. You can adjust VMs down to 1GB if nested virt is not enabled.
Expand All @@ -115,24 +143,22 @@ Since machines booted in order (AzSHCI1 then AzSHCI2 ...) we can simply generate

![](/Scenarios/AzSHCI%20and%20MDT/Screenshots/MDT06.png)

![](/Scenarios/AzSHCI%20and%20MDT/Screenshots/Explorer05.png)

## Region replace customsettings.ini ith all DB data to query (wizard output)
As you can see, WDS will let machine boot if attribute is present

Same as if you would click on "Configure Database Rules" (with all options selected) as on picture below

![](/Scenarios/AzSHCI%20and%20MDT/Screenshots/MDT07.png)
![](/Scenarios/AzSHCI%20and%20MDT/Screenshots/Explorer05.png)

## Region configure SQL to be able to access it remotely using MDTUSer account
It's the same attribute that is displayed in WDS Console. Since WDS management cannot be installed to Win11, screenshot below is from server "MDT".

Will configure firewall rule to allow named pipes remote access and will enable MDTAccount as db_datareader using sqlserver powershell module
![](/Scenarios/AzSHCI%20and%20MDT/Screenshots/Explorer07.png)

![](/Scenarios/AzSHCI%20and%20MDT/Screenshots/PowerShell05.png)
![](/Scenarios/AzSHCI%20and%20MDT/Screenshots/Explorer08.png)

## Reboot machines

(turn off,start) and machines will automatically deploy (as they will boot from pxe

Notice deployment progress in MDT monitoring section

![](/Scenarios/AzSHCI%20and%20MDT/Screenshots/Explorer06.png)
![](/Scenarios/AzSHCI%20and%20MDT/Screenshots/Explorer09.png)

![](/Scenarios/AzSHCI%20and%20MDT/Screenshots/Explorer10.png)
20 changes: 10 additions & 10 deletions Scenarios/S2D and Grafana/Dashboards/AzSHCI-Network_Dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
}
],
"hide": false,
"measurement": "RDMA_Activity",
"measurement": "rdma_activity",
"orderByTime": "ASC",
"policy": "default",
"query": "SELECT mean(\"Bytes_Sent_persec\") FROM \"hyperv_vmnet\" WHERE \"host\" =~ /^$hostname$/ AND \"instance\" =~ /_Network Adapter_/ AND \"instance\" =~ /^$vm_nic$/ AND $timeFilter GROUP BY time($__interval), \"instance\" fill(none)",
Expand Down Expand Up @@ -156,7 +156,7 @@
}
],
"hide": true,
"measurement": "RDMA_Activity",
"measurement": "rdma_activity",
"orderByTime": "ASC",
"policy": "default",
"query": "SELECT mean(\"Bytes_Received_persec\") FROM \"hyperv_vmnet\" WHERE \"host\" =~ /^$hostname$/ AND \"instance\" =~ /_Network Adapter_/ AND \"instance\" =~ /^$vm_nic$/ AND $timeFilter GROUP BY time($__interval), \"instance\" fill(none)",
Expand Down Expand Up @@ -290,7 +290,7 @@
}
],
"hide": false,
"measurement": "RDMA_Activity",
"measurement": "rdma_activity",
"orderByTime": "ASC",
"policy": "default",
"query": "SELECT mean(\"Bytes_Received_persec\") FROM \"hyperv_vmnet\" WHERE \"host\" =~ /^$hostname$/ AND \"instance\" =~ /_Network Adapter_/ AND \"instance\" =~ /^$vm_nic$/ AND $timeFilter GROUP BY time($__interval), \"instance\" fill(none)",
Expand Down Expand Up @@ -343,7 +343,7 @@
}
],
"hide": true,
"measurement": "RDMA_Activity",
"measurement": "rdma_activity",
"orderByTime": "ASC",
"policy": "default",
"query": "SELECT mean(\"Bytes_Sent_persec\") FROM \"hyperv_vmnet\" WHERE \"host\" =~ /^$hostname$/ AND \"instance\" =~ /_Network Adapter_/ AND \"instance\" =~ /^$vm_nic$/ AND $timeFilter GROUP BY time($__interval), \"instance\" fill(none)",
Expand Down Expand Up @@ -490,7 +490,7 @@
}
],
"hide": true,
"measurement": "RDMA_Activity",
"measurement": "rdma_activity",
"orderByTime": "ASC",
"policy": "default",
"query": "SELECT mean(\"Bytes_Received_persec\") FROM \"hyperv_vmnet\" WHERE \"host\" =~ /^$hostname$/ AND \"instance\" =~ /_Network Adapter_/ AND \"instance\" =~ /^$vm_nic$/ AND $timeFilter GROUP BY time($__interval), \"instance\" fill(none)",
Expand Down Expand Up @@ -543,7 +543,7 @@
}
],
"hide": false,
"measurement": "RDMA_Activity",
"measurement": "rdma_activity",
"orderByTime": "ASC",
"policy": "default",
"query": "SELECT mean(\"Bytes_Sent_persec\") FROM \"hyperv_vmnet\" WHERE \"host\" =~ /^$hostname$/ AND \"instance\" =~ /_Network Adapter_/ AND \"instance\" =~ /^$vm_nic$/ AND $timeFilter GROUP BY time($__interval), \"instance\" fill(none)",
Expand Down Expand Up @@ -683,7 +683,7 @@
}
],
"hide": false,
"measurement": "RDMA_Activity",
"measurement": "rdma_activity",
"orderByTime": "ASC",
"policy": "default",
"query": "SELECT mean(\"Bytes_Received_persec\") FROM \"hyperv_vmnet\" WHERE \"host\" =~ /^$hostname$/ AND \"instance\" =~ /_Network Adapter_/ AND \"instance\" =~ /^$vm_nic$/ AND $timeFilter GROUP BY time($__interval), \"instance\" fill(none)",
Expand Down Expand Up @@ -736,7 +736,7 @@
}
],
"hide": true,
"measurement": "RDMA_Activity",
"measurement": "rdma_activity",
"orderByTime": "ASC",
"policy": "default",
"query": "SELECT mean(\"Bytes_Sent_persec\") FROM \"hyperv_vmnet\" WHERE \"host\" =~ /^$hostname$/ AND \"instance\" =~ /_Network Adapter_/ AND \"instance\" =~ /^$vm_nic$/ AND $timeFilter GROUP BY time($__interval), \"instance\" fill(none)",
Expand Down Expand Up @@ -1223,7 +1223,7 @@
"type": "fill"
}
],
"measurement": "RDMA_Activity",
"measurement": "rdma_activity",
"orderByTime": "ASC",
"policy": "default",
"refId": "A",
Expand Down Expand Up @@ -1272,7 +1272,7 @@
"type": "fill"
}
],
"measurement": "RDMA_Activity",
"measurement": "rdma_activity",
"orderByTime": "ASC",
"policy": "default",
"refId": "B",
Expand Down
2 changes: 1 addition & 1 deletion Scripts/3_Deploy.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1057,7 +1057,7 @@ If (-not $isAdmin) {
# If the VM ID is already used create a copy of the DC VM configuration instead of in-place registration
$vm = Get-VM -Id $_.BaseName -ErrorAction SilentlyContinue
if($vm -and $dcCandidates.Length -eq 1) { # allow duplicating of the DC VM only if it is the only one VM in lab folder (as if more than one exists, probably just labprefix was changed after the deployment)
WriteWarning "You are trying to deploy a previously deployed lab from a different location as there is another DC VM with a same VM ID (is this a copied lab folder?) -> this DC VM will be registered with new VM ID."
WriteInfoHighlighted "You are trying to deploy a previously deployed lab from a different location as there is another DC VM with a same VM ID (is this a copied lab folder?) -> this DC VM will be registered with new VM ID."
$directory = $_.Directory.FullName.replace("\Virtual Machines", "")
$DC = Import-VM -Path $_.FullName -GenerateNewId -Copy -VirtualMachinePath $directory -VhdDestinationPath "$directory\Virtual Hard Disks"
WriteInfo "`t`t Virtual Machine $($DC.Name) registered with a new VM ID $($DC.Id)"
Expand Down
2 changes: 1 addition & 1 deletion Scripts/LabConfig.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ $LabConfig=@{ DomainAdminName='LabAdmin'; AdminPassword='LS1setup!'; Prefix = 'M
$LABConfig.VMs += @{
VMName = "$VMNames$_" ;
Configuration = 'S2D' ; # Simple/S2D/Shared/Replica
ParentVHD = 'Win2016Core_G2.vhdx'; # VHD Name from .\ParentDisks folder
ParentVHD = 'Win2022Core_G2.vhdx'; # VHD Name from .\ParentDisks folder
SSDNumber = 0; # Number of "SSDs" (its just simulation of SSD-like sized HDD, just bunch of smaller disks)
SSDSize=800GB ; # Size of "SSDs"
HDDNumber = 12; # Number of "HDDs"
Expand Down
Loading

0 comments on commit bcdfaea

Please sign in to comment.