VirtualBox 고정 IP 풀리는 문제

임재성·2025년 11월 2일

오라클의 VirtualBox를 사용하여 Ubuntu 22.04 게스트 OS를 설치후 실행했다.
여러대의 OS를 사용하다보니 IP를 변경해줘야 했는데, 기본적인 설정을 한 후
sudo netplan apply 후 ip까지 변경된 것을 확인했다.
그런데 끄고다시 켜니 내가 설정했던 IP가 날라가있었다.

해결

1. cloud-init 비활성화

sudo touch /etc/cloud/cloud-init.disabled
sudo systemctl disable cloud-init

후 고정 IP 설정을 해주면 끝..

  • netplan의 dhcp-identifier 옵션 사용 이 있긴한데, 해결이 안됐다.
    기본적으로 mac 주소를 사용하도록 강제하는 옵션

참고 : https://unix.stackexchange.com/questions/419321/why-are-my-cloned-linux-vms-fighting-for-the-same-ip?utm_source=chatgpt.com

profile
조금씩 앞으로

0개의 댓글