Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.


  Search this Thread
Old 11-18-2013, 10:15 PM   #1
LQ Newbie
Registered: Nov 2013
Posts: 15

Rep: Reputation: Disabled
How to communicate between two VirtualBox VMs running on same host

I am running two VM instances of RHEL/CentOS on my VirtualBox instance running on host Windows 7. The problem is when I am executing `VBoxManage list vms -l | more` and then sunsequently `VBoxManage guestproperty get <uuid> "/VirtualBox/GuestInfo/Net/0/V4/IP"`, I can see the same IP for both the VMs. I have set the internal networking `intnet` for both the VMs using Networks --> Adapter 2 --> PCnet-FAST III (Internal Network, 'intnet') and my understanding was that eth1 may have been the local network interface for the VMs. But both their IP is showing as Is there a way I can access the IPs in the private VM network for the two VMs.

NOTE: I can also access only a single VM instance when accessing through Putty SSH client. And it is connecting to the proxy always. Thus I am not being able to distinguish between the VMs. I need separate instance accesses to run server and client codes on separate instances in a client-server architecture

I am attaching the VBoxManage command line outputs as executed on the host. I am running 1.3_2 and 1.3_3 sandboxes but both have same IP as shown below in bold:

C:\Program Files\Oracle\VirtualBox>VBoxManage list vms
"Hortonworks Sandbox 1.3" {4914b5c7-1395-47f5-80ef-8fbec8cadbd4}
"Hortonworks Sandbox 1.3_1" {f103f5d2-f949-4d67-a81e-c63ddc5335dc}
"Hortonworks Sandbox 1.3_2" {fc2b9f50-bf4a-4a5d-8189-22d62c7e1d67}
"Hortonworks Sandbox 1.3_3" {5976fff1-7a0d-4eca-bedf-7756f7076dbd}
C:\Program Files\Oracle\VirtualBox>VBoxManage guestproperty get fc2b9f50-bf4a-4a
5d-8189-22d62c7e1d67 "/VirtualBox/GuestInfo/Net/0/V4/IP"

C:\Program Files\Oracle\VirtualBox>VBoxManage guestproperty get 5976fff1-7a0d-4e
ca-bedf-7756f7076dbd "/VirtualBox/GuestInfo/Net/0/V4/IP"

On the VM sandbox 1.3_2, I ran the below command to get the local IP for eth0 as below:
[hue@sandbox ~]$ arp -an
? ( at 52:54:00:12:35:02 [ether] on eth0
[hue@sandbox ~]$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface * U 0 0 0 eth0
link-local * U 1002 0 0 eth0
default UG 0 0 0 eth0

Any ideas how can I find the distinct IPs for the different sandboxes?

NOTE: I tried to run the VBoxManage dhcpserver but it asks for `--ip` option and `--netmask` which I have provided as below with the following output:

C:\Program Files\Oracle\VirtualBox>VBoxManage dhcpserver add --netname intnet --
netmask 10.0.2.*
Oracle VM VirtualBox Command Line Management Interface Version 4.3.0
(C) 2005-2013 Oracle Corporation
All rights reserved.


VBoxManage dhcpserver add|modify --netname <network_name> |
--ifname <hostonly_if_name>
[--ip <ip_address>
--netmask <network_mask>
--lowerip <lower_ip>
--upperip <upper_ip>]
[--enable | --disable]

VBoxManage dhcpserver remove --netname <network_name> |
--ifname <hostonly_if_name>

Syntax error: You need to specify --ip option

While trying to enable the dhcpserver, it already exists:

C:\Program Files\Oracle\VirtualBox>VBoxManage dhcpserver add --netname intnet --
ip --netmask --lowerip --upperip -
VBoxManage.exe: error: DHCP server already exists

Last edited by chakra1; 11-18-2013 at 10:48 PM.
Old 11-19-2013, 03:26 AM   #2
Registered: Apr 2010
Location: Cluj, Romania
Distribution: Debian Testing
Posts: 726

Rep: Reputation: 152Reputation: 152
If both have the same internal IP address, you wont be able to distinguish them.
Those VMs were cloned? If so, you might check their MAC addresses.
Old 11-19-2013, 04:15 PM   #3
Registered: Mar 2008
Posts: 17,000

Rep: Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513
I am not surprised that both have same IP address. Not sure it is by design or not however. One post suggested that you put two nic's in one of the machines and then use the second one.

Might ask why you are using nat. I do use it often but is it needed? Can you use static ip's in clients?
Old 12-05-2013, 04:38 PM   #4
Registered: Feb 2009
Location: Titel - Serbia
Posts: 176

Rep: Reputation: 18

Check section 6.6 .

If I correctly understood your problem I beleive this is the answer.
Old 12-09-2013, 12:19 AM   #5
LQ Newbie
Registered: Dec 2013
Posts: 2

Rep: Reputation: Disabled
Thank u for such valuable answer, It will help me a lot....
Old 12-09-2013, 02:43 AM   #6
Registered: Feb 2009
Location: Titel - Serbia
Posts: 176

Rep: Reputation: 18
You are welcome...


clientserver, putty, ssh access, virtualbox

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How secure is windows XP running as a virtualBox guest on a Slackware 12.2 host garyg007 Slackware 13 07-06-2015 05:54 PM
[SOLVED] Running 64bit Slackware on 32 VirtualBox host? barry_lamb Slackware 8 04-01-2013 11:35 AM
VMs on different servers cannot communicate sanaz Linux - Virtualization and Cloud 3 02-10-2013 04:26 PM
How to connect an ossec agent installed on Virtualbox to host machine running on Cent sriramdas Linux - Virtualization and Cloud 0 01-17-2013 07:44 AM
Access server running on localhost on host system through virtualbox guest OS Jean-Luc Besson Linux - Virtualization and Cloud 3 05-15-2012 03:19 PM > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 09:59 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration