OpenSolaris on VirtualBox

I've just installed VirtualBox on my PC and installed OpenSolaris as a virtual machine within it. The PC connects to the internet via a router and uses DHCP to get its IP address. How do I configure the OpenSolaris virtual machine to use the same DHCP server so I can connect it to the net. At the moment ifconfig says that the interface is up and DHCP enabled but has a strange IP address. Automatic configuration doesn't seem to want to work.

Any help appreciated.

Jerry

If you go into your settings-network part of the guest os, I.E. your OpenSolaris VM, you see a few options. In paticular when you just run a default VM with little configuration it is set to operate on an internal NAT. This will allow the VM to share your primary network address with your host machine, although it is behind an internal gateway.

If you want your VM to have a "real" IP address from your DHCP server, you need to configure it to bind to a virtual network device. This involves you installing a virtual network device. Under Windows, the Virtual Box can give you precise details how to do this, but the program is shipped with a driver that you can add which is a virtual network card to your hosts. Then you bind the VM (in the settings) to that paticular Virtual network card.

I hope this helps. I will dig into the VirtualBox docs later tonight and try to get specific details for you.

follow these steps

  • go to virtual box
  • Click on the network that you see on the right hand side
  • select host network interface
  • Now start the machine
  • After coming to the prompt give the following commands:
  • ifconfig <ethernet card name> plumb
  • ifconfig <ethernet card name> dhcp

This will take IP address from the internet. And will be in the same subnet as your host machine. I hope this helps. Let me know if it works:b:

The default configuration which is using NAT should allow you to connect to the Internet without any tweaking.

Finally got a chance to check it out...With a NAT setting, it didn't want to work. Changing the setting the DHCP as suggested by amult worked without me needing to make any further changes once I'd started the VM.

Thanks everyone.

Jerry