#docker #kubernetes #container #orchestrator #microservice #infrastructure-as-code #devops #ci #cd

제목[Lecture 11] MacOS "docker-machine create ~" 시 오류2022-04-18 01:39
작성자

실습 중 docker-machine으로 myvm1을 생성할 때 다음 오류가 발생했습니다.

- macOS Monterey 12.3.1

- VirtualBox VM Version : 6.1.32

"""

Error creating machine: Error in driver during machine creation: Error setting up host only network on machine start: The host-only adapter we just created is not visible. This is a well known VirtualBox bug. You might want to uninstall it and reinstall at least version 5.0.12 that is is supposed to fix this issue

""" 
찾아보니 System Preferences - Security & Privacy 에 가면 General에 Allow 버튼이 있는데 허용해주시고 재부팅하면 해결이 됩니다.

이렇게 하면 다음 실습 명령어인 "docker-machine start myvm1" 에서 다음 오류가 발생합니다.
"""
Starting "myvm1"...

(myvm1) Check network to re-create if needed...

(myvm1) Found a new host-only adapter: "vboxnet2"

Error setting up host only network on machine start: /usr/local/bin/VBoxManage hostonlyif ipconfig vboxnet2 --ip 192.168.99.1 --netmask 255.255.255.0 failed:

VBoxManage: error: Code E_ACCESSDENIED (0x80070005) - Access denied (extended info not available)

VBoxManage: error: Context: "EnableStaticIPConfig(Bstr(pszIp).raw(), Bstr(pszNetmask).raw())" at line 242 of file VBoxManageHostonly.cpp

"""


해당 오류는 VirtualBox 버전이 달라지면서 허용하는 ip 범위가 192.168.56.0/21 이지만 docker-machine이 사용하는 ip는 192.168.99.101이기 때문에 이를 벗어납니다. 따라서 해당 오류를 고치기 위해서는 다음 내용을 해주면 오류가 사라졌습니다.

1. /etc/vbox 폴더가 없으면 만들기 (sudo)

2. /etc/vbox/networks.conf 만들기 (sudo)

3. networks.conf 파일 안에 해당 내용 추가하기

* 10.0.0.0/8 192.168.0.0/16
* 2001::/64
댓글