๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

Linux/Kubernetes

[Kubernetes] Unable to start VM: create: precreate: VirtualBox is configured with multiple host-only adapters... sudo ์—†์ด minikube ์ด์šฉํ•˜๊ธฐ, kubernetes VirutalBox ์—๋Ÿฌ

์—๋Ÿฌ์ฝ”๋“œ

๐Ÿ’ฃ  Unable to start VM: create: precreate: VirtualBox is configured with multiple host-only adapters with the same IP "192.168.99.1". Please remove one


๐Ÿ˜ฟ  Sorry that minikube crashed. If this was unexpected, we would love to hear from you:


์—๋Ÿฌ ์ƒํ™ฉ

sudo ์—†์ด minikube command๋ฅผ ์ด์šฉํ•˜๊ณ  ์‹ถ์€ ์ƒํ™ฉ

chown์„ ํ†ตํ•ด ํŒŒ์ผ ์†Œ์œ  ๋ฐ ๊ถŒํ•œ์„ ๋ฐ”๊พธ๋ฉด, sudo ์—†์ด command๊ฐ€ ์‹คํ–‰์€ ๋˜์ง€๋งŒ, VirtualBox ์—๋Ÿฌ๊ฐ€ ๋‚˜๋Š” ์ƒํ™ฉ.


ํ•ด๊ฒฐ๋ฒ• ์š”์•ฝ

์šฐ์„  sudo ์—†์ด ๋ช…๋ น์–ด๋ฅผ ์‹คํ–‰ํ•˜๊ณ  ์‹ถ์€ ๊ฒฝ์šฐ


    sudo chown -R $USER $HOME/.minikube

    sudo chown -R $USER $HOME/.kube


๋ฅผ ํ†ตํ•ด  .minikube ์™€ .kube ๋””๋ ‰ํ† ๋ฆฌ์˜ ์†Œ์œ ์ž๋ฅผ ํ˜„์žฌ ์œ ์ €๋กœ ๋ฐ”๊พผ๋‹ค.


์ดํ›„! sudo minikube start ๊ฐ€ ์•„๋‹Œ.

minikube start

์ž…๋ ฅํ•œ๋‹ค.

(์•„๋งˆ sudo minikube start๋ฅผ ์ž…๋ ฅํ•˜๋ฉด ๋‹ค์‹œ ๋””๋ ‰ํ† ๋ฆฌ ์†Œ์œ ์ž๊ฐ€ root๋กœ ๋ฐ”๋€Œ๋Š” ๊ฒƒ ๊ฐ™์Œ.)

minikube start์‹œ VM์ด๋‚˜ Virtualbox๊ด€๋ จ IP ์ค‘๋ณต ์—๋Ÿฌ ๋ฐœ์ƒ์‹œ

virtualbox์˜ Global Tools - Host Network Manager ์—์„œ ์ค‘๋ณต๋œ ์•„์ดํ”ผ๋ฅผ ์ œ๊ฑฐํ•˜๊ฑฐ๋‚˜ ๋ณ€๊ฒฝํ•œ๋‹ค.


ํ•ด๊ฒฐ๋ฒ• ์„ธ๋ถ€๋‚ด์šฉ


chown์„ ํ†ตํ•ด ์†Œ์œ ์ž๋ฅผ ๋ฐ”๊พผ ๋’ค sudo ์—†์ด minikube start ์‹œ VM ์ด๋‚˜ VirtualBox Error๊ฐ€ ๋ฐœ์ƒํ•˜์ง€ ์•Š์œผ๋ฉด ๊ทธ๋Œ€๋กœ ์„ฑ๊ณต์ ์œผ๋กœ minikube start๊ฐ€ ๋  ๊ฒƒ์ด๊ณ ,

๋Œ€๋ถ€๋ถ„์˜ ๊ฒฝ์šฐ Error๊ฐ€ ๋ฐœ์ƒํ•  ๊ฒƒ์ด๋‹ค.

root์—์„œ ์‹คํ–‰ํ–ˆ๋‹ค๊ฐ€ USER๋กœ ์‹คํ–‰ํ–ˆ๋‹ค๊ฐ€ ํ•˜๋ฉด์„œ VirtualBox๊ฐ€ ์—ฌ๋Ÿฌ๊ฐœ์˜ IP๋ฅผ ๊ฒน์น˜๊ฒŒ ํ• ๋‹น์‹œํ‚ค๋Š” ๊ฒƒ ๊ฐ™์Œ.


sudo๋กœ ์‹คํ–‰ํ•  ๋•, root ๋กœ ์‹คํ–‰์„ ํ•˜๊ณ , ์ผ๋ฐ˜ ์‚ฌ์šฉ์ž๋กœ ์‹คํ–‰ํ•  ๋•, ์ผ๋ฐ˜ ์‚ฌ์šฉ์ž ๊ทธ๋Œ€๋กœ ์‹คํ–‰ํ•˜๋‹ค๋ณด๋‹ˆ

