diff --git a/HandsOnLabs/05-SimplifiedMachineProvisioning/media/configurator01.png b/HandsOnLabs/05-SimplifiedMachineProvisioning/media/configurator01.png new file mode 100644 index 00000000..c68649b8 Binary files /dev/null and b/HandsOnLabs/05-SimplifiedMachineProvisioning/media/configurator01.png differ diff --git a/HandsOnLabs/05-SimplifiedMachineProvisioning/media/configurator02.png b/HandsOnLabs/05-SimplifiedMachineProvisioning/media/configurator02.png new file mode 100644 index 00000000..9d1ce709 Binary files /dev/null and b/HandsOnLabs/05-SimplifiedMachineProvisioning/media/configurator02.png differ diff --git a/HandsOnLabs/05-SimplifiedMachineProvisioning/media/configurator03.png b/HandsOnLabs/05-SimplifiedMachineProvisioning/media/configurator03.png new file mode 100644 index 00000000..92727c03 Binary files /dev/null and b/HandsOnLabs/05-SimplifiedMachineProvisioning/media/configurator03.png differ diff --git a/HandsOnLabs/05-SimplifiedMachineProvisioning/media/edge01.png b/HandsOnLabs/05-SimplifiedMachineProvisioning/media/edge01.png new file mode 100644 index 00000000..1e4487e5 Binary files /dev/null and b/HandsOnLabs/05-SimplifiedMachineProvisioning/media/edge01.png differ diff --git a/HandsOnLabs/05-SimplifiedMachineProvisioning/media/edge02.png b/HandsOnLabs/05-SimplifiedMachineProvisioning/media/edge02.png new file mode 100644 index 00000000..01bd918c Binary files /dev/null and b/HandsOnLabs/05-SimplifiedMachineProvisioning/media/edge02.png differ diff --git a/HandsOnLabs/05-SimplifiedMachineProvisioning/media/edge03.png b/HandsOnLabs/05-SimplifiedMachineProvisioning/media/edge03.png new file mode 100644 index 00000000..4cc8681a Binary files /dev/null and b/HandsOnLabs/05-SimplifiedMachineProvisioning/media/edge03.png differ diff --git a/HandsOnLabs/05-SimplifiedMachineProvisioning/media/edge04.png b/HandsOnLabs/05-SimplifiedMachineProvisioning/media/edge04.png new file mode 100644 index 00000000..97f84470 Binary files /dev/null and b/HandsOnLabs/05-SimplifiedMachineProvisioning/media/edge04.png differ diff --git a/HandsOnLabs/05-SimplifiedMachineProvisioning/media/edge05.png b/HandsOnLabs/05-SimplifiedMachineProvisioning/media/edge05.png new file mode 100644 index 00000000..fa79b5eb Binary files /dev/null and b/HandsOnLabs/05-SimplifiedMachineProvisioning/media/edge05.png differ diff --git a/HandsOnLabs/05-SimplifiedMachineProvisioning/media/edge06.png b/HandsOnLabs/05-SimplifiedMachineProvisioning/media/edge06.png new file mode 100644 index 00000000..c6f7c245 Binary files /dev/null and b/HandsOnLabs/05-SimplifiedMachineProvisioning/media/edge06.png differ diff --git a/HandsOnLabs/05-SimplifiedMachineProvisioning/media/edge07.png b/HandsOnLabs/05-SimplifiedMachineProvisioning/media/edge07.png new file mode 100644 index 00000000..bf5ebbc7 Binary files /dev/null and b/HandsOnLabs/05-SimplifiedMachineProvisioning/media/edge07.png differ diff --git a/HandsOnLabs/05-SimplifiedMachineProvisioning/media/edge08.png b/HandsOnLabs/05-SimplifiedMachineProvisioning/media/edge08.png new file mode 100644 index 00000000..e1afe925 Binary files /dev/null and b/HandsOnLabs/05-SimplifiedMachineProvisioning/media/edge08.png differ diff --git a/HandsOnLabs/05-SimplifiedMachineProvisioning/media/edge09.png b/HandsOnLabs/05-SimplifiedMachineProvisioning/media/edge09.png new file mode 100644 index 00000000..25232664 Binary files /dev/null and b/HandsOnLabs/05-SimplifiedMachineProvisioning/media/edge09.png differ diff --git a/HandsOnLabs/05-SimplifiedMachineProvisioning/media/edge10.png b/HandsOnLabs/05-SimplifiedMachineProvisioning/media/edge10.png new file mode 100644 index 00000000..3b0f4796 Binary files /dev/null and b/HandsOnLabs/05-SimplifiedMachineProvisioning/media/edge10.png differ diff --git a/HandsOnLabs/05-SimplifiedMachineProvisioning/media/explorer01.png b/HandsOnLabs/05-SimplifiedMachineProvisioning/media/explorer01.png new file mode 100644 index 00000000..646a1853 Binary files /dev/null and b/HandsOnLabs/05-SimplifiedMachineProvisioning/media/explorer01.png differ diff --git a/HandsOnLabs/05-SimplifiedMachineProvisioning/media/explorer02.png b/HandsOnLabs/05-SimplifiedMachineProvisioning/media/explorer02.png new file mode 100644 index 00000000..07b6f5bc Binary files /dev/null and b/HandsOnLabs/05-SimplifiedMachineProvisioning/media/explorer02.png differ diff --git a/HandsOnLabs/05-SimplifiedMachineProvisioning/media/hvconnect01.png b/HandsOnLabs/05-SimplifiedMachineProvisioning/media/hvconnect01.png new file mode 100644 index 00000000..b6827deb Binary files /dev/null and b/HandsOnLabs/05-SimplifiedMachineProvisioning/media/hvconnect01.png differ diff --git a/HandsOnLabs/05-SimplifiedMachineProvisioning/media/hvconnect02.png b/HandsOnLabs/05-SimplifiedMachineProvisioning/media/hvconnect02.png new file mode 100644 index 00000000..bc29fb25 Binary files /dev/null and b/HandsOnLabs/05-SimplifiedMachineProvisioning/media/hvconnect02.png differ diff --git a/HandsOnLabs/05-SimplifiedMachineProvisioning/media/hvmanager01.png b/HandsOnLabs/05-SimplifiedMachineProvisioning/media/hvmanager01.png new file mode 100644 index 00000000..f321b880 Binary files /dev/null and b/HandsOnLabs/05-SimplifiedMachineProvisioning/media/hvmanager01.png differ diff --git a/HandsOnLabs/05-SimplifiedMachineProvisioning/media/powershell01.png b/HandsOnLabs/05-SimplifiedMachineProvisioning/media/powershell01.png new file mode 100644 index 00000000..46d5afde Binary files /dev/null and b/HandsOnLabs/05-SimplifiedMachineProvisioning/media/powershell01.png differ diff --git a/HandsOnLabs/05-SimplifiedMachineProvisioning/media/powershell02.png b/HandsOnLabs/05-SimplifiedMachineProvisioning/media/powershell02.png new file mode 100644 index 00000000..7b46a95a Binary files /dev/null and b/HandsOnLabs/05-SimplifiedMachineProvisioning/media/powershell02.png differ diff --git a/HandsOnLabs/05-SimplifiedMachineProvisioning/readme.md b/HandsOnLabs/05-SimplifiedMachineProvisioning/readme.md new file mode 100644 index 00000000..d1bd2897 --- /dev/null +++ b/HandsOnLabs/05-SimplifiedMachineProvisioning/readme.md @@ -0,0 +1,149 @@ +# Simplified Machine Provisioning (Preview) + + + + +## About the lab + +In this lab you will learn about [Simplified Machine Provisioning](https://techcommunity.microsoft.com/blog/azurearcblog/announcing-public-preview-simplified-machine-provisioning-for-azure-local/4496811) + +Simplified provisioning creates .pem file (ownership voucher) if booted from USB. In this scenario (just to test it) we will boot from iso and pick up ownership voucher using scp or/and with [Configurator App for Azure Local](https://aka.ms/ConfiguratorAppForHCI) + +## Prerequisites + +As prerequisite, download provision-os.iso that is part of [provisioning package](https://aka.ms/provision/software/2604). You can download up-to-date version at https://portal.azure.com/#servicemenu/Microsoft_Azure_ArcCenterUX/AzureArcCenterHub/provisioningGetStarted + +The ISO needs to be placed in your ParentDisks folder + +![](./media/explorer01.png) + +## Labconfig + +This labconfig will provision two SMP (Simplified Machine Provisioning) servers with memorystartupbytes 4GB (if you plan to deploy Azure Local instance, increase it to at least 16GB) + +Notice, that secureboot is disabled + +```PowerShell +$LabConfig=@{AllowedVLANs="1-10,711-719" ; DomainAdminName='LabAdmin'; AdminPassword='LS1setup!'; DCEdition='4'; Internet=$true ; AdditionalNetworksConfig=@(); VMs=@()} + +#labconfig for nested virtualization (eith enough RAM to create ARC RB). +$LABConfig.VMs += @{ VMName = "SMPNode1" ; Configuration = 'S2D' ; AttachISO = 'provision-os.iso' ;SecureBoot="Disabled"; HDDNumber = 4 ; HDDSize= 2TB ; MemoryStartupBytes= 4GB; VMProcessorCount="Max" ; vTPM=$true ; NestedVirt=$true } +$LABConfig.VMs += @{ VMName = "SMPNode2" ; Configuration = 'S2D' ; AttachISO = 'provision-os.iso' ;SecureBoot="Disabled"; HDDNumber = 4 ; HDDSize= 2TB ; MemoryStartupBytes= 4GB; VMProcessorCount="Max" ; vTPM=$true ; NestedVirt=$true } + +#Management machine +$LabConfig.VMs += @{ VMName = 'Management' ; ParentVHD = 'Win2025_G2.vhdx'; MGMTNICs=1 ; AddToolsVHD=$True } + +``` + +![](./media/hvmanager01.png) + +## Scenario + +### Task01 - collect ownership vouchers + +#### Step01 - connect to SMB Nodes console + + Once lab will start, open console to each of the SMP node and note the IP Address + + ![](./media/hvconnect01.png) + + In this case, Servers have IP addresses 10.0.0.13 and 16. Let's use it in below script to pull ownership vouchers + +#### Step02 - connect to Management machine + +Log in into management machine (LabAdmin/LS1setup) and run following command from PowerShell to collect ownership vouchers to download folder. + +Modify IP addresses as needed. + +```PowerShell + $Servers="10.0.0.16","10.0.0.18" + $username="edgeuser" + #password Password1 + foreach ($Server in $Servers){ + #create folder to download key + new-item -ItemType directory -name $server -Path $env:userprofile\Downloads -ErrorAction Ignore + scp -r $username@$server`:/var/staging/export/vouchers/**/*.pem $env:userprofile\Downloads\$server + } + +``` + +The shell will ask if you trust the fingerprint. Simply type yes + +Once asked for password, type Password1 + +![](./media/powershell01.png) + +![](./media/powershell02.png) + +#### Step03 - validate if vouchers were downloaded + +If pem files were successfully downloaded, you should be able to see it in Downloads folder + +![](./media/explorer02.png) + +#### Step04 - download vouchers using Configurator App for Azure Local + +In management machine, navigate to https://aka.ms/ConfiguratorAppForHCI and open the package to install Configurator app. It will also ask you to install .Net 9.0 Desktop runtime + +In Configurator App, specify the IP Address into the Machine Name. + +![](./media/configurator01.png) + +Username and password, specify edgeuser/Password1 + +![](./media/configurator02.png) + +Now you can download ownership voucher + +![](./media/configurator03.png) + + + +### Task02 - Add provisioned machines into portal + +#### Step01 - Create Site + +In Azure Portal, navigate to (Azure Arc Site Manager)[https://portal.azure.com/#servicemenu/Microsoft_Azure_ArcCenterUX/AzureArcCenterHub/sitesOverview] + +If you dont have site yet, you'll need to create one per Subscription and one per ResourceGroup as on picture below. + +![](./media/edge01.png) + +#### Step02 - Add Arc machines + +In Azure Portal, navigate to (Azure Arc Machine provisioning)[https://portal.azure.com/#servicemenu/Microsoft_Azure_ArcCenterUX/AzureArcCenterHub/arcProvisioningDevices] and click on Provision + +![](./media/edge02.png) + +In Site select site you created (in this case MSLab) and add provisioned machines (vouchers) + +![](./media/edge03.png) + +You can also rename machines (SMPNode1/SMPNode2) + +![](./media/edge04.png) + +And don't forget to select Azure Local image + +![](./media/edge05.png) + + +Create Key vault and provide local admin password + +![](./media/edge06.png) + +Once deployed, Azure Local OS will be installed + +#### Step03 - Monitor Installation + +Connect to SMPNode1/SMPNode2 and to Azure Portal (Arc Provisioning)[https://portal.azure.com/#servicemenu/Microsoft_Azure_ArcCenterUX/AzureArcCenterHub/arcProvisioningDevices] to check the status + +![](./media/edge07.png) + +![](./media/edge08.png) + +![](./media/edge09.png) + +### Task03 - Create new cluster + +You can use steps from [02-Deploying Azure Local](../../HandsOnLabs/02-DeployingAzureLocal/readme.md) \ No newline at end of file diff --git a/README.md b/README.md index 80c4ba96..4ab2bcb2 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ Originally I developed Hands-on Labs when I was working for Dell at https://gith * [02 Deploying Azure Local](HandsOnLabs/02-DeployingAzureLocal/) * [03 Rack Level Nested Mirror S2D Cluster (Insider Preview)](HandsOnLabs/03-RackLevelNestedMirror/) * [04 Volumes Deep Dive](HandsOnLabs/04-VolumesDeepDive/) +* [05 Simplified Machine Provisioning](HandsOnLabs/05-SimplifiedMachineProvisioning/) ## Introduction diff --git a/Scripts/3_Deploy.ps1 b/Scripts/3_Deploy.ps1 index e1906f19..2d08dbf9 100644 --- a/Scripts/3_Deploy.ps1 +++ b/Scripts/3_Deploy.ps1 @@ -437,7 +437,13 @@ If (-not $isAdmin) { New-VHD -ParentPath $serverparent.fullname -Path $vhdpath }else{ WriteInfo "`t Creating blank OS VHD" - New-VHD -Path $vhdpath -SizeBytes 127GB + if ($VMConfig.BlankVHDSize){ + WriteInfo "`t`t Blank OS VHD Size is $($VMConfig.BlankVHDSize)" + New-VHD -Path $vhdpath -SizeBytes $VMConfig.BlankVHDSize + }else{ + WriteInfo "`t`t Blank OS VHD Size is default - 250GB" + New-VHD -Path $vhdpath -SizeBytes 250GB + } } if ($VMConfig.VMVersion){ @@ -585,7 +591,13 @@ If (-not $isAdmin) { WriteInfo "`t VM Version is $($BuildVersion.Build).$($BuildVersion.Revision)" }else{ WriteInfo "`t Creating blank OS VHD" - New-VHD -Path $vhdpath -SizeBytes 127GB + if ($VMConfig.BlankVHDSize){ + WriteInfo "`t`t Blank OS VHD Size is $($VMConfig.BlankVHDSize)" + New-VHD -Path $vhdpath -SizeBytes $VMConfig.BlankVHDSize + }else{ + WriteInfo "`t`t Blank OS VHD Size is default - 250GB" + New-VHD -Path $vhdpath -SizeBytes 250GB + } } WriteInfo "`t Creating VM" diff --git a/Scripts/LabConfig.ps1 b/Scripts/LabConfig.ps1 index c9209aeb..5b8990c3 100644 --- a/Scripts/LabConfig.ps1 +++ b/Scripts/LabConfig.ps1 @@ -358,6 +358,10 @@ $LabConfig=@{AllowedVLANs="1-10,711-719" ; DomainAdminName='LabAdmin'; AdminPass enables/disables secure boot for VM possible values: windows,linux,disabled Default: windows for windows machines, disabled for linux VMs + + #BlankVHDSize + Example BlankVHDSize="250GB" + If ParentVHD is not specified, then new blank VHD will be created with this size. Default is 250GB #> #endregion