Hi everyone,
First time poster on here and I hope I have posted this right?
I have two computers both are Windows 7 64bit and both have virtual box installed am trying to make it so both VM computers can talk to each other right now they can’t even ping each other.
I could just bridge them both but that’s not what I need as I want the VMS on their own network.
Right now my network is
(With virtual box) PC 1 > Router/Internet < PC 2 (with virtual box)
What I would like is something like this:
PC 1 > Router/Internet < PC 2 (Network 1)
PC 1 virtual box vms > ? <PC 2 virtual box vms (Network 2/ with no internet)
Am at a lost here as am not very good with networks and know only basic stuff. I was told I could use a VLAN to make the network 2 part? But again not sure how to make this work!
Thanks Everyone!
-Ink
I have two computers with virtualbox how can I connect them without internet access?
-
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: I have two computers with virtualbox how can I connect them without internet access?
There is no magic involved with networking virtual machines. You still use the same routing techniques as you use with physical ones. You can't get two vms on different hosts to see each other except by using the physical network between the hosts. They can't magically be in their own network when there is no physical connection.
Just look at the problem as if they were all physical machines. The networking setup you need will be just the same. You will definitely need to use bridged mode to see one vm from the other. After that, it is purely a networking question.
Just look at the problem as if they were all physical machines. The networking setup you need will be just the same. You will definitely need to use bridged mode to see one vm from the other. After that, it is purely a networking question.
Bill
-
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: I have two computers with virtualbox how can I connect them without internet access?
If you connect two normal host computers together so the guests can talk to each other, the host computers themselves and the guests will all be able to talk to each other, too, because all the host and guest network traffic is going out throuh the one network port on each host computer.
The solution is to provide two network ports on each host computer. Once the host OS can see that there are two physical network cards, one of the cards can be set aside for Virtualbox and the other for the host OS. You can get a new network card for a regular PC and connect it to one of the internal slots. A laptop usually has both wired Ethernet and wi-fi adapters, so if you're using a laptop and are willing to have one of your connections wi-fi, then the laptop is ready.
To split up the network cards, open each card's Properties window: Control Panel, Network & Sharing Center, left pane, Change Adapter Settings, right-click desired network adapter, Properties, Networking tab . (This is Windows-centric advice, I'm sure there's a Mac/Linux equivalent.) In the "This connection uses the following items:" box is a list of all sorts of "bindings" that use the network card. One or two will have "Virtualbox" in the name of the binding. On the card you want to dedicate to Virtualbox, uncheck all of the other bindings that do not have "Virtualbox" in the name, and leave the Virtualbox binding(s) checked. On the card you wish set for the host OS, do the opposite with the bindings: uncheck the Virtualbox binding(s) and leave all the others checked. In the guests' Virtualbox Network settings, set the network to Bridged, and chose the guest-dedicated network adapters.
Connect the host-OS-dedicated adapters to the router with the internet. If you have another router you can connect the guest-dedicated cards to it and not have an internet connection to the WAN port on that router. Otherwise, you can get an Ethernet switch (looks something like this) and connect the guest-dedicated ports to it. If you are sure you only will be connecting the two guests and no others, simply connect the two ports with an Ethernet cable. (Note that you may need a special "cross-over" cable in this case, depending on the capabilities of the guest-only cards.)
If you used a second router as the connection device between the guest network cards, the two guests should get IP addresses from the router and be ready to communicate. If you used a switch or Ethernet cable, you will need to set static IP addresses in the guest OS's.
One other thing: Although the guest OS's and the host OS's should be on entirely different networks and should therefore be able to use the same IP address range without conflicts, it may be wise to set the guests' IP address range to a different range than the hosts' network, just to avoid confusion.
The solution is to provide two network ports on each host computer. Once the host OS can see that there are two physical network cards, one of the cards can be set aside for Virtualbox and the other for the host OS. You can get a new network card for a regular PC and connect it to one of the internal slots. A laptop usually has both wired Ethernet and wi-fi adapters, so if you're using a laptop and are willing to have one of your connections wi-fi, then the laptop is ready.
To split up the network cards, open each card's Properties window: Control Panel, Network & Sharing Center, left pane, Change Adapter Settings, right-click desired network adapter, Properties, Networking tab . (This is Windows-centric advice, I'm sure there's a Mac/Linux equivalent.) In the "This connection uses the following items:" box is a list of all sorts of "bindings" that use the network card. One or two will have "Virtualbox" in the name of the binding. On the card you want to dedicate to Virtualbox, uncheck all of the other bindings that do not have "Virtualbox" in the name, and leave the Virtualbox binding(s) checked. On the card you wish set for the host OS, do the opposite with the bindings: uncheck the Virtualbox binding(s) and leave all the others checked. In the guests' Virtualbox Network settings, set the network to Bridged, and chose the guest-dedicated network adapters.
Connect the host-OS-dedicated adapters to the router with the internet. If you have another router you can connect the guest-dedicated cards to it and not have an internet connection to the WAN port on that router. Otherwise, you can get an Ethernet switch (looks something like this) and connect the guest-dedicated ports to it. If you are sure you only will be connecting the two guests and no others, simply connect the two ports with an Ethernet cable. (Note that you may need a special "cross-over" cable in this case, depending on the capabilities of the guest-only cards.)
If you used a second router as the connection device between the guest network cards, the two guests should get IP addresses from the router and be ready to communicate. If you used a switch or Ethernet cable, you will need to set static IP addresses in the guest OS's.
One other thing: Although the guest OS's and the host OS's should be on entirely different networks and should therefore be able to use the same IP address range without conflicts, it may be wise to set the guests' IP address range to a different range than the hosts' network, just to avoid confusion.