aks-hybrid icon indicating copy to clipboard operation
aks-hybrid copied to clipboard

Issues configuring AKS on Server 2022

Open Jarod1662 opened this issue 1 year ago • 3 comments

Trying to setup the Azure Kubernetes Service for evaluation and have hit a roadblock!

I originally started to configure the service using Windows Admin Center and each time it get's to the validation stage it hangs at the Validate KVA test, thinking it maybe hardware related I made some changes but still hangs at this step.

Looking around online, I decided to go down the powershell route to try and get this setup however I'm hitting the same issue here even with a clean setup! image

Inspecting the control-plane VM it appears to be complaining about invalid configuration and unable to run various scripts. image

Any one experience this before and know how to get round this?

NOTE - Looking at a single node on Windows Server as a PoC

Jarod1662 avatar Dec 12 '23 14:12 Jarod1662

@Jarod1662 - looks like Hyper-V is not "ready". The KVA check creates a virtual machine and tries to reach it. If the VirtualSwitch is misconfigured it doesn't work. Same issue as here: https://github.com/Azure/aksArc/issues/363

Do you test on hardware or a virtual machine with nested virtualization?

Elektronenvolt avatar Dec 12 '23 17:12 Elektronenvolt

@Jarod1662 - looks like Hyper-V is not "ready". The KVA check creates a virtual machine and tries to reach it. If the VirtualSwitch is misconfigured it doesn't work. Same issue as here: #363

Do you test on hardware or a virtual machine with nested virtualization?

Interesting! I was following some guides online and used their proposed network configuration for the adapter! They all seem to use roughly the same addresses

This is being done inside a virtual machine with nested virtualization

Jarod1662 avatar Dec 12 '23 17:12 Jarod1662

The Aks Hybrid docs expect that you have your underlying Hyper-V configured correctly. For nested virtualization you need to turn on MacSpoofing as documented here: Run Hyper-V in a Virtual Machine with Nested Virtualization

I have test setups running in Windows Server 2022 with nested virtualization - you can do:

  • Create a virtual switch and connect it to external network
  • disable 'Allow management operating system to share this network adapter'
  • don't use a VLAN ID
  • shutdown the VM and enable MAC spoofing on that network adapter Get-VMNetworkAdapter -VMName <VMName> | Set-VMNetworkAdapter -MacAddressSpoofing On

Elektronenvolt avatar Dec 13 '23 11:12 Elektronenvolt