0

How do I configure a VirtualBox appliance to have its own I.P. address when running on a host Ubuntu machine?

I've tried following the solution for this question but am not having any luck: Getting I.P address of Ubuntu Server running in Virtual Box

Thanks in advance.

1

Configure your virtual machine adapter as Bridged Adapter.

Boot into your Ubuntu VM and run following command to get your IP address.

hostname -I

Now you can use ssh to access your server with that IP address or open-up website from your browser if you're running any web server.

If you want to add local network to your server aswell, then add Network Adapter 2 as Internal Network

Edit /etc/network/interfaces and add static adapter as eth1

auto eth1
    iface eth1 inet static
    address 192.168.0.1
    netmask 255.255.255.0
    gateway 192.168.0.0

When this is done, bring your adapter up.

ifup eth1
| improve this answer | |
  • 1
    Thanks. I found another way via "Host-Only Adapter" as well. File -> Preferences -> Network -> "Host-Only", "+" (adds the new i.p. address called 'vboxnet0' by default). – Fuzzy Analysis Apr 17 '16 at 10:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.