1

I have a mac running OS X Yosemite. I installed several versions of windows using virtual box. I enter in localhost (I am using xampp only for development purposes [no virtual hosts]) in internet explorer in virtual box and it does a bing search. How do I get localhost to work inside virtual box. Many people have asked about this regarding lunix and other operating systems, but I haven't yet found out how to do this on a mac. Thank you!

To sum it up:

http://localhost

is not loading inside the virtual operating systems in virtual box

William Green
  • 83
  • 1
  • 11
  • You don't say what is localhost meant to connect to? do you have a server running on the OS X? Also usually for development virtualbox is used to host the server component, not the other way around. – Nima Nov 09 '14 at 22:40
  • I'm using xampp. I don't have any virtual hosts though. Just for development purposes. – William Green Nov 10 '14 at 03:41

2 Answers2

0

This page covers the virtualbox networking quite well.

NAT - Your host will act as a router (firewall) and your hosts will be on a private subnet. Use this if you are not running servers on the guests.

Bridged - Your guests will get a ip address on the same subnet as your host. Use this if you are running servers on the guest and wish to connect from other computers on the LAN.

Host Only - Sort of a hybrid. As the name implies, with this option you can connect to the guest servers from the host only. Use this for "private" (host only) servers. I use this if I am running a test web server.

To make a long story short, assuming you have a router, I would use bridged networking.

Nima
  • 1,470
  • 2
  • 17
  • 25
0

I am also on a mac (10.9.5, running VirtualBox version 4.3). I tried to set up Host-only Networks (I'm following a Cassandra tutorial). It gave me this error:

Failed to create the host network interface.

VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory.

Result Code: NS_ERROR_FAILURE (0x80004005) Component: HostNetworkInterface Interface: IHostNetworkInterface {f6e556f9-d598-409b-898c-8ba99d9b05ae}

But I was able to get it to create a NAT Network.

This comment from this https://stackoverflow.com/questions/18149546/vagrant-up-failed-dev-vboxnetctl-no-such-file-or-directory solution worked, though:

sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart
Community
  • 1
  • 1
szeitlin
  • 3,197
  • 2
  • 23
  • 19