Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IP not found #20128

Open
VijayVJ4500 opened this issue Dec 17, 2024 · 1 comment
Open

IP not found #20128

VijayVJ4500 opened this issue Dec 17, 2024 · 1 comment

Comments

@VijayVJ4500
Copy link

What Happened?

W1217 16:35:32.396161 19780 out.go:270] * Failed to start hyperv VM. Running "minikube delete" may fix it: provision: IP not found

  • Failed to start hyperv VM. Running "minikube delete" may fix it: provision: IP not found
    I1217 16:35:32.399553 19780 out.go:201]

W1217 16:35:32.400089 19780 out.go:270] X Exiting due to GUEST_PROVISION: error provisioning guest: Failed to start host: provision: IP not found
X Exiting due to GUEST_PROVISION: error provisioning guest: Failed to start host: provision: IP not found
W1217 16:35:32.400089 19780 out.go:270] *
*
W1217 16:35:32.401820 19780 out.go:293] ╭─────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ * If the above advice does not help, please let us know: │
https://github.com/kubernetes/minikube/issues/new/choose
│ │
│ * Please run minikube logs --file=logs.txt and attach logs.txt to the GitHub issue. │
│ │
╰─────────────────────────────────────────────────────────────────────────────────────────────╯
╭─────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ * If the above advice does not help, please let us know: │
https://github.com/kubernetes/minikube/issues/new/choose
│ │
│ * Please run minikube logs --file=logs.txt and attach logs.txt to the GitHub issue. │
│ │
╰─────────────────────────────────────────────────────────────────────────────────────────────╯
I1217 16:35:32.402441 19780 out.go:201]

PS C:\WINDOWS\system32> minikube logs --file=logs.txt

X Exiting due to DRV_CP_ENDPOINT: Unable to get control-plane node minikube endpoint: failed to lookup ip for ""

  • Suggestion:

    Recreate the cluster by running:
    minikube delete
    minikube start

Attach the log file

W1217 16:35:32.396161 19780 out.go:270] * Failed to start hyperv VM. Running "minikube delete" may fix it: provision: IP not found

  • Failed to start hyperv VM. Running "minikube delete" may fix it: provision: IP not found
    I1217 16:35:32.399553 19780 out.go:201]

W1217 16:35:32.400089 19780 out.go:270] X Exiting due to GUEST_PROVISION: error provisioning guest: Failed to start host: provision: IP not found
X Exiting due to GUEST_PROVISION: error provisioning guest: Failed to start host: provision: IP not found
W1217 16:35:32.400089 19780 out.go:270] *
*
W1217 16:35:32.401820 19780 out.go:293] ╭─────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ * If the above advice does not help, please let us know: │
https://github.com/kubernetes/minikube/issues/new/choose
│ │
│ * Please run minikube logs --file=logs.txt and attach logs.txt to the GitHub issue. │
│ │
╰─────────────────────────────────────────────────────────────────────────────────────────────╯
╭─────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ * If the above advice does not help, please let us know: │
https://github.com/kubernetes/minikube/issues/new/choose
│ │
│ * Please run minikube logs --file=logs.txt and attach logs.txt to the GitHub issue. │
│ │
╰─────────────────────────────────────────────────────────────────────────────────────────────╯
I1217 16:35:32.402441 19780 out.go:201]

PS C:\WINDOWS\system32> minikube logs --file=logs.txt

X Exiting due to DRV_CP_ENDPOINT: Unable to get control-plane node minikube endpoint: failed to lookup ip for ""

  • Suggestion:

    Recreate the cluster by running:
    minikube delete
    minikube start

Operating System

Windows

Driver

Hyper-V

@ljluestc
Copy link

ljluestc commented Mar 8, 2025


# Save as Fix-Minikube-HyperV.ps1

# Run as Administrator
if (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
    Write-Host "Please run this script as Administrator" -ForegroundColor Red
    exit
}

# Check if Hyper-V is enabled
$hyperv = Get-WindowsOptionalFeature -Online | Where-Object {$_.FeatureName -eq "Microsoft-Hyper-V-All"}
if ($hyperv.State -ne "Enabled") {
    Write-Host "Enabling Hyper-V..."
    Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All -NoRestart
    Write-Host "Please restart your computer and run this script again." -ForegroundColor Yellow
    exit
}

# Stop and delete existing Minikube cluster
Write-Host "Cleaning up existing Minikube cluster..."
minikube stop
minikube delete

# Check for Hyper-V virtual switch
$switchName = "MinikubeSwitch"
$switch = Get-VMSwitch -Name $switchName -ErrorAction SilentlyContinue
if (-not $switch) {
    Write-Host "Creating Hyper-V virtual switch: $switchName"
    $adapter = Get-NetAdapter | Where-Object {$_.Status -eq "Up"} | Select-Object -First 1
    if (-not $adapter) {
        Write-Host "No active network adapter found. Please connect to a network and try again." -ForegroundColor Red
        exit
    }
    New-VMSwitch -Name $switchName -NetAdapterName $adapter.Name -AllowManagementOS $true
}

# Start Minikube with Hyper-V
Write-Host "Starting Minikube with Hyper-V driver..."
minikube start --driver=hyperv --hyperv-virtual-switch=$switchName --alsologtostderr -v=9 *> minikube-start.log

# Check Minikube status
$status = minikube status --format="{{.Host}} {{.Kubelet}} {{.APIServer}}"
if ($status -eq "Running Running Running") {
    Write-Host "Minikube started successfully!" -ForegroundColor Green
    minikube ip
} else {
    Write-Host "Minikube failed to start. Check minikube-start.log for details." -ForegroundColor Red
    Write-Host "Run 'minikube logs --file=logs.txt' and review logs.txt for more info."
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants