In the ever-evolving landscape of cloud computing, hybrid solutions like Azure Arc and Azure Stack HCI are gaining traction. These technologies offer unique benefits for managing and deploying resources across on-premises, multi-cloud, and edge environments. However, they also come with their own set of challenges. In this blog post series, I’ll delve into the pros and cons of Azure Arc and Azure Stack HCI, and address common issues related to reconnecting nodes when certificates expire. This is all personal experience and my test lab is in no way a production site.
Products that I use in the Arc blog post series, powershell, Windows admincenter, windows server Core, Hyper-v, Azure,Azure stack HCI. and the jumpstart tools.
First I’m a big fan of Windows Admincenter used it from the beta/preview etc. Makes things easier for the admin but on the otherhand I really hate it, as if you can’t set the setting in WAC and have no clue on what is happening, the fix is far away. WAC removes the complexity but also the understanding how stuff is working. Next that you need a tool to do your work same as vcenter, with out vcenter not sure who can operate then vmware. Make sure you understand the logic.
When I started the blog thought quick setup of AVD in HCI, it started that way but then I turned off the workload and waited to long to pickup the work again as the server certificates where expired.

There is no easy fix, Arc agent removal and unregister-azstackhci and reregister and done. So what I did wrong is I delete the resource from Azure, there was an item on delete resource and reinstall. This was a bust never do that

After this the registration was broken. GO to the Cluster node and do azcagent disconnect or uninstall the Arc agent software, all the nodes. Unregister the Cluster

Then register the cluster again. then it all works again. I used this code and it failed on me, if you run this on a cluster node remote powershell
Register-AzStackHCI -SubscriptionId “yournumber” -ComputerName hciboxcluster -Region “westeurope” -TenantId “yournumber”
I removed the Cluster name as this is already a resource runnin on the node so it picked that up and it all worked again.
Register-AzStackHCI -SubscriptionId “yournumber” -Region “westeurope” -TenantId “yournumber”
Currently In Azure there is forced MFA for admins, So if you run this and you connect to Azure if will probaly ask you for log in with MFA, this is not possible on server core with the -devicecode as there is no edge on the server. Use a jumpbox or the management server for that and remote posh into the node, WaC can also be used, But the direct connection worked better for me.
Played also with this code to onboard the Arc when there is noting or older device with versions. make sure you change the subscription id and tenant, resource group
#Register PSGallery as a trusted repo
Register-PSRepository -Default -InstallationPolicy Trusted
Install-Module -Name AzSHCI.ARCInstaller
#Install required PowerShell modules in your node for registration
Install-Module Az.Accounts -RequiredVersion 3.0.0
Install-Module Az.Resources -RequiredVersion 6.12.0
Install-Module Az.ConnectedMachine -RequiredVersion 0.8.0#Install Arc registration script from PSGallery
Install-Module AzsHCI.ARCinstaller -force#Define the subscription where you want to register your server as Arc device
$Subscription = "dyes4"#Define the resource group where you want to register your server as Arc device
$RG = "rg-azurehcibox"#Define the region you will use to register your server as Arc device
$Region = "westeurope"#Define the tenant you will use to register your server as Arc device
$Tenant = "3yes1"#Define the proxy address if your HCI deployment access internet via proxy
#$ProxyServer = "http://proxyaddress:port"#Connect to your Azure account and Subscription
Connect-AzAccount -SubscriptionId $Subscription -TenantId $Tenant -DeviceCode#Get the Access Token for the registration
$ARMtoken = (Get-AzAccessToken).Token#Get the Account ID for the registration
$id = (Get-AzContext).Account.Id#Invoke the registration script. Use a supported region.
Invoke-AzStackHciArcInitialization -SubscriptionID $Subscription -ResourceGroup $RG -TenantID $Tenant -Region $Region -Cloud "AzureCloud" -ArmAccessToken $ARMtoken -AccountID $id #-Proxy $ProxyServer
With all this playing and breaking the Azure Stack HCI and adding this to Azure Arc, and setting up AVD in HCI what is in my next blog, I had a great learning experience. Want to start playing with Azure Stack HCI but don’t have the hardware, you can setup a single box in hyper-v or vmwr or even run a nice VM in Azure all with nexted virtualisation on. get your hands on with the jumpstartbox, I used this also as my starting point.

For so far part 1 , in th next parts I’ll more on Azure stack hci
Hope it was helpful thanks for visiting my blog.
Follow Me on Twitter @ClusterMVP
Follow My blog https://robertsmit.wordpress.com
Linkedin Profile Http://nl.linkedin.com/in/robertsmit