As the doctor gone rogue

February 9, 2017

Get a new IP address for a running VirtualBox Ubuntu Machine

Filed under: SysAdmin, ubuntu, Virtual Machine — Tags: , , , — hypotheses @ 9:09 am

Situation

You have started up a virtual machine in VirtualBox. In this case, I ran Ubuntu 16.10. You then realized that the IP address of your VM is not accessible from your local network. Although you can connect from the Host to your Guest VM (Ubuntu).

Therefore, you would like to change the type of network from “NAT” to “Bridge”. You did this through the GUI menu (Machine > Setting > Network > Adapter 1 –> Change to “Bridged Adapter”

OK, now what. You IP addresses is still the same.

You can check your current IP and network device with

ubuntu:~$ ifconfig

You solution

So, after you have changed the network adapter setting in VirutalBox. First, you will have to restart the networking service of your “Guest” Ubuntu Virutal Machine.

ubuntu:~$ sudo /etc/init.d/networking restart

To see the new interface, and the new IP.

ubuntu:~$ cat /etc/network/interfaces

 

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: