0

I've created a new Oracle Virtual Box image and exported it to an "Open Virtualization Format Archive" (ova file). The original image used "NAT" settings. I've since changed it to "Bridged Adapter" so that I can Putty into it on port 22 (SSL). I then launched it, and exported it. The problem I'm having right now is I get the same IP address for each instance I import from the *.ova I exported.

I'd like to launch multiple instances of this image and have each machine get a new IP address whenever I import the image and launch it. I'd ultimately like an export of the image, so I can test this again if I'm able to fix the duplicate IP address issue.

1 Answers1

0

After a few hours of research, I found the answer. Whenever a guest OS is cloned (in VMWare or VirtualBox), the interface rules can get messed up in CentOS. I simply deleted that file and rebooted the machine. And I instantly got a new IP address. The file below also got re-created with a single entry for the "eth0" interface. The line containing the "eth1" was no longer there. Rebooting the CentOS OS must rebuild that file.

rm /etc/udev/rules.d/70-persistent-net.rules

This is the article I came across. Although I didn't know what the CentOS equivalents were for these commands.

http://muzso.hu/2012/10/29/how-to-regenerate-the-etc-udev-rules.d-70-persistent-net.rules-file-on-debian-ubuntu

If you prefer not to reboot, just call this command after deleting that file.

service network restart