Server and client on two images

Discussions about using Windows guests in VirtualBox.
Post Reply
JimboSan
Posts: 4
Joined: 8. Oct 2014, 12:32

Server and client on two images

Post 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
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Server and client on two images

Post by mpack »

VBox supports several suitable networking modes. Check out the user manual.
JimboSan
Posts: 4
Joined: 8. Oct 2014, 12:32

Re: Server and client on two images

Post 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.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Server and client on two images

Post 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).
BillG
Volunteer
Posts: 5106
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Server and client on two images

Post 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).
Bill
JimboSan
Posts: 4
Joined: 8. Oct 2014, 12:32

Re: Server and client on two images

Post 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.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Server and client on two images

Post 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.
JimboSan
Posts: 4
Joined: 8. Oct 2014, 12:32

Re: Server and client on two images

Post by JimboSan »

That did it!

Thank you very much :)
Post Reply