minikube๋„ virtualbox๋„ ๊ผฌ์ด๊ฒŒ ๋˜๋Š” ๊ฒƒ ๊ฐ™๋‹ค.

์ผ๋ฐ˜ ์‚ฌ์šฉ์ž์—์„œ minikube start ์ดํ›„ sudo virtualbox๋ฅผ ์‹คํ–‰ํ•˜๋ฉด

์ด๋•Œ์˜ virtualbox๋Š” root๋กœ ์‹คํ–‰๋˜์–ด์„œ ์ผ๋ฐ˜์‚ฌ์šฉ์ž์˜ VM์„ ํ‘œ์‹œํ•˜์ง€ ์•Š๋Š” ๋“ฑ์˜ ์ฐฉ์˜ค๊ฐ€ ๋ฐœ์ƒํ•˜๊ฒŒ ๋œ๋‹ค.


ํ•ด๋‹ต์€ https://localbyflywheel.com/community/t/virtualbox-is-configured-with-multiple-host-only-adapters-with-the-same-ip/3326 ๋ฅผ ์ฐธ๊ณ ํ•˜์˜€๋‹ค.

virtual extension pack์— ์žˆ๋Š” Global Tools๋ฅผ ์ด์šฉํ•ด IP๋ฅผ ์ˆ˜์ •ํ•˜์˜€๋‹ค.


terminal์—์„œ virtualbox๋ฅผ ์ž…๋ ฅํ•˜๊ฑฐ๋‚˜ ์•Œ์•„์„œ ์ž๊ธฐ๊ฐ€ ์„ค์น˜ํ•œ virtualbox๋ฅผ ์‹คํ–‰ํ•œ ๋’ค ์˜ค๋ฅธ์ชฝ ์œ„์˜ Global Tools๋ฅผ ๋ˆŒ๋Ÿฌ์ค€๋‹ค.


์•„๋งˆ ์œ„์—์„œ์ฒ˜๋Ÿผ 

" Unable to start VM: create: precreate: VirtualBox is configured with multiple host-only adapters with the same IP "192.168.99.1". Please remove one "

๋ผ๋Š” ์—๋Ÿฌ์ฝ”๋“œ๋ฅผ ๋ฐ›์€ ๊ฒฝ์šฐ์—๋Š” Global Tools ์˜ Host Network Manager์—์„œ IPv4 Address๊ฐ€ ๋™์ผํ•œ ๋‘ ๊ฐœ ์ด์ƒ์˜ vboxnet์ด ๋‚˜์˜ฌ ๊ฒƒ์ด๋ผ ์˜ˆ์ƒ๋œ๋‹ค.

๋‚˜๋Š” ์—ฌ๊ธฐ์„œ ์ค‘๋ณต๋œ IPv4 Address๋ฅผ ์ž„์˜๋กœ ์ˆ˜์ •ํ•˜์—ฌ ๊ฒน์น˜์ง€ ์•Š๊ฒŒํ•˜๊ฑฐ๋‚˜

ํ•˜๋‚˜๋งŒ ๋‚จ๊ธฐ๊ณ  ๋‹ค ์ง€์›Œ๋ฒ„๋ ธ๋‹ค.

๊ทธ๋žฌ๋”๋‹ˆ ์—๋Ÿฌ๋ฉ”์‹œ์ง€์— ๋”ฐ๋ผ ๊ฐ™์€ IP์˜ adapter๋ฅผ ์ œ๊ฑฐํ•ด์„œ์ธ์ง€ ์ดํ›„๋กœ๋Š” ์ž˜ ์ž‘๋™ํ•˜์˜€๋‹ค.




์š”์•ฝ

๋‹จ์ˆœํžˆ sudo ์—†์ด minikube ๋‚˜ kubectl command๋ฅผ sudo ์—†์ด ์‚ฌ์šฉํ•˜๊ณ  ์‹ถ๋‹ค๋ฉด,



    sudo chown -R $USER $HOME/.minikube

    sudo chown -R $USER $HOME/.kube


์„ ํ†ตํ•ด ๋””๋ ‰ํ† ๋ฆฌ์™€ ๊ทธ ํ•˜๋ถ€ ํŒŒ์ผ๋“ค์˜ ์†Œ์œ ์ž๋ฅผ ํ˜„์žฌ ์œ ์ €๋กœ ๋ฐ”๊ฟ”์ค€๋‹ค.


์ดํ›„ sudo ์—†์ด minikube start ๋“ฑ์˜ command๋ฅผ ์‹คํ–‰ํ•˜๋‹ˆ VM์ด๋‚˜ VirtualBox์— ๋Œ€ํ•œ IP ์ค‘๋ณต ๊ด€๋ จ Error๊ฐ€ ๋ฐœ์ƒํ–ˆ๋‹ค๋ฉด


virtualbox๋ฅผ ์‹คํ–‰ํ•ด์„œ Global tools - Host Network Manager์—์„œ ์ค‘๋ณต๋œ IP๋ฅผ ์ˆ˜์ •ํ•ด์ฃผ์ž.