Page 1 of 1

Having a second internet connection thanks to a VM ?

Posted: 20. Sep 2010, 15:18
by ithaque
Hello,

currently, my main computer in connected to internet through an ethernet connection.

i'm using virtual box, and i'd like to know if it would be possible to connect a virtual machine to internet through a connection different from the one of my main computer ? with a wifi connection for instance ?
Thus, i would have 2 IP adress on the same computer ...

thanks in advance for your responde

Re: Having a second internet connection thanks to a VM ?

Posted: 20. Sep 2010, 19:58
by Sasquatch
If you bridge the VM to your physical interface, it will become like a separate computer on the network. If you have two different networks at your house, one wifi and one LAN, and you want for example to separate the VM from the Host with that, you can give the VM the LAN adapter and the Host will use the wifi. Make sure you disable all other options in the interface properties so that the Host won't use the adapter for anything. Of course, the VirtualBox Bridged adapter needs to be enabled for the Guest to use it.

If you have a USB wifi stick, you can pass it to the VM to give it it's own dedicated interface and connect to a wifi network with that.

Re: Having a second internet connection thanks to a VM ?

Posted: 8. Oct 2010, 20:21
by ithaque
in fact , i would like to keep my computer connected to internet through an ethernet connection, and to connect a virtual box through a wifi connection (i have a Wifi internal card)

what do you mean by a bridge ?
could you explain me how to proceed in details please ?
thx

Re: Having a second internet connection thanks to a VM ?

Posted: 9. Oct 2010, 01:11
by Sasquatch
Read the manual, chapter 6, and you know all about the network options in VB.

If you need to use bridged because the wifi isn't a USB adapter, then you can just disable the TCP protocols on the adapter properties on the Host side. Connect to the access-point with it and let the Guest obtain an IP address through the bridged connection.

Re: Having a second internet connection thanks to a VM ?

Posted: 9. Oct 2010, 02:05
by BillG
As Sasquatch said, you need to read up on the different networking options.

I would like to comment on your statement that "you would have two IP addresses on the one machine". In fact that is not what happens. You need to get used to the fact that the vm is not the same machine as the host.

If you set this up properly it will certainly work. But the host will not have two IP addresses. The host and the guest will each have its own IP address. Each OS will use one physical NIC of the host machine.

Re: Having a second internet connection thanks to a VM ?

Posted: 9. Oct 2010, 09:37
by ithaque
Sasquatch wrote:Read the manual, chapter 6, and you know all about the network options in VB.
thx i didn't think to read the manuel help ....
BillG wrote: I would like to comment on your statement that "you would have two IP addresses on the one machine". In fact that is not what happens. You need to get used to the fact that the vm is not the same machine as the host.

If you set this up properly it will certainly work. But the host will not have two IP addresses. The host and the guest will each have its own IP address. Each OS will use one physical NIC of the host machine.
no i don't want to have two IP address on the host machine, but i would like that guest and host have their own ip adress, and that's seems to be possible ;)

Re: Having a second internet connection thanks to a VM ?

Posted: 15. Oct 2010, 02:41
by Catsrules
[/quote]
no i don't want to have two IP address on the host machine, but i would like that guest and host have their own ip adress, and that's seems to be possible ;)[/quote]

Yeah, the is what bridge option does. gives everyone there own IP, so other device on your network can see you Guest.
You will in fact be using up 3 of your network's IP addresses, You Host will have both eathernet and WiFi and your Guest will have one as well, with its one network card.

Re: Having a second internet connection thanks to a VM ?

Posted: 16. Oct 2010, 15:39
by Sasquatch
Catsrules wrote:Yeah, the is what bridge option does. gives everyone there own IP, so other device on your network can see you Guest.
You will in fact be using up 3 of your network's IP addresses, You Host will have both eathernet and WiFi and your Guest will have one as well, with its one network card.
Unless you disable the TCP/IP section on the Host side so it doesn't request an IP on that interface. Then you use 2, one on the Host, and one on the Guest with it's separate adapter/network.