개발 팁

[Mac] Apple M3에서 Rancher Desktop 사용 시, host agent is running but driver is not 오류 해결 경험

TwinParadox 2024. 1. 11. 08:28
728x90

2022년 1월까지 유예기간을 끝으로 Docker Desktop이 유료화되고,

라이선스 이슈가 있는 곳들은 유료 플랜을 사용하거나 다른 대응 방안을 이용해서 Docker 환경을 구축하고 있다.

 

Docker Desktop 유료화 대응 방법을 다룬 포스트들 대부분이 Virtual Box + minikube(적용 방법)를 활용하였는데,

당시 실리콘 맥(M1, M2, M3)에서는 VirtualBox는 프리뷰 버전이었고, minikube는 지원하지 않는 이슈가 있었다.

그래서 다른 대안인 Rancher Desktop(적용 방법)를 사용했었다.

현재 minikube는 지원하는 것 같고, Qemu 에뮬레이터를 이용한 방법 등으로 적용 가능한 것 같다.
Qemu + minikube 적용 방법

 


기존에 하던 것 그대로 하는 게 편하기 때문에, M1, M2에서 하던 것처럼 M3에서도 Rancher Desktop을 사용하려 했는데,

환경을 세팅하려는 과정에서 다음과 같은 에러를 마주했다.

Error: /Applications/Rancher Desktop.app/Contents/Resources/resources/darwin/lima/bin/limactl.ventura exited with code 1
'--tty=false',
    '0'
  ],
  stdout: '',
  stderr: 'time="2024-01-09T12:57:09+08:00" level=info msg="Using the existing instance \\"0\\""\n' +
    'time="2024-01-09T12:57:09+08:00" level=fatal msg="errors inspecting instance: [host agent is running but driver is not]"\n',
  code: 1,
  [Symbol(child-process.command)]: '/Applications/Rancher Desktop.app/Contents/Resources/resources/darwin/lima/bin/limactl.ventura start --tty=false 0'
}

 

Rancher Desktop에서 정상적으로 Docker가 실행이 되지 않는 이슈가 있었는데 관련 내용을 확인해 보니 관련 이슈가 제보되어 있었고, 정확히는 Docker 실행을 위한 emulator(QEMU)의 문제가 있는 것이었고 다행히 해결 방법도 있었다.

Rancher Desktop M3 이슈

 

GitHub - rancher-sandbox/rancher-desktop: Container Management and Kubernetes on the Desktop

Container Management and Kubernetes on the Desktop - GitHub - rancher-sandbox/rancher-desktop: Container Management and Kubernetes on the Desktop

github.com

 

 


문제 원인

Rancher Desktop에서 기본적으로 사용하는 VM emulator가 QEMU인데, M3에서 호환성 이슈가 있는 듯했다.

게다가 관련 문제로 QEMU 자체가 정상 종료되지 않아서 emulator가 제대로 변경되지 않는 문제도 있다.

 

 

문제 해결

Rancher Desktop을 재시작했을 때도 동일한 이슈가 발생한다면, emulator를 VZ로 변경하면 문제를 해결할 수 있다.

Desktop GUI에서 VZ 변경 시도하거나, GUI에서도 정상 동작하지 않으면,  명령어로 초기화 후 VZ 변경한다.

 

  • 초기화
rdctl factory-reset

 

  • VZ로 변경
"/Applications/Rancher Desktop.app/Contents/Resources/resources/darwin/bin/rdctl" start --experimental.virtual-machine.type vz

 

 


Reference

https://github.com/rancher-sandbox/rancher-desktop/issues/6014

https://github.com/rancher-sandbox/rancher-desktop/issues/6181

https://github.com/rancher-sandbox/rancher-desktop/issues/6286

728x90
728x90

'개발 팁' 카테고리의 다른 글

[Mac] 맥 터미널 설정하기 with iTerm2, Oh-my-zsh  (0) 2023.12.30