I am wondering if you have the option to change the static IP on a Ubuntu VM or if you should just spin a new virtual machine up? Has anyone out there every attempted this?
3 Answers
Edit /etc/network/interfaces
Find the config for eth0 (it will look something like below) and change to your preference
auto eth0
iface eth0 inet static
address 10.0.0.2
netmask 255.255.255.0
Documentation on interfaces file can be found here : http://manpages.ubuntu.com/manpages/lucid/man5/interfaces.5.html
After you have changed the above you will need to restart networking
sudo /etc/init.d/networking restart
or reboot the computer.

- 617
- 1
- 6
- 14
Has anyone out there every attempted this?
Ummmmm. Yes.
Just change the IP if that's what you want to do. Or don't do that and just spin a new VM if you'd prefer.

- 109,363
- 18
- 175
- 245
-
Sorry, never done it, did not know ;-) – AgnosticDev Mar 03 '14 at 21:45
(Since I must not add a comment due to my rep points, I have to add an answer...)
Beyond Sam's answer above, also note that some services on that machine may need to be re-configured. Especially bad when you are running an Oracle db on that machine: the IP address of the machine at the time of installation is buried somewhere in its configuration files, and must be changed manually. Some other programs may show similarly odd behavior.

- 181
- 4