Getting Virtual Windows XP to access network

Discussions related to using VirtualBox on Linux hosts.
Post Reply
Tsarj
Posts: 3
Joined: 24. Jul 2008, 20:56

Getting Virtual Windows XP to access network

Post by Tsarj »

I am a noob and need help setting up VirtualBox to apply my wireless connection to the Virtual Machine so I can use the Internet on my Virtual Machine... Can anyone make a walkthrough to help me? At work, will check back every fifteen. Thank you!
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post by Sasquatch »

Read the manual. Search the forums (forum search and google). Note that with wireless, HIF won't work with a brigdge.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Tsarj
Posts: 3
Joined: 24. Jul 2008, 20:56

Post by Tsarj »

Where in the manual? Under networking? So my wireless won't share? It has to be eth0, hardwired basically?

**Also, how do I delete the bridges and taps I made to start over to where the manual may point me to?**
bundabrg
Posts: 47
Joined: 22. Feb 2008, 04:01

Post by bundabrg »

To remove VirtualBox interfaces, use "VBoxDelIf" on each one.

Bridging won't work (easily) on wireless due to the nature of how wireless works, so HostIf can't (easily) be done. Use NAT and be done with it.

However, if you truly need bridging wirelessly, then the next easiest is to buy an Access Point, and run it in 'Client' mode, and connect to it using an ethernet cable, and have the Access Point connect wirelessly to your Access Point 'Server' node. Incidentally this is also how you can boot a machine via PXE wirelessly.

Next option is to NAT but you setup the NAT yourself ont he host. This doesn't have the limitations of the VirtualBox NAT, however is pretty complicated.

Otherwise, for the uber hackers, you have to do some seriously evil things like cloning MAC Addresses and setup a 'virtual repeater hub' to bridge wireless. Don't get me started.

- Brendan
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post by TerryE »

bundabrg wrote:Bridging won't work (easily) on wireless due to the nature of how wireless works, so HostIf can't (easily) be done. Use NAT and be done with it.
Whilst I agree with your synopsis 100%, my only comment that VMware seems to have solved this problem. This was the one functional loss that I real mMy Laptop uses wireless and I have the WAPs in my house: two on my home network (the house walls are 2ft thick so I need them both to get the coverage) and one for work and VPN into the office.

At the moment my work around is to put the VMs where I need bridged Enet onto my LAN connected PC and ssh/RDP into them from my laptop. This hasn't got to the pain point for me where I want to spend days working out a solution.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
bundabrg
Posts: 47
Joined: 22. Feb 2008, 04:01

Post by bundabrg »

I would be intrigued to know how VMWare does it. Bridging is a limitation of how wireless works and nothing to do with the OS.

The only other thing I can think of, possibly not possible with VB yet, but maybe how VMWare does it is that it does the following: -
- Gives the wireless interfaces the IP of its 'guest' as well. IE, if your wireless ip (of your pc) was '10.1.1.5' and your guest bridging has '10.1.1.6', then the host gives your pc both IP's. Linux could do this using 'ip addr add ...' syntax.

- It then somehow steals anything destined to that IP and places it into the Guest NIC. Probably under VB, the way to do it would be to have a TAP interface, that goes through userspace that separates the guest IP stuff, and passes through the normal stuff so the host see's this. The separates stuff goes to the Guest.

Actually, just thinking about it now, it _may_ be possible... The only problem is that it would only work with IP traffic. I wouldn't have a clue how you'd transport traffic that has no IP address (IE IPX, Netbuie, others I can't think of right now. maybe GRE). If vmware is able to do all these as well, then I take my hat off to them as I can't think how one could do it...

Easy with wired, damn difficult with wireless...
- Brendan
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post by TerryE »

I've taken VMware off my systems because it has a runtime footprint even if you are not using it. If I recall correctly the VMs appear on the network with virtual MAC address. I suspect that VMware "simply" implements a virtual router as a NT service / Linux daemon. This routes quite a few protocols, certainly including TCP, UDP, ICP and DHCP. So from the guest VMs view point it is not on the same segment at the host; it is on a virtual segment with the virtual router connecting it to the real segment. This is a bit like internal networking but with a router built in.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
bundabrg
Posts: 47
Joined: 22. Feb 2008, 04:01

Post by bundabrg »

I've been doing a bit of reading on the topic. This particular discussion looks like the point someone patched vmnet to bridge on wireless: -
http://communities.vmware.com/thread/95 ... 0&start=15

In fact a direct link to the patched code:-
http://www.hauke-m.de/fileadmin/vmware/vmnet.tar

- Brendan
Tsarj
Posts: 3
Joined: 24. Jul 2008, 20:56

Post by Tsarj »

So I am using NAT to network my Virtual Machine and XP doesn't recognize the ethernet controller... How do I solve this to get it on the net? Is it talking about an emulated controller through the virtual machine or the actual ethernet controller on the 'host'? Definitely need to get my XP running to do online courses :( Otherwise, dual booting, here I come. And I don't want to do that because I'm lazy...
AllenSco
Posts: 5
Joined: 27. Jul 2008, 22:54
Location: Alabama, USA

Post by AllenSco »

Hi folks. I installed VB-OSE today and loaded up WinXP. I didn't have to do anything to my networking (wireless) as it works fine. Here's a screenshot of what my network settings look like.

Image

The adapter shown is what XP is seeing (I suppose). I use the Intel Pro wireless card on this Dell Inspiron 1525 laptop. As you can see, NAT is selected and the box for cable connected is ticked. Hope this helps someone.

Allen
bundabrg
Posts: 47
Joined: 22. Feb 2008, 04:01

Post by bundabrg »

To AllenSco
You are using NAT, which will work fine. What we are discussing (in the last few posts anyway) is bridging.

That is, with NAT, your host becomes like a mini-router, and establishes a private network with the Guest. The guest connects out, and has its connections NATed (translated from the internal private network to the hosts external network). For example, your hosts IP may be '192.168.0.5' on the outside, but between it and the guest it may have something like '10.1.1.1' with you guest getting '10.1.1.2'

Bridging is where the guest looks like it is on the same network as the host. For example, if your hosts IP was '192.168.0.5', your guest could have '192.168.0.6'. More importantly, with bridging your host is not involved in the process and indeed doesn't even need to have an IP address, whereas the guest can still connect.

Difficult under wireless, but solved by VMWare. As a network professional myself as well as a programmer I was just curious how they managed it.
bundabrg
Posts: 47
Joined: 22. Feb 2008, 04:01

Post by bundabrg »

To Tsarj
I suggest looking at the Picture AllenSco has in his post above. It shows a typical network setting for NAT which should work for you.

You may also want to try install Guest Additions (see the manual), but as the NIC VB exposes is a common one, windows should already have the driver inbuilt.
Last edited by bundabrg on 28. Jul 2008, 14:54, edited 1 time in total.
AllenSco
Posts: 5
Joined: 27. Jul 2008, 22:54
Location: Alabama, USA

Post by AllenSco »

To brundabrg My mistake. I thought the OP was looking for a way to make it work the easiest possible way and was offering up my settings as an example. I was just skimming through and did not read all the posts in the entirety. I am definitely not a network (or Linux) expert by any means. I am learning like everyone else and this was my first experience with VirtualBox.

Regards,
A
bundabrg
Posts: 47
Joined: 22. Feb 2008, 04:01

Post by bundabrg »

My mistake actually. I was going off topic (or at a tangent anyway) and you were rightfully answering the original question.

- Brendan
Post Reply