Page 1 of 1

Server and client on two images

Posted: 8. Oct 2014, 12:39
by JimboSan
Hey guys!

This is my first time on this forum and i'm a bit of a rookie when it comes to VMs.

Is it possible to run 2 Images which connects to each other?
I need to run a server application on one of the images with a database and a client version of the application
on the other image which then needs to get information from the first image.

I can't seem to figure out how i can do this :|

Thanks
Christopher

Re: Server and client on two images

Posted: 8. Oct 2014, 14:16
by mpack
VBox supports several suitable networking modes. Check out the user manual.

Re: Server and client on two images

Posted: 8. Oct 2014, 14:35
by JimboSan
I have tried both Internal Network and Bridge Adapter, but i cant find out how they actually connect or how to connect them when they are both on the internal network.

Re: Server and client on two images

Posted: 8. Oct 2014, 14:54
by mpack
Bridged networking makes the VM part of the host's physical network. All PCs connected to the host network (including the host) will be able to see your VM - is that what you intended? You'll need a router to serve up IP addresses if you want to avoid manual configuration.

Internal networking should work - that's a fully virtual network between VMs. No physical links hence no internet access.

NAT networking is similar, but uses the host to get limited internet access.

Host interface networking is similar to internal networking. No internet, but does let you talk to the host (good for things like printer sharing).

Re: Server and client on two images

Posted: 9. Oct 2014, 02:08
by BillG
What exactly was your problem using the internal network? It should work exactly as if they were two physical machines connected to the same hub/switch. Did you give them IP addresses in the same IP subnet? (Even if you didn't, they should still have been able to communicate using APIPA addresses if they were set to get an IP automatically).

Re: Server and client on two images

Posted: 9. Oct 2014, 12:30
by JimboSan
Well the problem is that the computers are not connected. They get the same IP as default and even if i manually change the ip's, the computers can't ping each other. Could there be a problem when trying to connect 2 cloned versions of an image together? I have a 32bit W7 image which i've cloned twice, and these 2 clones are the ones i'm trying to connect to each other.

Re: Server and client on two images

Posted: 9. Oct 2014, 12:32
by mpack
You need to make sure that the clones have different MAC addresses (in Network|nic1|Advanced), otherwise the router will consider them to be the same PC, and only assign one local IP address.

Re: Server and client on two images

Posted: 9. Oct 2014, 13:09
by JimboSan
That did it!

Thank you very much :)