2

I created a Virtual Machine (Linux Fedora) using Oracle VM VirtualBox . The ip address changes every now and then. I want to make it static in the VM.

Update : I was able to setup a static ip address for the VM that can be accessible from the host but now I lost internet connection in the linux VM .

Any ideas?

Thanks

8
  • 1
    this is more of a linux question.. just allocate the poor linux a static ip.
    – Markus Mikkolainen
    Jul 30, 2012 at 22:22
  • how can I do that? I tried to change eth0 and it did not work.
    – teahupoo
    Jul 30, 2012 at 22:27
  • or do you mean the external ip allocated to the vm? you can do that by editing the "network card" from the VM device options.
    – Markus Mikkolainen
    Jul 30, 2012 at 22:31
  • can you be more specific. I can't see that option
    – teahupoo
    Jul 30, 2012 at 22:46
  • well i dont have virtualbox installed currently , but somewhere there in the gui you can configure the virtual network card and somehow it was possible to use different modes of operation like using the host ip, using a natted ip, using a local ip , or getting one via dhcp and so-on.
    – Markus Mikkolainen
    Jul 30, 2012 at 22:48

1 Answer 1

1

It depends on what you want to do. If you want to give the guest OS an IP in the same network as the HOST OS you can use the "bridged" Networking mode. Check the Virtual Networking chapter of the Virtualbox User Manual

4
  • I am using Windows 7 as a Host OS and the VM is a Fedora12. I am using a bridged networking mode but the ip keeps changing. Any idea why?
    – hopper
    Jul 31, 2012 at 12:23
  • What does "it keeps changing" mean? If you're using DHCP in the Fedora box it may change if the router issues you a new IP. This really depends on the configuration of your local network and networking environment. Jul 31, 2012 at 12:41
  • I am using a wireless router at home. I setup a reserved ip with the mac address for the virtual machine and even with this setup when I turn the virtual machine on the ip address chages time to time. I also edit the eth0 file witht he settings to handle an static ip. After this I have a fixed IP address but no internet connection. I can access my virtual machine from my host using an IP that does not change but I do not have a internet connection on the Virtual machine which is really weird.
    – hopper
    Aug 2, 2012 at 9:08
  • Your wifi card on the host is not eth0 it is most probably wlan0 or eth1 (if you have a cable interface which should be your case). You should go to the machine settings, network panel and configure the virtual machine network interface to be bridged to your wifi interface. Aug 2, 2012 at 10:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .