Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

On a machine with multiple NICs, running either Windows or Linux, is it possible to dedicate a NIC to a VM such that the host won't even try to use it for itself? I suspect it isn't even possible but if it is, which OS and version and just how would I set it up?

The reason for this, apart from academic curiosity, is that I'm trying to set up a network lab for testing purposes. I currently have only a single spare machine, otherwise this wouldn't be an issue. One of the VMs will be the firewall for this lab network, so will need a dedicated NIC for the WAN interface. Neither ESXi nor Xen server will run on the machine, so I have to use a host OS.

share|improve this question

2 Answers 2

up vote 5 down vote accepted

I actually do this on Windows now - in a manner of speaking.

On the host OS, it has to see the NIC to actually pass it on to the guests, but I went into the adapter and disabled and detached most every service (IPv4/v6, netbios, etc.). I suppose it can still technically be talked to through things like ARP, but for my purposes - this was good enough and certainly the host isn't going to use it for anything useful.

In VirtualBox, I then selected that adapter and configured it in Bridged mode. Like magic, the guest appears as a full fledged machine on the LAN, and the host (at least on that adapter) appears invisible.

share|improve this answer
    
Superbly simple and effective. i.e. It does what I need it to do, regardless of any imperfections or side-effects. –  John Gardeniers Apr 30 '10 at 1:25

With a linux host there are plenty of ways to hack this up.

One of the neatest would be to use OpenVSwitch to manage the networking, then you just create a private vlan.

Another is to simply bridge the nics and simply don't have the host assign an IP address (If you need IPv6 you also need to mess about a little to disable ipv6 address creation, but if, like most, you don't care about ipv6 then you don't need to worry).

share|improve this answer
    
I'll give this a go the next time I put Linux on the host. Thanks. –  John Gardeniers Apr 30 '10 at 1:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.