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 have a Mac OS X installation and a Ubuntu Virtual Box inside them. I use the Debian Virtual Box as a development machine for several rails and php web projects, but I want to access them from the Mac OS so I can tested on Safari, it is possible do this? how?

Thanks in advance

share|improve this question
add comment

2 Answers 2

The way I would do this (especially if you are on a home network) is to set the networking adapter to a bridged adapter. This way the guest VM is assigned it's own IP, and is accessible from any machine on the local network. It's the most convenient, and the won't have to mess around with port forwarding (which can get complicated).

A good reference for all the VBox networking modes is: http://www.virtualbox.org/manual/ch06.html

share|improve this answer
add comment

The simplest way is to set the virtual machine to use bridged networking, it will get an IP address on your network; this IP address should then be accessible from your host machine.

From Chapter 6 of VirtualBox's manual:

With bridged networking, VirtualBox uses a device driver on your host system that filters data from your physical network adapter. This driver is therefore called a "net filter" driver. This allows VirtualBox to intercept data from the physical network and inject data into it, effectively creating a new network interface in software. When a guest is using such a new software interface, it looks to the host system as though the guest were physically connected to the interface using a network cable: the host can send data to the guest through that interface and receive data from it. This means that you can set up routing or bridging between the guest and the rest of your network.

It is also possible to use the NAT networking mode, but it will require tinkering with port forwards (not worth the trouble, in my opinion).

share|improve this answer
    
I did it, but I don't know what is the IP address that virtual machine have, how can I know that? –  Nisanio Jul 15 '12 at 2:52
    
From what you say in your question, the virtual machine is Linux. Thus, open a terminal in the virtual machine and type ifconfig. –  Renan Jul 15 '12 at 2:53
    
thank you very much! –  Nisanio Jul 15 '12 at 23:43
add comment

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.