티스토리 뷰

Cloud/Cloud Native

minikube start in WSL2

Jacob_baek 2019. 12. 7. 21:08

laptop에서 docker build 환경이 필요하여 wsl2로 convert 하는 작업을 한 후에 minikube를 virtualbox 기반으로 다시 동작 시키려 하자 다음과 같은 에러가 발생되며 minikube를 구동하지 못하였다.

PS C:\Users\jacob> minikube start
* minikube v1.5.2 on Microsoft Windows 10 Pro 10.0.19037 Build 19037
* Creating virtualbox VM (CPUs=2, Memory=4096MB, Disk=20000MB) ...
* Retriable failure: create: precreate: This computer doesn't have VT-X/AMD-v enabled. Enabling it in the BIOS is mandatory
* Creating virtualbox VM (CPUs=2, Memory=4096MB, Disk=20000MB) ...
* Creating virtualbox VM (CPUs=2, Memory=4096MB, Disk=20000MB) ...
* Retriable failure: create: precreate: This computer doesn't have VT-X/AMD-v enabled. Enabling it in the BIOS is mandatory
* Creating virtualbox VM (CPUs=2, Memory=4096MB, Disk=20000MB) ...
* Retriable failure: create: precreate: This computer doesn't have VT-X/AMD-v enabled. Enabling it in the BIOS is mandatory

검색해보니 다음과 같은 이슈가 있었고 hyper-v를 사용하던지 아니면 다음과 같이 vtx check 방식을 사용하지 않는 옵션을 추가해야했다.

하지만 권장된 옵션(--no-vtx-check)를 추가하였음에도 불구 하고 또다른 에러가 발생되었다.

PS C:\Users\jacob> minikube start --no-vtx-check
* minikube v1.5.2 on Microsoft Windows 10 Pro 10.0.19037 Build 19037
* Creating virtualbox VM (CPUs=2, Memory=4096MB, Disk=20000MB) ...
* Retriable failure: create: creating: Unable to start the VM: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe startvm minikube --type headless failed:
VBoxManage.exe: error: Call to WHvSetupPartition failed: ERROR_SUCCESS (Last=0xc000000d/87) (VERR_NEM_VM_CREATE_FAILED)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component ConsoleWrap, interface IConsole

Details: 00:00:04.647016 Power up failed (vrc=VERR_NEM_VM_CREATE_FAILED, rc=E_FAIL (0X80004005))
* Deleting "minikube" in virtualbox ...
* Creating virtualbox VM (CPUs=2, Memory=4096MB, Disk=20000MB) ...
* Retriable failure: create: creating: Unable to start the VM: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe startvm minikube --type headless failed:
VBoxManage.exe: error: Call to WHvSetupPartition failed: ERROR_SUCCESS (Last=0xc000000d/87) (VERR_NEM_VM_CREATE_FAILED)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component ConsoleWrap, interface IConsole

* Deleting "minikube" in virtualbox ...

또 구글링을 해보니 다음과 같은 이슈가 확인되었고 

관리자 권한으로 아래 명령을 수행한후 laptop을 재부팅한 후 모든 이슈가 해결된 상태로 정상동작되었다.

PS C:\WINDOWS\system32> bcdedit /set hypervisorlaunchtype off
작업을 완료했습니다.

 

실제 정상동작된 결과이다.

PS C:\Users\jacob> minikube start --no-vtx-check
* minikube v1.5.2 on Microsoft Windows 10 Pro 10.0.19037 Build 19037
* Creating virtualbox VM (CPUs=2, Memory=4096MB, Disk=20000MB) ...
* Preparing Kubernetes v1.16.2 on Docker '18.09.9' ...
* Pulling images ...
* Launching Kubernetes ...
* Waiting for: apiserver
* Done! kubectl is now configured to use "minikube"

 

안타깝게도 아래 설정으로 인해 wsl이 동작되지 않았다. 확인해보니 wsl2는 hyperv이 동작되어야 하는 이슈가 있는 것으로 보여지며 hypervisorlaunchtype을 auto로 변경하고 정상적으로 wsl 2가 동작하는것을 확인하였다.

PS C:\WINDOWS\system32> bcdedit /set hypervisorlaunchtype off
작업을 완료했습니다.

 

만약 wsl 2와 함께 minikube를 사용해야할 경우 hyper-V로 동작시켜야 한다.

 

'Cloud > Cloud Native' 카테고리의 다른 글

Make Helm chart repo  (0) 2020.07.23
Accident for deleting pvc  (0) 2020.06.23
kubernetes troubleshooting  (0) 2019.11.14
Multi configured kubectl  (0) 2019.10.28
python application deploy with minikube  (0) 2019.09.28
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/04   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
글 보관함