1

Basically, I want to be able to run Windows XP as the host OS (for a few processor-hungry apps) with the driver for ethernet (and thus access to the internet) disabled. However, I want a guest operating system in a virtual machine to be able to access the internet - taking direct control of the ethernet hardware, and using its own drivers. The guest operating system would be some relatively lightweight version of Linux.

One reason for wanting this is to be able to uninstall firewall and some other security system from Windows XP, since it should have no internet (or other) connectivity and should therefore be pretty secure without that drain on resources. There should therefore be no virtual network connectivity between guest and host either. Some kind of shared folder support would be appreciated, of course.

Is this possible? If so, which virtual machine software can support it? And is there any free-as-in-beer VM software that can do this.

1
  • An idea I had worth mentioning, but which I haven't tried, is to use a USB Ethernet gizmo. Most desktop VMs are quite happy to redirect USB devices to the guest O/S.
    – user31438
    Commented Oct 13, 2011 at 21:48

3 Answers 3

1

I do not have experience with this specific setup, but you might try Xen: http://mediakey.dk/~cc/howto-install-windows-xp-vista-on-xen/. That way, you would have both Linux and Windows running as peers, with Xen as their "daddy". This should accommodate what you need.

Note that for unmodified Windows, you need Xen 3.0 and a CPU that supports hardware virtualization - see here the relevant section: http://en.wikipedia.org/wiki/Xen.

Others might be able to confirm whether this is going to work as needed or not.

5
  • Rats - the machine involved is just a tad too old for hardware virtualisation. Still, it does need replacing, and as soon as I can spare the pennies... IOW this sounds like a possible option for the near future.
    – user31438
    Commented Nov 13, 2010 at 19:16
  • Well, you are out of luck there. Anyway, if that's the case, I don't see why you should not try with the current setup anyway. I don't think there are going to be major issues with VM going through the host which has firewalls/antivirus software. You can even specifically disable firewall for VM's IP(s)/processes. Try VirtualBox - easy to setup, you can download many small Linux distributions to try out, it's pretty quick and you'll know better. Commented Nov 13, 2010 at 19:24
  • As Stephen Jennings answer sadly didn't pan out, I am back to this one. Not tested, of course, as it depends on me buying a new machine. Though that's probably not far off now.
    – user31438
    Commented Nov 17, 2010 at 20:12
  • It's definitively going to work if you buy a machine supporting virtualization, but please revert here with your results and of course if you have any issues. Commented Nov 17, 2010 at 21:04
  • Ah - well - one thing is, once I have a new machine, I'm likely to be much less worried about the resource drain from firewall/antivirus etc. I may try it anyway, though.
    – user31438
    Commented Nov 18, 2010 at 12:59
1

Rather than disabling the entire network interface in Windows, try disabling every protocol under the interface's property window (Client for Microsoft Networks, Internet Protocol, etc.).

This should prevent any communication on the part of the Windows host, but might still allow the VM to bind to the adapter and have its own connectivity.

