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 am trying to run a server on one VM and a client on another; both VMs have ScientificLinux 6.4 as their OS, running on VirtualBox 4.2.10.

The client should be able to communicate with the server via MPI and the server will ingest information into a MySQL database. The client and server software will communicate and run successfully on one machine; however, it fails to run between machines.

At first, I was using the default NAT network. Then, I tried using the GUI to create an internal network and a bridged network between the machines; however, they still could not communicate. I then tried to SSH between the machines; this did not work. I think that if I can SSH between the machines that the Client and Server should be able to successfully communicate with each other.

Has anyone run into this problem before?
What should I try to do to resolve this?

EDIT: The other thing I am confused about is that the VMs do not seem to have unique IP addresses; when I execute ifconfig, I find that the IP addresses are both 127.0.0.1 under the lo (Local Loopback) section. I cannot find any other IP addresses in any of the other sections, so that is all I have to work with.

share|improve this question
    
Please run ifconfig on both machines, and append it to your question. –  spuder Jul 31 '13 at 22:48

5 Answers 5

If you issue ifconfig and find that there is only a loopback interface that's listed, then you do not have any interface to communicate with your network.

I do not use Scientific Linux but it seems you could configure your network interfaces with the following command, as per this article:

system-config-network-tui

If it doesn't work, then you can edit the file by hand as stated in the article mentioned above.

share|improve this answer

You should have something like an eth0 interface on both machines. Make sure in your VirtualBox settings that you have a network enabled for both VM's, and that "Cable unplugged" isn't checked. Bridged networking is probably your best bet if you need the two VMs to communicate with anything besides each other, as it will use VirtualBox's virtual interface to get you IP's on the same network as your host (assuming your network has a DHCP server).

Once you verify those things, try:

/etc/rc.d/init.d/network restart

to try to bring up the interfaces again with a valid IP address.

share|improve this answer

You want to set up either an internal network or a host-only network. The practical difference between the two is that the host computer can participate in a host-only network, but not an internal network.

Assuming you want to use an internal network, the basic process is as follows:

  1. On each of the guest VMs, set its network adapter to "internal network" OR add an additional network adapter and set it to "internal network". Make sure that the network name is the same for each guest.

  2. Set up a DHCP server for the internal network, as described here.

  3. When you start the guest VMs, they'll see an additional network adapter. Most modern operating systems will configure the network interface from the DHCP server without any fuss.

If you use a host-only network, the process is as follows:

  1. From the Virtualbox VM manager, select File->Preferences->Network and set up a host-only adapter. You can set up a DHCP server from the GUI here. When you complete this process, you'll see a new virtual interface appear on the host. That is how you will communicate between the host and guests.

  2. On each guest, change its network adapter to use the host-only network, or add a new network adapter set to the host-only network.

  3. Start each guest. They should get an IP address from the DHCP server.

share|improve this answer

I usually setup bridged network for all my VMs, so I can access my VMs from anywhere on my network.

If you want make VM to VM communications faster, use host-only networking. For host-only networking, you have to enable it and create either a DHCP server (within options of virtualbox) or use static ip-addresses on you VMs.

I have DHCP on my router and I have an internal DHCP server for virtualbox. So if I have VMs with more than 1 internet/ethernet requirement, I create 1 bridged and 1 host-only network.

I also make sure "allow all" is enabled under the network card.

share|improve this answer

Check your firewall settings on the guests first.

Usually I start with ping, telnet and so on... I see no reason why it shouldn't work apart from misconfig of firewall or virtual network.

share|improve this answer

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.