Hello,
I've setup a couple of guest machines in VirtualBox 4.1.14 in the same host-only network with DHCP. How do I assign static IP addresses to those machines?
Thanks!
Assign static IP to a guest in host-only DHCP network?
-
Perryg
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: Assign static IP to a guest in host-only DHCP network?
Just set them up in the guest. You have to use the same subnet as the host.
Re: Assign static IP to a guest in host-only DHCP network?
Hello,Perryg wrote:Just set them up in the guest. You have to use the same subnet as the host.
I think I am doing something wrong:
I tried your suggestion with my Scientific Linux 6.2 guest by going to the Gnome Network Connections manager, setting the IPv4 settings to manual, and adding an address like so: IP 192.168.56.101 (the first address available in VirtualBox host-only network settings, netmask 255.255.255.0 (also from the host-only settings). This client seems to connect fine.
However, I started a second guest machine (with dynamically assigned host-only network IP) while the first one is still on, and noticed that it received the same 192.168.56.101 address as the first Scientific Linux guest!
Looks like my VirtualBox host is not aware of the first guest with manually assigned IP?
-
Perryg
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: Assign static IP to a guest in host-only DHCP network?
Well that is probably because you are using the addresses in the DHCP server range (see preferences -> network). Use one that is not in the DHCP rage but the same subnet if you want to assign static addresses.
Re: Assign static IP to a guest in host-only DHCP network?
Ah yes, that seems to be the problem. I made the appropriate adjustments and it works well now. Thank you!Perryg wrote:Well that is probably because you are using the addresses in the DHCP server range (see preferences -> network). Use one that is not in the DHCP rage but the same subnet if you want to assign static addresses.