kubernetes / minikube

Run Kubernetes locally
https://minikube.sigs.k8s.io/
Apache License 2.0
29.17k stars 4.87k forks source link

Unable to start on Azure VM with Windows Server 2019 #12965

Closed alexsimon1 closed 2 years ago

alexsimon1 commented 2 years ago

Hello,

im trying to start minikube but but i get errors later on in minikube status.

PS C:\kubernetes> minikube status E1116 14:49:53.665506 4884 status.go:350] failed to get driver ip: getting IP: IP not found E1116 14:49:53.665683 4884 status.go:258] status error: getting IP: IP not found minikube type: Control Plane host: Error kubelet: Nonexistent apiserver: Nonexistent kubeconfig: Nonexistent

For start I used this command:

PS C:> minikube start --vm-driver=hyperv --hyperv-virtual-switch=nat --alsologtostderr --v=2

Here are the logs:

I1116 13:41:56.811573 9680 out.go:297] Setting OutFile to fd 68 ... I1116 13:41:56.899591 9680 out.go:344] TERM=,COLORTERM=, which probably does not support color I1116 13:41:56.900589 9680 out.go:310] Setting ErrFile to fd 88... I1116 13:41:56.900589 9680 out.go:344] TERM=,COLORTERM=, which probably does not support color I1116 13:41:56.911569 9680 out.go:304] Setting JSON to false I1116 13:41:56.916363 9680 start.go:112] hostinfo: {"hostname":"SHG-System","uptime":13527,"bootTime":1637056589,"procs":152,"os":"windows","platform":"Microsoft Windows Server 2019 Datacenter","platformFamily":"Server","platformVersion":"10.0.17763 Build 17763","kernelVersion":"10.0.17763 Build 17763","kernelArch":"x86_64","virtualizationSystem":"","virtualizationRole":"","hostId":"34ff275e-ae82-4c09-b77d-2fe6bdae41c1"} W1116 13:41:56.917786 9680 start.go:120] gopshost.Virtualization returned error: not implemented yet I1116 13:41:56.929432 9680 out.go:176] * minikube v1.24.0 on Microsoft Windows Server 2019 Datacenter 10.0.17763 Build 17763

I1116 13:42:01.056329 9680 main.go:130] libmachine: [stderr =====>] : I1116 13:42:01.058982 9680 main.go:130] libmachine: [executing ==>] : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive @([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole(([System.Security.Principal.SecurityIdentifier]::new("S-1-5-32-578")))

I1116 13:42:01.439661 9680 main.go:130] libmachine: [stderr =====>] : I1116 13:42:01.441129 9680 main.go:130] libmachine: [executing ==>] : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive @([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")

I1116 13:42:01.837755 9680 main.go:130] libmachine: [stderr =====>] : I1116 13:42:01.840145 9680 main.go:130] libmachine: [executing ==>] : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive [Console]::OutputEncoding = [Text.Encoding]::UTF8; ConvertTo-Json @(Hyper-V\Get-VMSwitch|Select Id, Name, SwitchType|Where-Object {$_.Name -eq 'nat'}|Sort-Object -Property SwitchType -Descending) \ I1116 13:42:04.048541 9680 main.go:130] libmachine: [stdout =====>] : [ { "Id": "bfbfef74-fd29-43aa-8120-334e1a66f9d1", "Name": "nat", "SwitchType": 0 } ]

I1116 13:42:04.050015 9680 main.go:130] libmachine: [stderr =====>] : I1116 13:42:04.057750 9680 main.go:130] libmachine: Downloading C:\Users\ASI.minikube\cache\boot2docker.iso from fil e://C:/Users/ASI/.minikube/cache/iso/minikube-v1.24.0.iso...

I1116 13:42:05.261534 9680 main.go:130] libmachine: [stderr =====>] : I1116 13:42:05.264975 9680 main.go:130] libmachine: Creating VHD I1116 13:42:05.266434 9680 main.go:130] libmachine: [executing ==>] : C:\Windows\System32\WindowsPowerShell\v1.0\powe rshell.exe -NoProfile -NonInteractive Hyper-V\New-VHD -Path 'C:\Users\ASI.minikube\machines\minikube\fixed.vhd' -SizeBy tes 10MB -Fixed / I1116 13:42:07.138608 9680 main.go:130] libmachine: [stdout =====>] :

