siderolabs / talos

Talos Linux is a modern Linux distribution built for Kubernetes.
https://www.talos.dev
Mozilla Public License 2.0
6.83k stars 544 forks source link

Hypver-V run metal iso failed to bootstrap control plane #8961

Closed wujun4code closed 4 months ago

wujun4code commented 4 months ago

Bug Report

Description

I followed all the steps from https://www.talos.dev/v1.7/talos-guides/install/virtualized-platforms/hyper-v/

New-TalosVM -VMNamePrefix talos-cp -CPUCount 2 -StartupMemory 4GB -SwitchName wired-external -TalosISOPath C:\Users\Jun\Downloads\metal-amd64.iso -NumberOfVMs 1 -VMDestinationBasePath 'D:\VHD\Talos'
$CONTROL_PLANE_IP='192.168.6.120'
talosctl gen config talos-cluster  https://$($CONTROL_PLANE_IP):6443 --output-dir .
talosctl apply-config --insecure --nodes $CONTROL_PLANE_IP --file .\controlplane.yaml

Logs

image

Environment

smira commented 4 months ago

Please follow steps to the very end of the document: https://www.talos.dev/v1.7/talos-guides/install/virtualized-platforms/hyper-v/#bootstrap-cluster

wujun4code commented 4 months ago

@smira Thanks. I did all the steps, but got this -> image

and control plane is stuck at this state -> image

and workers failed to bootstrap either

image

smira commented 4 months ago

The Hyper-V documentation is missing some steps, specifically this: https://www.talos.dev/v1.7/introduction/getting-started/#default-talosconfig-configuration-file

(I would recommend to read the whole getting started guide).

wujun4code commented 4 months ago

@smira Thanks so much, I fixed it.

New-TalosVM -VMNamePrefix talos-cp -CPUCount 2 -StartupMemory 4GB -SwitchName wired-external -TalosISOPath C:\Users\Jun\Downloads\metal-amd64.iso -NumberOfVMs 1 -VMDestinationBasePath 'D:\VHD\Talos'

New-TalosVM -VMNamePrefix talos-worker -CPUCount 4 -StartupMemory 8GB -SwitchName wired-external -TalosISOPath C:\Users\Jun\Downloads\metal-amd64.iso -NumberOfVMs 2 -VMDestinationBasePath 'D:\VHD\Talos' -StorageVHDSize 50GB

$CONTROL_PLANE_IP='192.168.6.145'

talosctl gen config talos-cluster  https://$($CONTROL_PLANE_IP):6443 --output-dir .

talosctl apply-config --insecure --nodes $CONTROL_PLANE_IP --file .\controlplane.yaml

talosctl apply-config --insecure --nodes 192.168.6.142 --file .\worker.yaml
talosctl apply-config --insecure --nodes 192.168.6.143 --file .\worker.yaml

talosctl bootstrap --nodes $CONTROL_PLANE_IP --endpoints $CONTROL_PLANE_IP --talosconfig=./talosconfig

talosctl kubeconfig --nodes $CONTROL_PLANE_IP --endpoints $CONTROL_PLANE_IP --talosconfig=./talosconfig