2 Linux VMs running on Windows 10

Discussions related to using VirtualBox on Windows hosts.
Post Reply
bubbaT
Posts: 7
Joined: 15. Jul 2020, 00:53

2 Linux VMs running on Windows 10

Post by bubbaT »

Hello,
I am running VirutalBox on Windows 10 and want to create two VMs, one a web tier and one a database tier, both using Linux.
How can I (if possible) get my Windows 10 host system to "see" the two VMs (web and database tiers running Linux) so I can create on my laptop a 3-tiered architecture?
NOTE: I do have the necessary disk, memory and CPU resources for this stack.
Thanks.

BubbaT
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: 2 Linux VMs running on Windows 10

Post by scottgus1 »

You will need a network. I don't know what you mean by "a 3-tiered architecture", but you can put both guests in the same LAN as the host, or string them together so the host can only see the first guest, then the first and second guest have a separate network.

See Virtualbox Networks: In Pictures
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: 2 Linux VMs running on Windows 10

Post by BillG »

Are you sure you mean a 3-tiered architecture? That sounds like a 2-tier setup. A web server and a database server run at the same level. It would only be 3-tier if the client had to access the web server to reach the database server. If that is what you want, it is much harder to do on a laptop.
Bill
bubbaT
Posts: 7
Joined: 15. Jul 2020, 00:53

Re: 2 Linux VMs running on Windows 10

Post by bubbaT »

It's 3-tier

Physically: All on one laptop - running Host OS Windows 10 and 2 Linux VMs running in VirtualBox
Logically: Chrome (on Windows) -> Tomcat (on Linux VM #1) -> MySQL (on Linux VM #2)
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: 2 Linux VMs running on Windows 10

Post by scottgus1 »

As I see it, the configuration of the networks between these guests depend on how you want the host to see the Tomcat guest, then how you want the Tomcat guest to see the MySQL guest. Virtualbox has several network types you can use. Look at the Pictures tutorial.

Tomcat to MySQL, use Internal. Internal defaults to having no DHCP server, so you would need static IP's on the Internal network cards in the guest OS's. Use a different IP address range than anywhere else on your host.

Host browser to Tomcat:
If you want the Tomcat in your host's LAN, use Bridged. Other LAN computers can access Tomcat too.
If you want the host to pretend it has to go over the internet to get to Tomcat, use NAT, and open needed ports in NAT.
bubbaT
Posts: 7
Joined: 15. Jul 2020, 00:53

Re: 2 Linux VMs running on Windows 10

Post by bubbaT »

Thanks. For the browser, I'll be going the route "If you want the host to pretend it has to go over the internet to get to Tomcat, use NAT, and open needed ports in NAT."
Where might I find the "Pictures Tutorial"?
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: 2 Linux VMs running on Windows 10

Post by scottgus1 »

bubbaT wrote:Where might I find the "Pictures Tutorial"?
That's the link in my first post above.
bubbaT
Posts: 7
Joined: 15. Jul 2020, 00:53

Re: 2 Linux VMs running on Windows 10

Post by bubbaT »

Oh, ok. Forgot about that first response. Thanks again for your help (and the help from others).
Post Reply