I originally hijacked a thread VirtualBox - somewhat off-topic
that was vaguely similar to what I am experiencing, but a kind forum moderator has split my question away because hijacking someone else's issue is poor forum etiquette.
Here is what I posted:
I tried to follow your last thread however it is still unable to reach outside web. I have a question on how you configured Vbox network adapter, from file/preferences/network, I created a new host-only adapter. There are 2 tabs on this (one for Adapter) and (one for DHCP server). What were the values you used for each of these tabs?
Then, what were the exact settings you used for the guest setup before starting the VM. you can right click on the chosen VM and select settings/network , and from here you are given several adapter tabs. of course by default adapter 1 is set to NAT. Though many of the options for Adapter 2 seem to become pre-populated once you set it to host-only. Are these ok, are do these values need to be modified also. (this would be the advanced button. Adapter Type, Promiscuous mode, Mac, Cable connected
OK, so if we can get the above details, then My last question is did you enable 2 adapters inside the guest vm after you boot up the os. Did you enable the 1st to be NAT and 2nd to be static at the OS level? How did you acheive this. I have been trying for several days now... I cannot get this to work. What was the gateway address and static config settings? IP, subnet, gatway, or dhcp for the 1st ... ?
my requirements are:
assign the guest vm a static IP
reach the host from the guest via terminal
reach the guest from the host via cmd line
reach the internet from the guest
Thank you so much for putting the time into this !
You can do all the networking stuff you need by setting a "bridged" adapter in the VM setup, then configure a valid IP in your guest OS, probably using the same gateway and name servers similar to your host OS.
If you you cannot use a bridged mode adapter because your host network does not support another network card, you can configure a NAT and a host-only adapter in the VM setup as following:
When you configure the network device that corresponds to the NAT device on the on the guest side, set it up to obtain the IP address via DHCP. The NAT device is for outgoing connections to the internet only. VBox will not provide any routing from the outside network to interface behind a NAT device, only via it's own internal DHCP routing.
The host-only adapter is only good for connection between the host and the VM guest. It is primarily designed to provide DHCP like the NAT interface, but does allow a manual configuration, by customizing the "vboxnet0" configuration in the Vbox Network preferences. By default, the IP address range 192.168.56.1 to 192.168.56.100 can be used for manual IP configurations.
It was not mentioned in your requirements, but you need a bridged mode adapter if you want to connect to your guest VM from any other machine beside your host system, e.g. local LAN.
I am not concerened about the defualt natting and the normal dhcp functionality. this of course will always work because that is how the defualt engine is designed in vbox. the issue is that once you try to set the ip as static in the guest os and try to make the host reacheable from the guest, and the guest reachable from the host, and still be able to receive internet connectivity is the inherent challenge with vbox. You had mentioned that you also tried this on your own machine and were successful. What were the settings in each of the tabs you used? this is my ultimate question.
not sure what the hijack comment is about... I was commenting onto the exact topic of discussion located at Re: VirtualBox - somewhat off-topic
this isnt just "networking stuff" as youve mentioned, and will require more than quoting from the vbox manual. As I have already read ~ these are undocumented items for guest setups involving static ip's and access across virtual network infrastructure related to the way vbox is designed for IP traffic.
thanks, if you have tab settings to share from your own experience and trials I would be very interested and thankful to explore.
your previous comments are here, along with Ed's and Tommy's Re: VirtualBox - somewhat off-topic
I was not quoting the Vbox manual, but that's certainly a good place to start ;-)
There are actually no special or custom settings necessary.
Perhaps you did not understand my previous reply. Ok, let's try again:
Vbox VM settings:
1. Adapter NAT
2. Adapter Host-only
1. Adapter DHCP
2. Adapter, any static IP between 192.168.56.1 to 192.168.56.100. No DNS, no Gateway.
You can communicate between the host and the guest OS using the static IP address you specified. It will have to be from the range mentioned, unless you want to manually configure the vboxnet0 dhcp engine as previously explained. Host and guest OS do not have to be in the same subnet. Vbox will automatically provide the routing between the host and guest network.
Internet traffic from the VM guest will always use the NAT adapter (DHCP). It won't use the host-only adapter because it has no IP gateway defined, but I guess you are familiar with IP networking basics.
If this is too complicated, simply use the "bridged" adapter and configure your guest OS in whatever fashion your host network allows.
Edited by: Dude on Sep 8, 2012 1:41 PM
when I create the host only adapter in vbox there are 2 tabs to configure. one tab for adapter settings and one tab for dhcp settings. what are these values that you have used for these tab setups. and then in the vm settings itself within the network tab are you doing anything with the advanced drop down menu under adapter #2? for adapter types listed, and promiscuous mode settings?
then in solaris 10 (the guest os) you are stating for me to plumb up 2 adapters, first being dhcp, and the second configure it to static?
Thanks for the reply
You are probably configuring the Network preferences of the Virtualbox applications. There is nothing there you need to configure. Just leave the defaults:
Adapter: IPv4 Address: 192.168.56.1, IPv4 Network Mask 255.255.255.0
DHCP Server: Enable Server on, Server Address 192.168.56.100, Server Mask 255.255.255.0, Lower Address bound 192.168.56.101, Upper Address bound 192.168.56.254.
In the VM settings:
Adapter 1, Enable, NAT, Advanced: Cable connected.
Adpater 2, Enable, Host-only: Name vboxnet0, Prom. Mode deny, Cable connected.
That's all default. If you need more help, please check the Virtualbox documentation. This is btw, not a Virtualbox and not a Solaris forum.