vagrant up 을 하던 중 아래와 같은 에러가 발생했다.
vagrant를 처음 설치하고 사용해보는거라서 넘 당황했다. 퓨 그래서 삽질을 시작했다,, 답은 쉬운거였지만,,
나는 virtualBox 설치가 덜 된줄 알고 재시동도 했었다 하하
The IP address configured for the host-only network is not within the
allowed ranges. Please update the address used to be within the allowed
ranges and run the command again.
Address: 192.168.1.32.10
Ranges: 192.168.56.0/21
Valid ranges can be modified in the /etc/vbox/networks.conf file. For
more information including valid format see:
https://www.virtualbox.org/manual/ch06.html#network_hostonly
아무튼 해결은 로그만 잘 읽으면 된다. 아주 간단하다.
이게 말 그대로 IP 범위가 잘못되어있다는 것이다.
그래서 IP를 192.169.1.32.10 에서 192.168.56.10으로 바꾸고 vagrant up을 다시 했더니 temius에서 ip연결이 안되었다,,
터미널에 ipconfig으로 ip도 찾아보고 같은걸 확인한 다음 다시 vagrant up을 했는데도 안됨. 여기서 40분은 버린거같다 ㅜㅜ
아무튼 결론은 vagrant reload !!!
원래 변경한 다음에 vagrant up을 하면 변경된 부분만 저장되는데, 나는 가상머신이 실행중이었기 때문에 vagrant up을 해도 변경이 안된거였다.
길고 긴 삽질 뒤에는 허무함이 밀려오지만 다음엔 더 쉽게 해결하겠지 뭐~
문제 해결하고 성공한걸 확인한 후에 강의에서는 분명히 그 IP(192.169.1.32.10)로 실행했는데 나는 왜 안되었는지 찾아봤다.
→ Linux, Mac OS X 및 Solaris Oracle VM VirtualBox는 192.168.56.0/21 범위의 IP 주소만 호스트 전용 어댑터에 할당하도록 허용한다
리눅스와 맥에서 가능한 IP 대역에 바뀌었다고 한다! 그러니까 뭐 쉽게 생각하면 버전 차이 아닐까..
이게 virtualbox 호스트 네트워크 관리자에서 설정 변경하는 방법도 있고, /etc/vbox/networks.conf 파일추가해서 하는 방법도 있긴하다. (파일추가방법은 밑에 링크로 둔다)
결론
1. Linux, Mac OS라면 VirtualBox를 사용할 때 호스트 전용 네트워크에 IP 주소는 192.168.56.0/21 범위를 사용하자
2. 가상 머신 실행 중에 vagrantfile을 변경했으면 vagrant reload
참고 :
https://www.virtualbox.org/manual/ch06.html#network_hostonly
Chapter 6. Virtual Networking
This networking mode enables you to interconnect virtual machines running on different hosts. Technically this is done by encapsulating Ethernet frames sent or received by the guest network card into UDP/IP datagrams, and sending them over any network avai
www.virtualbox.org
'삽질 좋아 > 오류 해결' 카테고리의 다른 글
[Spring] messages.properties 인코딩 오류 해결 (Mac) (0) | 2024.01.29 |
---|---|
[Spring][오류 해결] @PathVariable name 생략 (0) | 2024.01.01 |
[Error] Kubernetes 설정(master) 오류 해결 (0) | 2023.12.13 |
[Web] 304 Status 문제 해결 (0) | 2023.11.30 |
[스프링부트 에러] Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled. (0) | 2023.11.26 |
댓글