3
  • Accepted, though I've not yet got it working 100%. I can certainly disable Windows internet access this way, but I've been having problems getting a Linux guest in VirtualBox to access the internet for some reason (happened before and I resolved it, but I don't remember how). This happens whether these protocols are enabled or disabled, so it isn't the cause, but as I say I haven't yet confirmed that the guest can still access the internet etc.
    – user31438
    Commented Nov 13, 2010 at 22:02
  • Sorry - I have to withdraw the accept on this. I now have a working Ubuntu (not exactly lightweight, but I decided to go for friendly ATM) as a guest in VirtualBox. Internet works fine - until I disable the TCP/IP protocol for the ethernet on the Windows XP host. The protocol support seems to be needed in the host to allow the guest to access the internet, which obviously means the host is on the internet too.
    – user31438
    Commented Nov 17, 2010 at 20:10
  • Ah, well, it was worth a shot. Too bad. Commented Nov 18, 2010 at 4:52
0

I'd rather use Linux as host system, and Windows XP as guest, maybe with host-only network, but I can think a quick and dirty solution for your case anyways.

In short: install VirtualBox, install a Linux guest, get an USB network adapter, and configure VirtualBox to connect that piece of hardware directly to your guest machine, and disable any network card accessible to your Windows host.

In detail:

  1. Download and install VirtualBox on your Windows XP host system. It's free and open source. Download and install also the proprietary VirtualBox Extension Pack, that, among other things, lets you connect USB devices directly to your virtual machines.
  2. Create a new virtual machine, and install a GNU/Linux system on it. Try Lubuntu for a very lightweight but still very usable system.
  3. Install VirtualBox Guest Additions on the VM. Best way to do it may depend on your guest OS. For example, if you are running a recent version of Ubuntu (or any derivative of it, like Lubuntu), you can install them from regular repositories.
  4. Once you're sure your guest OS is running fine, disable any networking hardware accessible to your host system. For example, disconnect any ethernet cable, or disable wifi from your mainboard BIOS.
  5. Get an USB network adapter, or an USB Wifi adapter that is known to work with your Linux OS. Nowadays you can buy such a device with less than 20€, and most of them are supported by Linux out-of-the-box. We are going to connect this device directly your virtual machine.
  6. Shut down your virtual machine, and open its VirtualBox settings window. Be sure your USB network adapter is disconnected. Now we are going to tell VirtualBox to connect that USB network adapter directly to your VM. Here's how:
    1. Go to Ports tab, and look at USB ports settings. There should be an icon with a USB cable with superimposed a green "plus" sign.
    2. Click on it: this will list the USB devices currently available. It may appear your keyboard, your mouse or your webcam. Take note of the devices you are seeing right now.
    3. Now dismiss that list, and connect your USB network card. Tell Windows to ignore this new piece of hardware.
    4. Back to Virtualbox, click again on that USB cable icon with the green plus sign: now you should see all the previous devices AND your new device. Click on it to add it to the list of devices that will be connected directly to your virtual machine.
  7. Go to Network tab, and disable the VirtualBox-provided network card. This way we added an USB network adapter that can be directly connected to the Internet, and disabled the virtual network adapter that use your host OS to connect to the Internet.
  8. Now boot your guest OS. You should see that its old network card is not available any more, but there's a new network interface. Most of Linux systems are "smart enough" to cope with this change of network, and to connect seamlessly to the network.

Warning: This should work, but I never tried all these steps myself, I just connected once an USB wifi adapter to a Linux guest running on Virtualbox to debug some wifi problems.

You can expect problems with Windows trying to use your USB network device anyways, even if you instruct Windows to ignore it, making it difficult for the virtual machine guest to access that hardware.

5
  • At the time of the post, Windows was still my main operating system. Internet access wasn't (and still isn't) needed most of the time, so running a Linux distro in a VM was supposed to allow me to keep access to all my main software, development environments etc without internet access, but allow me that one window (when needed) where I could run a browser, get e-mails etc. Using VirtualBox, whether on a Linux or Windows host, is obvious, is something I've been doing for a very long time (many years before asking that question) but wasn't ideal for what I wanted at the time.
    – user31438
    Commented Feb 15, 2017 at 6:14
  • ATM my main PC has Linux Mint 18.1 and Windows 7 Pro installed on an SSD, Windows XP and an old install of Windows 7 Pro I haven't wiped yet on a hard disk, and I use VirtualBox from the Linux Mint 18.1 host for a few Windows guests (mainly Windows XP). Windows has networking disabled both as a guest and as a host - only Linux sees my router. USB3 support is necessary even for USB2 devices because the ports are USB3, this needs selecting a special command-line option to change the emulated USB3 hardware to one with available XP drivers.
    – user31438
    Commented Feb 15, 2017 at 6:20
  • Oddly, it's actually the default emulated USB3 hardware that causes crashing and corruption of USB sticks for me. The Linux Mint 18.1 got an update to VirtualBox in the last few days, though - I assume a minor version bump (currently have 5.0.32_Ubuntu r112930) - which I haven't used the USB support for yet. I understand VirtualBox is at 5.1.? - not sure why the default Linux Mint repos don't have that yet and it's not a serious enough issue to worry - if I really need robust Windows with safe USB, I just reboot into it (in less than 40 seconds these days) anyway.
    – user31438
    Commented Feb 15, 2017 at 6:25
  • Another random note - these days, Linux is actually my main development O/S - but only for Android development. Getting the development environment is easy on Linux (would be on Windows too, but not without internet) but the lack of Notepad++ on Linux keeps me switching back to Windows for everything else, even using MinGW GCC as the compiler. gedit is good, but still not quite there (and for some reason Linux Mint 18.1 switched to a different default editor) and I still think vim and emacs users need their heads tested (though I use emacs from time to time for org-mode).
    – user31438
    Commented Feb 15, 2017 at 6:33
  • I missed something from the first comment - the USB ethernet gadget is actually something I tried at the time, but it didn't work. I don't remember for sure why, but probably just an ancient USB1 ethernet gadget that predated some key standardization. Pretty sure the only gadget I have for that only works on my Windows 98 box. The real thing, though, is that while it should be a cheap solution, (1) you're right about quick and dirty, (2) USB support for VirtualBox - almost as soon as they got USB2 right, USB3 adoption broke it again, and (3) the question is more than 6 years old.
    – user31438
    Commented Feb 15, 2017 at 6:50

You must log in to answer this question.