Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question

migrated from stackoverflow.com Jul 30 '12 at 23:49

This question came from our site for professional and enthusiast programmers.

1  
this is more of a linux question.. just allocate the poor linux a static ip. –  Markus Mikkolainen Jul 30 '12 at 22:22
    
how can I do that? I tried to change eth0 and it did not work. –  teahupoo Jul 30 '12 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 '12 at 22:31
    
can you be more specific. I can't see that option –  teahupoo Jul 30 '12 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 '12 at 22:48

1 Answer 1

up vote 1 down vote accepted

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

share|improve this answer
    
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? –  Ricardo Parro Jul 31 '12 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. –  Borislav Sabev Jul 31 '12 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. –  Ricardo Parro Aug 2 '12 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. –  Borislav Sabev Aug 2 '12 at 10:33
    
thanks . I'll try that –  Ricardo Parro Aug 2 '12 at 10:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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