ComputerName : SHG-System Path : C:\Users\ASI.minikube\machines\minikube\fixed.vhd VhdFormat : VHD VhdType : Fixed FileSize : 10486272 Size : 10485760 MinimumSize : LogicalSectorSize : 512 PhysicalSectorSize : 512 BlockSize : 0 ParentPath : DiskIdentifier : 8DDC18C8-6252-4524-B1BB-CF931C8A5780 FragmentationPercentage : 0 Alignment : 1 Attached : False DiskNumber : IsPMEMCompatible : False AddressAbstractionType : None Number :

I1116 13:42:07.143919 9680 main.go:130] libmachine: [stderr =====>] : I1116 13:42:07.147491 9680 main.go:130] libmachine: Writing magic tar header I1116 13:42:07.148484 9680 main.go:130] libmachine: Writing SSH key tar header I1116 13:42:07.159096 9680 main.go:130] libmachine: [executing ==>] : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive Hyper-V\Convert-VHD -Path 'C:\Users\ASI.minikube\machines\minikube\fixed.vhd' -DestinationPath 'C:\Users\ASI.minikube\machines\minikube\disk.vhd' -VHDType Dynamic -DeleteSource / I1116 13:42:09.135757 9680 main.go:130] libmachine: [stdout =====>] : I1116 13:42:09.136002 9680 main.go:130] libmachine: [stderr =====>] : I1116 13:42:09.136751 9680 main.go:130] libmachine: [executing ==>] : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive Hyper-V\Resize-VHD -Path 'C:\Users\ASI.minikube\machines\minikube\disk.vhd' -SizeBytes 20000MB

I1116 13:42:12.806285 9680 main.go:130] libmachine: [stderr =====>] : I1116 13:42:12.809692 9680 main.go:130] libmachine: [executing ==>] : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive Hyper-V\Set-VMMemory -VMName minikube -DynamicMemoryEnabled $false / I1116 13:42:13.758135 9680 main.go:130] libmachine: [stdout =====>] : I1116 13:42:13.758694 9680 main.go:130] libmachine: [stderr =====>] : I1116 13:42:13.761850 9680 main.go:130] libmachine: [executing ==>] : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive Hyper-V\Set-VMProcessor minikube -Count 2 \ I1116 13:42:14.776123 9680 main.go:130] libmachine: [stdout =====>] : I1116 13:42:14.776758 9680 main.go:130] libmachine: [stderr =====>] : I1116 13:42:14.780211 9680 main.go:130] libmachine: [executing ==>] : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive Hyper-V\Set-VMDvdDrive -VMName minikube -Path 'C:\Users\ASI.minikube\machines\minikube\boot2docker.iso'

I1116 13:42:20.527794 9680 main.go:130] libmachine: [stderr =====>] : I1116 13:42:20.530353 9680 main.go:130] libmachine: [executing ==>] : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive (( Hyper-V\Get-VM minikube ).networkadapters[0]).ipaddresses[0] / I1116 13:42:22.523623 9680 main.go:130] libmachine: [stdout =====>] : I1116 13:42:22.523787 9680 main.go:130] libmachine: [stderr =====>] : \ I1116 13:42:23.535700 9680 main.go:130] libmachine: [executing ==>] : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive ( Hyper-V\Get-VM minikube ).state

Thanks for the help.

Alex

RA489 commented 2 years ago

/kind support

sharifelgamal commented 2 years ago

The logs you posted don't seem to be the complete logs, since it just stops partway through the creation of the Hyper-V VM. It is pretty clear that the VM hasn't been created successfully based on the minikube status output (whatever IP address is listed in the minikube config clearly isn't actually there), but without more detailed logs it'll be hard to debug.

Could you run minikube logs --file=logs.txt and attached it here so we can take a look?

klaases commented 2 years ago

Hi @alexsimon1 – is this issue still occurring? Are additional details available? If so, please feel free to re-open the issue by commenting with /reopen. This issue will be closed as additional information was unavailable and some time has passed.

Additional information that may be helpful:

Thank you for sharing your experience!

AAATechGuy commented 2 years ago

/reopen

k8s-ci-robot commented 2 years ago

@AAATechGuy: You can't reopen an issue/PR unless you authored it or you are a collaborator.

In response to [this](https://github.com/kubernetes/minikube/issues/12965#issuecomment-1037822549): >/reopen Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.