I'm installing 2510 as instructed in the link below and run the 3 commands that are instructed to be run. (down in the bottom if this post the ws32tm commands is all what the website suggests)
For a better chance of reproducing my problem, I just paste my ps1 here. i will modify the actual ip and dns servers to XXX.XXX.XXX.XXX for privacy and leave everything else as is. After doing so, and running the invoke command i get this:
Bootstrap reported error: AZCMAgent command failed with error: >> exitcode: 42; >> errorcode: AZCM0042 ; >> errormsg: Failed to Create Resource: RequestCorrelationId:ce4c5d43-32d8-4500-a065-281ed1af80d1 Message: The requested resource was not found. Code: HCRP404 httpStatusCode:404 ;. Additional Info: See https://aka.ms/arc/azcmerror
Question: why is the official method coming from microsoft.com causing the error above?
I also tried to install azurecli 2.71 explicitly and add its path to the path and reboot. same result.
Here are the official instructions:
https://learn.microsoft.com/en-us/azure/azure-local/deploy/download-23h2-software?view=azloc-2510
I take that the commands and permissions on the page "Assign required permissions for Azure Local deployment" have to be ran and set 1x in a lifetime of a resource group and never again. Is that right? As they're setting things on the resource group level and that is not being modified after this.
I have a workaround where I'm running 50 different commands on all the nodes but then why is it not in the official method? Install azure cli, install python, add these to some exception, modify secpol, etc, etc.
PLEASE reproduce this. all 6 nics are on the same vlan but those hci trunks are set to vlan0-4096 so the nodes can 'imitate' vlans.
1st PS1:
#VMname
$VMName = "AALocalCZG1"
#Remove IPv6
Invoke-Command -VMName $VMName -Credential $cred -ScriptBlock {Disable-NetAdapterBinding -Name "*" -ComponentID ms_tcpip6}
#Rename NICs on Hyper-V because why not
#1
$Node1macNIC1 = Get-VMNetworkAdapter -VMName $VMName -Name "Mgmt0"
$Node1macNIC1.MacAddress
$Node1finalmacNIC1=$Node1macNIC1.MacAddress|ForEach-Object{($_.Insert(2,"-").Insert(5,"-").Insert(8,"-").Insert(11,"-").Insert(14,"-"))-join " "}
$Node1finalmacNIC1
#6
$Node1macNIC6 = Get-VMNetworkAdapter -VMName $VMName -Name "Mgmt1"
$Node1macNIC6.MacAddress
$Node1finalmacNIC6=$Node1macNIC6.MacAddress|ForEach-Object{($_.Insert(2,"-").Insert(5,"-").Insert(8,"-").Insert(11,"-").Insert(14,"-"))-join " "}
$Node1finalmacNIC6
#2
$Node1macNIC2 = Get-VMNetworkAdapter -VMName $VMName -Name "Comp0"
$Node1macNIC2.MacAddress
$Node1finalmacNIC2=$Node1macNIC2.MacAddress|ForEach-Object{($_.Insert(2,"-").Insert(5,"-").Insert(8,"-").Insert(11,"-").Insert(14,"-"))-join " "}
$Node1finalmacNIC2
#3
$Node1macNIC3 = Get-VMNetworkAdapter -VMName $VMName -Name "Comp1"
$Node1macNIC3.MacAddress
$Node1finalmacNIC3=$Node1macNIC3.MacAddress|ForEach-Object{($_.Insert(2,"-").Insert(5,"-").Insert(8,"-").Insert(11,"-").Insert(14,"-"))-join " "}
$Node1finalmacNIC3
#4
$Node1macNIC4 = Get-VMNetworkAdapter -VMName $VMName -Name "Stor0"
$Node1macNIC4.MacAddress
$Node1finalmacNIC4=$Node1macNIC4.MacAddress|ForEach-Object{($_.Insert(2,"-").Insert(5,"-").Insert(8,"-").Insert(11,"-").Insert(14,"-"))-join " "}
$Node1finalmacNIC4
#5
$Node1macNIC5 = Get-VMNetworkAdapter -VMName $VMName -Name "Stor1"
$Node1macNIC5.MacAddress
$Node1finalmacNIC5=$Node1macNIC5.MacAddress|ForEach-Object{($_.Insert(2,"-").Insert(5,"-").Insert(8,"-").Insert(11,"-").Insert(14,"-"))-join " "}
$Node1finalmacNIC5
#Set NIC Names on the OS
Invoke-Command -VMName $VMName -Credential $cred -ScriptBlock {param($Node1finalmacNIC1) Get-NetAdapter -Physical | Where-Object {$_.MacAddress -eq $Node1finalmacNIC1} | Rename-NetAdapter -NewName "Mgmt0"} -ArgumentList $Node1finalmacNIC1
Invoke-Command -VMName $VMName -Credential $cred -ScriptBlock {param($Node1finalmacNIC6) Get-NetAdapter -Physical | Where-Object {$_.MacAddress -eq $Node1finalmacNIC6} | Rename-NetAdapter -NewName "Mgmt1"} -ArgumentList $Node1finalmacNIC6
Invoke-Command -VMName $VMName -Credential $cred -ScriptBlock {param($Node1finalmacNIC2) Get-NetAdapter -Physical | Where-Object {$_.MacAddress -eq $Node1finalmacNIC2} | Rename-NetAdapter -NewName "Comp0"} -ArgumentList $Node1finalmacNIC2
Invoke-Command -VMName $VMName -Credential $cred -ScriptBlock {param($Node1finalmacNIC3) Get-NetAdapter -Physical | Where-Object {$_.MacAddress -eq $Node1finalmacNIC3} | Rename-NetAdapter -NewName "Comp1"} -ArgumentList $Node1finalmacNIC3
Invoke-Command -VMName $VMName -Credential $cred -ScriptBlock {param($Node1finalmacNIC4) Get-NetAdapter -Physical | Where-Object {$_.MacAddress -eq $Node1finalmacNIC4} | Rename-NetAdapter -NewName "Stor0"} -ArgumentList $Node1finalmacNIC4
Invoke-Command -VMName $VMName -Credential $cred -ScriptBlock {param($Node1finalmacNIC5) Get-NetAdapter -Physical | Where-Object {$_.MacAddress -eq $Node1finalmacNIC5} | Rename-NetAdapter -NewName "Stor1"} -ArgumentList $Node1finalmacNIC5
#Disable DHCP
Invoke-Command -VMName $VMName -Credential $cred -ScriptBlock {Set-NetIPInterface -InterfaceAlias "Mgmt0" -Dhcp Disabled}
Invoke-Command -VMName $VMName -Credential $cred -ScriptBlock {Set-NetIPInterface -InterfaceAlias "Mgmt1" -Dhcp Disabled}
Invoke-Command -VMName $VMName -Credential $cred -ScriptBlock {Set-NetIPInterface -InterfaceAlias "Comp0" -Dhcp Disabled}
Invoke-Command -VMName $VMName -Credential $cred -ScriptBlock {Set-NetIPInterface -InterfaceAlias "Comp1" -Dhcp Disabled}
Invoke-Command -VMName $VMName -Credential $cred -ScriptBlock {Set-NetIPInterface -InterfaceAlias "Stor0" -Dhcp Disabled}
Invoke-Command -VMName $VMName -Credential $cred -ScriptBlock {Set-NetIPInterface -InterfaceAlias "Stor1" -Dhcp Disabled}
#Remove assigned IP addresses
#Get-NetIPInterface | Remove-NetIPAddress -Confirm:$false
#And finally set fix IP for Mgmt0
Invoke-Command -VMName $VMName -Credential $cred -ScriptBlock {New-NetIPAddress -InterfaceAlias "Mgmt0" -IPAddress "XXX.XXX.XXX.71" -PrefixLength 24 -AddressFamily IPv4 -DefaultGateway "XXX.XXX.XXX.1"}
Invoke-Command -VMName $VMName -Credential $cred -ScriptBlock {Set-DnsClientServerAddress -InterfaceAlias "Mgmt0" -ServerAddresses "XXX.XXX.7.15,XXX.XXX.XXX.14,XXX.XXX.XX.70"}
Invoke-Command -VMName $VMName -Credential $cred -ScriptBlock {Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All }
Invoke-Command -VMName $VMName -Credential $cred -ScriptBlock {Install-WindowsFeature -Name Hyper-V -IncludeManagementTools}
Invoke-Command -VMName $VMName -Credential $cred -ScriptBlock {param($VMName) Rename-Computer -NewName $VMName -Restart} -ArgumentList $VMName
2nd PS1 (reboot after 1st PS1 ran)
$domaincontrollerfqdn="vlan7dc.ourdomain.local"
w32tm /config /manualpeerlist:$domaincontrollerfqdn /syncfromflags:manual /reliable:yes /update
w32tm /resync /force
w32tm /query /status
Restart-Computer -Force