1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Other Virtualization question

Discussion in 'Software' started by Chicken76, 25 Jul 2011.

  1. Chicken76

    Chicken76 Minimodder

    Joined:
    10 Nov 2009
    Posts:
    952
    Likes Received:
    32
    Ok, my experience with virtualization is really tiny, so this question may seem stupid. Please don't laugh ... too loud.

    Is there any virtualization solution that can assign entire devices based on their bus ID to a virtual machine of choice? Think network cards, USB controllers, graphics cards, etc.

    Say, a hypervisor runs virtual machines A, B and C.
    The machine has four network cards plugged in: NIC1, NIC2, NIC3, NIC4
    Let's say NIC1 is used by the hypervisor for administration (and maybe shared with the virtual machines if needed?)

    Q1: Can NIC2 be assigned exclusively to virtual machine A? That is, B and C won't see it at all, and A can talk to it directly, install the driver for it, which will work as if that OS was running directly on some hardware with NIC2 plugged in?

    Q2: If the answer to Q1 is affirmative, does NIC2 have to be supported by the hypervisor, or is hardware independent assignment possible (as in "the device with bus ID xx.yy is to be used by Virt.Mach.A exclusively and I don't care what it is", says the hypervisor)
     
  2. Zoon

    Zoon Hunting Wabbits since the 80s

    Joined:
    12 Mar 2001
    Posts:
    5,888
    Likes Received:
    824
    I only use VMware products so this slants my answer.

    Scenario 1 - you have a dedicated server PC available and you never want to use it as a "desktop"

    Use VMware ESXi 4.1 - its free. It will detect the NICs individually and then give them a "meta" name within the ESX environment of "vmnic1" through "vmnicn" - these then have a port group assigned on top of them, and you can give your virtual machines a virtual NIC, bound to the port group.

    If you assign one port group per NIC, and one virtual per port group, you have your one-to-one mapping.

    Scenario 2 - you wish to use your workstation for a desktop at the same time

    VMware Server - free - can do the same thing as above but in a slightly different manner. You use the "Manage Virtual Networks" tool to make a "Bridged NIC" and name it "<server_1_Lan>" or something of your choice that you'll remember. You then assign a virtual NIC and connect it to "<server_1_lan>" or whatever you called it.

    VMware Workstation - same as server but not free and you can control the networking better.


    Hope this helped.
     
  3. Chicken76

    Chicken76 Minimodder

    Joined:
    10 Nov 2009
    Posts:
    952
    Likes Received:
    32
    Thank you for your suggestions, but what if the other NICs are not supported by VMware? Is there a way to assign devices to virtual machines independent of support from supervisor? What if instead of NICs, we use USB controllers?
     
  4. Chicken76

    Chicken76 Minimodder

    Joined:
    10 Nov 2009
    Posts:
    952
    Likes Received:
    32
    Upon further research, I'm inclined to think that what I should be looking for is VT-d support.
    Am I right to think that for socket 1366 support for VT-d is in the chipset and for socket 1155 in the CPU?
     
  5. lp rob1

    lp rob1 Modder

    Joined:
    14 Jun 2010
    Posts:
    1,530
    Likes Received:
    140
    I use VirtualBox. It can assign a network adapter to each virtual machine, but the virtual machine sees a generic adapter (with full capabilities, of course) not the hardware itself. This is why virtualization has such an overhead - the software needs to convert the socket calls from the virtual machine and send a new socket call over the real hardware.

    As far as USB devices go, VirtualBox has it covered - as far as the settings say. I haven't tried it myself, but there is an option to enable a USB controller for the virtual machine, then filter out the devices that you don't want it to see.

    What's more, if you are using Linux (there is no reason you shouldn't) then most package managers have VirtualBox in the repository. This means it is installed, updated and maintained automatically. I know for certain Ubuntu's Synaptic has it.
     
  6. Zoon

    Zoon Hunting Wabbits since the 80s

    Joined:
    12 Mar 2001
    Posts:
    5,888
    Likes Received:
    824
    Most NICs are supported by VMware ESXi as its based on RedHat underneath, although as its server-class virtulization it will be restricted to a point. Under Workstation and Server it depends on your operating system's drivers - if you have a driver for it, VMware can use it.
    I've not heard of VT-d but I have heard of VT-x. Most Intel chips from core 2 duo and up support that so yes, 1366 and 1155 have it.
    +1 to this - whatever the method of assigning a dedicated NIC to a virtual, I'm not aware that any virtualisation software maps directly to the hardware for network cards. Instead, it has a virtual NIC which you then map in your hypervisor to appropriate hardware.

    You can usually map USB hardware directly through to the virtual machine, but even in the enterprise class I can't possibly see what you'd gain.

    Even in the large VMware environment we host in our datacentres at work we have a single 1GB NIC shared for all servers with a second in failover mode - you're going to have an I/O limit on the hard drive which means you'll never overload it anyway.
     
  7. saspro

    saspro IT monkey

    Joined:
    23 Apr 2009
    Posts:
    9,613
    Likes Received:
    404
    Intel Pro 1000 adapters work well in ESXi.

    We use flex-10 in out datacentre but that's a rather large installation
     
  8. lp rob1

    lp rob1 Modder

    Joined:
    14 Jun 2010
    Posts:
    1,530
    Likes Received:
    140
    In the end, all the main virtualization solutions provide similar things. I can do everything I want with VirtualBox, and I expect that VMware can do it all as well. So the only real difference is interface and price. Seeing as the products that we are talking about are free, then simply choose the one that feels the best to you. Try VirtualBox, if you aren't happy with it, try VMware. If that isn't good enough, then there is a plethora of other products out there.
     
  9. OCJunkie

    OCJunkie OC your Dremel too

    Joined:
    19 Apr 2011
    Posts:
    619
    Likes Received:
    19
    ^ This man speaketh the truth. I also personally use VirtualBox and it does everything I need and what you're asking) for free. I find it more convenient than VMWare but they both have their pros/cons. Start with VBox as you can just quickly slap it on an existing functional machine right away and go from there?
     
  10. Zoon

    Zoon Hunting Wabbits since the 80s

    Joined:
    12 Mar 2001
    Posts:
    5,888
    Likes Received:
    824
    Fixed :thumb:
     
  11. lp rob1

    lp rob1 Modder

    Joined:
    14 Jun 2010
    Posts:
    1,530
    Likes Received:
    140
    Oh dear. Imma get my firewall up - a flamewar is starting! :wallbash:
     
  12. OCJunkie

    OCJunkie OC your Dremel too

    Joined:
    19 Apr 2011
    Posts:
    619
    Likes Received:
    19
    :nono: I said what I meant, thanks.
     
  13. Zoon

    Zoon Hunting Wabbits since the 80s

    Joined:
    12 Mar 2001
    Posts:
    5,888
    Likes Received:
    824
    Lighten up guys - I'm just having some fun, and trying to point out that as long as its free does it really matter what you go for?? :)
     
  14. lp rob1

    lp rob1 Modder

    Joined:
    14 Jun 2010
    Posts:
    1,530
    Likes Received:
    140
    Yes, because supporting the open source community is so much better than supporting a (potentially greedy *cough*Microsoft*cough*) multi-million dollar/yen/euro company. Now if only most games would run under Linux...

    Also, I think I got it wrong. The firewall will be no use - I need a virtual firewall!
     
  15. OCJunkie

    OCJunkie OC your Dremel too

    Joined:
    19 Apr 2011
    Posts:
    619
    Likes Received:
    19
    Lol I know zoon you're right as long as its free they both compare in most aspects. I was just saying it's probably quicker to get vbox running.
     
  16. Zoon

    Zoon Hunting Wabbits since the 80s

    Joined:
    12 Mar 2001
    Posts:
    5,888
    Likes Received:
    824
    Having never used Virtualbox I can't fairly rebutt that, however VMware Server does have .debs for Ubutu and Debian, RPMs and tar.gz for everything else, so its not that bad :)
     
  17. CraigWatson

    CraigWatson Level Chuck Norris

    Joined:
    9 Apr 2009
    Posts:
    721
    Likes Received:
    33
    I have used VMware (Workstation, ESXi/vSphere and Server), VirtualBox and also KVM (Linux kernel-based virtualisation) so hopefully I can give a balanced view here.

    VMware Server

    The first solution I would discount from the start is VMware Server. From experience (albeit 3 years ago), it's horrible and the only interface (web GUI attached to localhost) is very lacklustre, so it's a nightmare to manage. Even if these points have been ironed out over the last 3 years, there is still better options available out there, for free.

    VirtualBox

    ... which brings me nicely onto VirtualBox. VB is my personal favourite on the desktop virtualisation front - it's totally cross-O/S (has binaries for Linux, Mac OS and Windows) and is the first virtualisation tech to support Microsoft's 3D Aero interface and provide WDDM-signed display drivers for Windows guests (support for this was introduced in VB 4.1.0, it's still buggy in Ubuntu hosts but works fine in Windows and Mac) - it installs on top of an existing O/S so you will still need 3D/compositing to be available within the host O/S.

    VB is very point-and-click, and you have a number of networking options available - host-only, among them "bridged" which attaches a VM to a physical NIC of your choice. Multiple VMs can be attached to the same NIC, and they function as if they are part of your existing network. NAT is also available, where VMs sit on a separate subnet and use your PC as a router of sorts. If you are setting up a few VMs on a personal environment, then this is the software I'd recommend. A caveat to be aware of is that while the core VB application is available as Free Software under the GNU GPL, the VB Extensions Pack (which provides PXE Boot, USB pass-through among others) is bound by Oracle's PUEL, which prohibits use in commercial/business environments. Just something to be aware of.

    VMware ESXi/vSphere

    Most seasoned virtualisation guys would say that VMware ESXi (re-branded as vSphere - ESXi is the underlying architecture, which superseded ESX as of vSphere 4) is the gold-standard for virtualisation. I would generally agree with this - I run vSphere for my home network (the box has two NICs and acts as a router for my internal schtuff, my "home broadband" network is treated like a DMZ).

    VMware has a free version of vSphere available called vSphere Hypervisor. As the name suggests, this is a barebones hypervisor that you install instead of an O/S - the vSphere installer (not sure if this is just the full-fat version) runs to around 50MB. Yes, Megabytes. Installed size - it's that small. There are a number of drawbacks to vSphere. First: no Mac/Linux management. All management is done via VMware's vSphere Client, which is Windows-only. Second: no 3D. vSphere is marketed at enterprise server virtualisation, and enterprises don't need fancy 3D on their servers. Third: there's a 2TB limit on the size of your datastores (which are where you store your VMs) - this is a limit of the VMFS filesystem, and will (supposedly) be fixed in vSphere 5.

    You can very easily configure your server to have multiple NICs. These are connected to vSwitches (see a naming pattern? ;)) which are as they say. You connect VMs to vSwitches and the hypervisor acts as the transport. vSphere also allows PCI and USB pass-through (I think, I haven't tested this) so you can in theory hook up a printer and share it to a guest.

    If you are running in a business environment, and are considering full VMware deployment in the future, I would look at vSphere - you can seamlessly upgrade vSphere Hypervisor to paid licences in the future. The enterprise features of vSphere are beyond the scope here, but they're pretty decent, and it's easy to see why they've almost become the de-facto virtualisation standard.

    KVM

    This is the "dark horse" of the virtualisation world as far as I'm concerned. I'm only a newcomer myself after starting in April as a sysadmin at a company that uses KVM almost exclusively. If you already use Linux as your O/S of choice it's a very logical step. KVM runs on top of a Linux host, and that host can be as lean as you want. If you're visualising Linux guests, you can containerise these onto the host filesystem, so they're basically running chrooted. Big plus is that management is done via Linux's libvirt packages, so you can manage multiple hosts from a single console. You can also migrate VMs between hosts, though I'm not sure how well this works on a storage level if you're using LVMs etc, and I'm not sure if you can do "live" migration.

    You can give VMs direct access to LVM volumes or use image-based files like VB and VMware do. The downside of KVM is that the learning curve is fairly steep - especially for a non-Linux person. Bridging networks is particularly problematic as you have to get down and dirty in the config files and even then there may be some quirks. As a virtualisation platform goes, it's definitely something to consider, you can't argue with what works.



    Hardware

    Whatever your choice of software, two things: a) buy as much RAM as you can afford - you will be bottlenecked if you don't, and b) always check that your CPU can handle Intel's VT-d/x (I think the two are interchangable) or AMD's equivalent - your server will run like a pig if you don't have full virtualisation support. Go for as many cores as you can afford - HT is worthwhile too (quad-core becomes oct-thread). Go for RAM especially if you're running a full O/S as well as your VMs.

    If you're running vSphere, check the HCL before you buy. My homebrew vSphere server has two Intel PRO-1000 1Gb PCI NICs as the onboard wasn't supported. I also was restricted to a very complex RAID setup (involved installing vSphere on a small disk, and giving a VM direct access to my 2 x 1TB disks - then doing software RAID1 via OpenFiler and sharing an iSCSI LUN back to vSphere - nightmare!!) as ICHxR isn't supported either. I've since migrated to an LSI 9260-4i dedicated card and upgraded to a 4 x 1TB RAID5.

    Comments/questions welcomed :)

    // Edit: haha, just realised how much I waffle!! Feel free to skim :)
    // Edit 2: Pure ego-trip, but photos of my server (Atlantis) are here
    // Edit 3: Added more detail (!!) on KVM
     
    Last edited: 28 Jul 2011
    Chicken76 and lp rob1 like this.
  18. lp rob1

    lp rob1 Modder

    Joined:
    14 Jun 2010
    Posts:
    1,530
    Likes Received:
    140
    This is a very good comparison of the main hypervisors out there. +rep for you!

    I don't know what else to say really, you have it all covered. Good job! :thumb:
     
  19. Chicken76

    Chicken76 Minimodder

    Joined:
    10 Nov 2009
    Posts:
    952
    Likes Received:
    32
    Thank you so much CraigWatson. +Rep-ed you for that extensive explanation.

    The thing I'm after is called PCI pass-through, but have only found out what it's called after reading your post. Quick research into the matter showed that VT-d is a must, and that it's not the same thing as VT-x. The two complement each other to achieve full virtualization.

    Will have to dig a lot deeper, as from what I've read so far, it's not so clear which CPUs and chipsets support it and which don't. To make matters worse, even if you choose the right CPU+chipset combination, the Bios has to also work with VT-d, and not all motherboard manufacturers support it, and some even advertise that they do but their Bioses don't have fully working VT-d functions (looking at you, Asus)
     
  20. thehippoz

    thehippoz What's a Dremel?

    Joined:
    19 Dec 2008
    Posts:
    5,780
    Likes Received:
    174
    thing with virtualbox is it has problems with custom drivers.. I couldn't get some things working like injection.. heck even got latest version of snowleopard running in vmware and with the tools installed- fast enough to do some light gaming
     

Share This Page