r/homelab•
Stewge

Everyone is building more boxes and I shoved everything into one...

QUICK UPDATE 2016-04-20

A recent Proxmox update to the test repo brought shiny new things including a new 4.4 based Kernel, new GUI and LetsEncrypt support. All good things!

However, it currently messes up the PCI/E passthrough lines in your VM config file!

If you have followed this tutorial and since updated, you will need to open your VM config file again (as in Step 17) and fix the line!

You should be good to go again.

Power Consumption

Thought I'd update this as well. Got my cheapy power measurement in-line now. Typical power consumption is around 80-90W. Taxing the GPU under a gaming load takes it up to ~200W.

On first look, this might seem on the high side, but not surprising. The HDDs are quite old now and use about 5-6W each. With 6 of those we're using just 30W in drives. The Adaptec card is also a bit older and probably sucks down 25-30W on it's own (it sure dumps out plenty of heat).

Hi All,

Just thought I'd document and layout what I've been working on. A mission to get as much as possible into a single, quiet running HTPC box with how-to included for those interested. There's been tonnes of threads where peoples' homelabs are expanding into full racks with tonnes of gear (admittedly, some drool-worthy setups) and here I am going the opposite direction.

SO, for a long time I've been running 3 or more separate boxes. Usually something small as the router, a HTPC of some sort and a "Server"/NAS. Since I'm a gamer, the HTPC usually has to be something a bit gruntier than a NUC for TV gaming duty.

My last setup was something like this:

  • Mini-Itx low-power (i3) router
  • ATX Server/NAS (AMD FX8350) with VMs for downloaders/Sickbeard/Couchpotato/vent/teamspeak/gameservers/etc. Mass Storage was achieved with a USB3 external RAID enclosure (HotWay). The HotWay USB3 controller died which prompted this whole journey.
  • HTPC with mid-range hardware (i5-3550, 750Ti etc)

One thing I'm particularly aware of is the power consumption of the entire setup. Particularly the FX 8350. It's a hungry animal of a thing compared to Intel offerings. It's also massively wasteful on resources. 99% of all of this is just sitting idle most of the time. The Server/router/HTPC literally do almost nothing during the day and yet remain on 24/7 to keep various services ticking over or available.

I've been a long time user of Proxmox through work (been running prod since PVE 1.1!). I love me some VMs. Hell, even the i3 router was actually Proxmox with the router itself being a VM. But, the one thing that I could never virtualise was the HTPC. It was simply too dependant on hardware features that couldn't be translated into a VM. HDMI output, audio and 3D acceleration for games/interfaces just wasn't a thing for VMs. BUT no more!

One thing that's been coming along nicely over the past year is PCI/E passthrough support. Particularly bypassing some driver issues (ie Nvidia detecting virtualisation and disallowing driver installation....) and streamlining the whole thing with the use of VFIO.

My first thought was to smash it all together into the FX8350 platform as it was by far the most powerful. But due to some silly incompatibilities (motherboard BIOS was handling IOMMU strangely) that idea got scrapped.

Opportunity came up to snag an i7-2600 which would work in my HTPCs Z77 Extreme4 board (which was total overkill for the i5-3550 that went into it at the time, but they were so cheap!) so I got to work on a grand re-shuffling of hardware, including a new HTPC case.

Now to the good stuff.....

Hardware:

  • CPU: i7-2600 (Sandy Bridge)
    4 cores, 8 threads and decently fast. More importantly it supports VT-d for PCI passthrough.
  • Motherboard: ASRock Z77 Extreme 4
    Trusty old board with a surprising amount of BIOS features and VT-d support that ACTUALLY works. I actually have 2 of these now...
  • Cooler: Noctua NH-U9S
  • RAM: 2x 4GB 1600mhz Corsair + 2x 4GB 1600mhz G-Skill Ripjaws Just had this lying around really.
  • GPU1: Intel iGPU from the i7-2600
    This is particularly important. The motherboard allows the iGPU to override as the "default" GPU. This really only exists as a console to the Hypervisor in case of emergency, but handy nonetheless and saves needing an extra GPU just for the host. Keep this in mind if you go with a Xeon as they usually don't have the iGPU onboard.
  • GPU2: ASUS 750Ti STRIX
    This is the HTPC/gaming GPU that gets passed through. Nice and low power, good performance and nifty 0-fan mode to keep it quiet when idling.
  • NIC: Intel Gigabit 82574L PCIE 1x
  • SSD1: 250GB Samsung 850 EVO
    This is the "boot" drive for Proxmox. I also use to store the boot drives for the HTPC VM and downloader VMs.
  • HDD1: Seagate 2TB Barracuda
    This is the "data" drive I'll be using for the VMs. Notably, somewhere to store games for the HTPC and working ground for the other VMs. No redundancy required as nothing of importance really goes on there.
  • RAID: For mass media storage I've got an Adaptec 5805 with 5x2TB (Samsung Spinpoint) drives attached in a single RAID5. If you have enough SATA ports on your MOBO you can just use the native ZFS/RAID-Z support in PVE now. Mine doesn't have enough and I just had this lying around so it got used.
  • PSU: Corsair RM650x
    80+ Gold rating, higher than usual 50C operating temp and fully modular (fighting for space already)
  • CASE: Silverstone LC16M ATX (Black)
    Got this thing cheap because it was old stock. Slick brushed front, media knob and buttons, VFD LCD, IR remote, 6x 3.5" Drive slots, 2x 5.25 slots (1 internal), lots of fan mounts (1x 120mm in front of each drive cage, 2x 92mm rear exhausts) and enough height to fit the Noctua NH-U9S.
  • INPUT Devices: Rapoo mini wireless keyboard/mouse combo (HyperVisor), Logitech K400 wireless combo (HTPC), XBOX 360 Controller (HTPC)
    2 keyboards here because one needs to be passed through to the HTPC so you can control the damn thing! But when you do this, it's "removed" from the host/hypervisor so a 2nd keyboard is a must.

Software and VMS:

  • Hypervisor/NAS: Proxmox 4.1. It's free, Debian based with virtualization using KVM + LXC and has a nice Web GUI. Most importantly, the web console viewers are HTML5 now (no god-awful Java, woo!). My NAS requirements are pretty darn simple, so I'll actually be doing this entirely with the NFS server and Samba server packages which are easily installed. You could make the NAS a separate VM if you so desire and pass-through a RAID controller or use LVM to directly access disks.
  • Router VM: This will be running PfSense. Alternatively you could run VyOS or whatever else.
  • HTPC VM: This is the crown jewel. GPU and audio passed through so it appears natively. I can even overclock the GPU from inside the VM. With the 750Ti it has no problems with gaming as well (Xbox controller passed through). Currently hooked up to a 4K TV as well (30hz only unfortunately)
  • Downloader VM: This will run the usual gamut of Sab/Sick/Couch/etc and act as a background organiser of media. When/If the KODI server branch is finished I may run that in here as well.
  • Other: No doubt I'll have others running ventrilo/teamspeak and whatever else I feel like playing with. Notably, more powerful systems could run GPU assisted encoding like PLEX (including Quick-Sync if you passthrough the Intel iGPU). Or GPU rendering servers etc

HOW-TO EFI PCIE/GPU/USB Passthrough:

This is for EFI compliant GPUs. Anything newer than Nvidia 700 series and AMD r7/9 should be fine. You may have trouble with super low-end cards like the 710 which are old re-badges. All Intel iGPUs since Sandy Bridge support EFI natively.

Commands or config lines are in italics.

  1. Boot up to the BIOS. First thing to check is VT-X and VT-d support. These are both Disabled by default on the old Z77 Extreme 4. More modern boards will usually enable VT-X and VT-d by default now.

  2. Proxmox 4.1 base iso install. Installed to the SSD. The RAID card and 2TB data drive are disconnected as the PVE installer always installs the bootloader to the first drive detected (which is a pain in the arse). Multiple drives can screw with this sometimes. Once installed you can plug the other drives back in.

  3. Add the Proxmox test repository as per: https://pve.proxmox.com/wiki/Package_repositories
    The Test repo is required as it has the much-needed VFIO improvements. Then apt-get update && apt-get -y dist-upgrade to download the new packages and kernel. Dist-upgrade is required as kernel upgrades will not be downloaded by the default "upgrade" option for stability reasons. Once that's done, reboot.

  4. Create an additional bridge for the 2nd NIC. In the Network tab just use "Create -> Linux Bridge". It'll automatically be called vmbr1 and input "eth1" into the "Bridge Ports". Everything else remains blank. This is so the Hypervisor is not addressable on the WAN side (that would be bad). The only thing that should interact with the WAN side is the router VM. More on the router VM later.

  5. Back to Passthrough stuff. Add "intel_iommu=on" and "pcie_acs_override=downstream" (NOTE1: see below) to your /etc/default/grub and run "update-grub" to apply changes. This is basically enabling IOMMU/VT-D support. Your boot line should look like this:
    GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on pcie_acs_override=downstream"

  6. Add modules to be started into /etc/modules. Just tack these in:
    vfio
    vfio_iommu_type1
    vfio_pci
    vfio_virqfd

  7. Next up, blacklisting modules. This is to prevent the Hypervisor from loading modules and taking over what you wish to pass through. In the case of GPUs it's easy. Add the following lines to /etc/modprobe.d/blacklist.conf (you can call it anything really):
    blacklist radeon
    blacklist nouveau
    blacklist nvidia
    That takes care of AMD and Nvidia cards. Furthermore, I'm also going to forward the onboard audio to my HTPC so better add those modules:
    blacklist snd_hda_intel
    blacklist snd_hda_codec
    From there, add any more you deem necessary. For example, if I did actually want to forward my RAID controller, I'd add "aacraid" to that list etc.

  8. Check for which PCI card needs to be passed through. In the case of GPUs typically in the 1st slot. For most this is 01:00.0 (GPU) and 01:00.1 (HDMI). Handily, sub-devices like the HDMI ports can all be forwarded by just referencing the root device like "01:00". In my case the devices for my 750Ti are:
    01:00.0 VGA compatible controller: NVIDIA Corporation GM107 [GeForce GTX 750 Ti] (rev a2) 01:00.1 Audio device: NVIDIA Corporation Device 0fbc (rev a1)

  9. Time to create a VM! I'll be using the EFI boot method as defining hardware is easier and doesn't require anything else OS specific. I'll be using Windows 10 so going through the GUI I set the following options:
    OS = Windows 8/10/2012
    ISO = Win10 iso you can upload through the GUI, or point to the Physical DVD drive if you have one
    HDD = Set "Bus" to SCSI. Set the rest to what you need
    CPU = Whatever you like here. Keep "type" on "Default(kvm64)"
    RAM = As you want
    *NETWORK = Use default Bridged mode and select vmbr0 (your LAN). Change Model to VirtIO for best performance. VirtIO is a 10gbit paravirtualized bridge so your VM->VM and VM->HOST (ie NAS) are less likely to be network bottlenecked which is particularly useful if you have SSD storage.
    Confirm

  10. Once the VM is created, there's a couple of extra bits we need to do in the GUI.
    Go to the "Options" tab for the VM and change "SCSI Controller Type" to VIRTIO.

  11. Next up, change "BIOS" to "OVMF (UEFI). This is very important. If you forget this, you'll have to re-install.

  12. You'll need the VirtIO Drivers for Windows for both Network and SCSI controller. You can get these in an ISO here: https://fedoraproject.org/wiki/Windows_Virtio_Drivers
    Then upload it via the GUI. You'll want the latest "virtio-win.iso".

  13. Fire up the VM and start the Windows Installation via the Web Interface "noVNC" console. We'll add the USB/PCIE devices after.

  14. You'll probably notice that no drives show up. That's because it needs the VirtIO driver from above. While the VM is running, edit your DVD device in the web-gui and select the VirtIO ISO file. Now back on the console you should be able to "add driver" and let select the relevant driver out of the "vioscsi" folder on the virtual DVD driver. Use the Win2012 driver for Windows 10.

  15. Once the SCSI driver is installed your drive should show up. Now you can change the connected DVD back to the Windows ISO or physical drive. Hit the "refresh" button and you should be able to Partition/Install.

  16. Get Windows running as you like. I also recommend grabbing GPU drivers and anything at this stage as well as doing Windows updates. Furthermore, it's a good idea to get RDP/Teamviewer up and running in case it goes pear shaped.

  17. Next we need to manually modify the VM config file. This is located in /etc/pve/qemu-server/<VMID>.conf. For the GPU, add the following line:
    hostpci0: 01:00,pcie=1,x-vga=on

  18. I'm also adding the sound-card. It's basically the same method but without the vga tag:
    hostpci1: 00:1b,pcie=1

  19. While you're there, another line needs to be added:
    machine: q35
    This seems to get around most driver detection issues. NOTE3 For Quadro/Tesla.

  20. One last command since this is using a Nvidia card:
    echo "options kvm ignore_msrs=1" > /etc/modprobe.d/kvm.conf
    This fixes up some benchmark/info programs from playing funny when detecting hardware.

  21. Time for USB devices! There's 2 ways to do this. I'm using the device ID method. This should ensure it passes through the device even if it gets plugged into a different port. The other method is by physical port. The port method can be handy if you want to "dedicate" a physical port to go to your HTPC. Nifty for front-header USB where you may plug external drives or usb sticks in (NOTE2 see below).
    So, you'll need to run "lsusb" to find out what you need and you'll get some stuff like this:
    Bus 006 Device 004: ID 045e:0719 Microsoft Corp. Xbox 360 Wireless Adapter
    Bus 006 Device 003: ID 046d:c52b Logitech, Inc. Unifying Receiver
    Bus 005 Device 003: ID 0bda:0151 Realtek Semiconductor Corp. Mass Storage Device (Multicard Reader)
    This is what I want passed through to mine so take note of the "ID".

  22. Open up your VM config again (same as step 13). Add some lines for USB devices like this:
    usb0: host=046d:c52b
    usb1: host=045e:0719
    usb2: host=0bda:0151

  23. Start up your VM. At this point the noVNC/HTML console will NOT work (including input). You'll need to make sure you have a screen plugged into your passthrough GPU as well as keyboard/mouse passed through to control it.

  24. Install GPU drivers. I stuck to Nvidia 359.06 because new drivers have been dodgy for regular users, nevermind VMs.

  25. Done! With the GPU passed through and keyboard it should be basically like a regular PC as far as the user is concerned.

Conclusion:

Ran Firestrike benchmark on mine (only 4 cpu cores assigned) and it works well:

http://www.3dmark.com/fs/7901281

For comparison, here's an older Firestrike I did with the same GPU in a Haswell i3 (2core+HT which should come up similar):

http://www.3dmark.com/fs/2590500

GPU actually goes up, but that's probably to do with newer drivers. The slower Haswell cores are much more efficient than the old Sandy Bridge ones though so the CPU side will appear weaksauce.

So, I succeeded. Down to 1 box from 3 (or more). With how fast CPUs are getting now the limit really is in what you can stuff into a box. For home-lab purposes it's great and largely achievable with desktop hardware.

For someone looking to get into it with new hardware, you could build a serious box with the new Xeon E3-12XXv5 offerings matched with the C232/C236 motherboards coming out (supports VTX, VT-d and ACS for the best combination). The ECC support there would be particularly handy for ZFS being the NAS as well. Throw a dumb HBA card at it and SoftRAID will work a charm for NAS duties. You can get Xeon E3 processors with the Intel GPU still enabled as well.

Alternatively, you could build a bit cheaper with an i7-6700 or similar. From what I'm told all of the Skylake chipsets support VT-D out of the box and not just the higher end Z170 chipset, so pick whichever has features best suited to you.

UPDATE 2016-04-20 Worth noting as well, all of this is just as applicable to full servers running Xeon E5 as well as some of the new Broadwell Xeon D-15XX offerings. There's great potential with some of these new boards like this:

http://www.supermicro.com.tw/products/motherboard/Xeon/D/X10SDV-7TP8F.cfm

Up to SIXTEEN cores (32 Threads) at 65W, DDR4 ECC, super fast M.2 PCIE slot, 6x Gbit LAN, 2x 10Gbit SFP+ and onboard LSI 2116 RAID/HBA controller with SAS2 connectors! Absolute monster of a board. Even though the slot is only 8X, it has an open back so you should theoretically be able to stick a full X16 GPU in there and simply run it on 8 Lanes only.

NOTE1: You only need "pcie_acs_override=downstream" if you're using an Intel i series processor that is NOT LGA2011 based or AMD. Basically, when using IOMMU/VT-d, PCIE devices are grouped up then forwarded. Problem is, with small socket Intel CPUs and AMD these groups cover MULTIPLE slots. In my case, both PCIE x16 slots are part of IOMMU group 1. This resulted in my GPU AND RAID card being passed through to VFIO at the same time which is not good since I need that RAID card in the hypervisor still. This is generally considered unsafe due to the potential ramifications of misdirected communication. In my case, it looks like ACS is simply a present, yet disabled feature. This may NOT be the case with AMD or other Intel CPUs (particularly lower end ones).

NOTE2: USB devices can be complicated. USB3 and USB2 devices are treated separately. Furthermore, some USB sticks don't play nice with the easy vendor:product ID system and may require the port method used instead. Furthermore, if you have multiple of the SAME device for some reason (e.g 2 XBOX controllers) then you'll probably have to use the port method as the vendor:product IDs will probably be the same.

On a related note, all Intel Xeon CPUs (including small socket E3) support ACS which allows you to have unique groups per device.

NOTE3: For Quadro, Tesla and other Nvidia Workstation type cards you'll need to add another line to your VM config like this:
args: -machine pc,max-ram-below-4g=1G
Tested this myself with a Quadro K620 and it would not boot without it.

If there's any questions or suggestions then I'd love to hear them. This is actually the closest to "production" I've actually taken GPU passthrough so there's a lot of new stuff going on here.

Sources/Links:

Proxmox Wiki:
PCI Passthrough: https://pve.proxmox.com/wiki/Pci_passthrough
USB Port mapping: https://pve.proxmox.com/wiki/USB_physical_port_mapping
USB Device Passthrough: https://pve.proxmox.com/wiki/USB_Devices_in_Virtual_Machines

Posted Mar 22, 2016, 4:02 AM UTC · edited

2827
moderately-extremist10yrs government sysadmin•

I don't understand why you would leave your HTPC on all the time? My HTPC is a beast for gaming, but I just turn it on when I'm going to game for a while or watch a movie, but I don't care to have it always available like a file server, and it doesn't do anything in the background. If it's being used, I will be sitting at the HTPC, so there is no need for it to be on all the time.

3
StewgeOP•

It's left on mostly due to keeping the library up-to-date. Kodi doesn't have a simple remote library system yet. Hopefully it's coming soon-ish. Currently just using the alert system build into sick/couch to trigger library updates.

Even though it was on 24/7, it's power footprint at idle was fairly low as it wasn inevitably the newest of all my boxes.

3
drashnaWS2012R2 Essentials + HyperV Server 2012R2•

Sure it does.

Use the MySQL Backend, and configure it to run on another computer to run the updates (such as on your NAS). Or use the Kodi - Emby bridge plugin and use Emby as the backend.

There are absolutely options here.

3

Yep the Emby plugin works great for this

3
StewgeOP•

Use the MySQL Backend,

I've looked at the SQL backend but I do a lot of version hopping within Kodi which presents problems. I'm currently playing around with both the 17.0 nightlies as well as the RetroPlayer fork. Usually I just stick to the regular backend and re-scan whenever I switch.

Not the best solution, granted I haven't looked at the MySQL backend since around v14 so I may have to do that again.

1
drashnaWS2012R2 Essentials + HyperV Server 2012R2•

AH, that would still be an issue then, as the version compatibility stuff really hasn't been fixed.

Though, the emby/kodi bridge may work for you.

1
GoodRubik•

Nice setup.

Personally the reason I keep multiple boxes is that... I tinker way too much. In my homelab, "Prod" is anything that is in use by the SO. Which is basically the internet, HTPC and NAS. With different boxes, I can isolate and make sure those are available 24/7 ( not really, but available when she wants to use them).

Is it the end of the world if the HTPC is down? Of course not, but I'd rather not have to stop whatever I'm doing to diagnose what's preventing the HTPC from accessing the NAS, or whatever.

2
StewgeOP•

Personally the reason I keep multiple boxes is that... I tinker way too much.

I can definitely see that side of things and I certainly was that way. Right up until I started virtualizing as much as possible. Making changes that would've been clean-format worthy now is little more than a restore button away.

I mostly play with software rather than hardware though. If I was mucking around with changing hardware configs then I'd definitely go with another box.

2
GoodRubik•

I've recently started using VMs more than physical boxes as well. Its certainly faster and much easier. Virtual switches make changing network topologies sooo much easier.

1
BladeRunner26•

Looks really good - how much power does it use and how quiet is it?

2
StewgeOP•

It's very quiet, surprisingly so in fact. That being said, that can be mostly attributed to using silent components where possible and Noctua fans all around. Most of the fans are spinning at low rpm, the GPU fans are off most of the time and same with the PSU (GPU and PSU have fan-off modes).

The case is stuck into a cavity in my TV cabinet with literally millimetres to spare around the edges. Fortunately the entire case has a very simple front->back air-flow direction and I simply cut out some of the backing board on the cabinet to let it breath.

As for power, not sure yet. I've got a cheapy inline power meter, but in my rush to get things going completely forgot to plug it in. And of course now I don't want to turn it off....

Will have to reboot it tonight to rejig some cables so I'll definitely update with power figures.

1
BladeRunner26•

Very good - I've gone for a Dell T20 based set up as I wanted a single box to set up VM's (mainly for dev, OpenVPN, NAS and downloader vm) and two drives for NAS purposes. So I will end up with 2 SSD's and two HD's. I will look at Proxmox (never used before) for VM duty rather than my usual Virtualbox.

1
StewgeOP•

Just letting you know I updated the post with power figures.

TL;DR ~80-90W idling. Up to 200W when stressing the HTPC out with gaming.

1
BladeRunner26•

thanks for that. I have finished my Proxmox-based T20 server build with a core i7-4790K CPU (4ghz - 8 hyperthreaded monster) and 32gb ram. It is using 36w on idle. Thats with using three SSD's and 2x4tb Hitachi spinners, a dual port intel NiC and a crappy Asmedia 2 port sata card.

1
ailee43•

Man, that is a fantastic guide. I've been trying to do the same thing (gear down to 1 4U). Of all the options though, I had not considered Proxmox.

Think the way you laid it out would work well for my network?

https://www.reddit.com/r/homelab/comments/477uy9/help_me_with_hypervisors/ ?

2
StewgeOP•

The hardware passthrough is less useful for you, that is unless you want to pass through a RAID controller. There are some serious dangers there though. That being said, I think that may just be because pasthrough is still relatively new and been generally VERY flaky until recent times.

But as far as VM router + whatever other services including Windows it'd be fine. I'm running PVE almost exclusively through work and it's solid as a rock with all kinds of VMs (lots of Windows stuff as well as Linux and LXC containers).

Best thing is PVE is free and probably least restrictive of most of the big Hypervisors. At it's core, it's just a nice GUI and packaging up of KVM, LXC, a RedHat kernel with relevant virtualisation stuff on top of plain Debian Jessie. If at any time you want to jump ship you can go to anything that supports KVM or indeed converts from Qcow2/Raw image files. I've even found KVM can boot images converted straight out of Hyper-V and ESXi so it makes a good migration target.

1
sauceysalmon•

Thanks for the write up. I'll have to read it more thoroughly later.

I've really wanted to have an all in one system for a while. I have a FreeNAS build for storage and I'd like to get a HTPC/Downloader/DevTesting server.

Have you tried the HTPC yet especially with all of the other stuff running? I'm wondering what the experience was like as far as frame rate and responsiveness of the movies and video.

1
StewgeOP•

Have you tried the HTPC yet especially with all of the other stuff running?

I've gotten through a few movies without any hitches. I'm also running SVP which absolutely smashes CPU so it seems OK so far.

The Downloader and Router operate 24/7. Granted they're practically idle most of the time.

That being said, I've yet to really load up the other VMs. I suspect the toughest situation will be PAR2 repairs through Sabnzbd. But I've deliberately left it with only the single-threaded version so as not to go crazy with CPU consumption.

Could definitely run some tests though.

1
tweephiz•

Very cool, thanks for the detailed write up! Are there any issues with the passed-through PCIe/USB devices after stopping & starting the Windows VM?

1
StewgeOP•

Are there any issues with the passed-through PCIe/USB devices after stopping & starting the Windows VM?

Not that I've seen so far (only a few days in really). This was a problem pre-VFIO with devices being tied up and disappearing as you had to manually assign them to PCI-stub modules on boot and such. Now PCIE and USB devices re-attach as soon as the VM starts as expected using the VFIO driver. During the build I had to start/stop the HTPC VM multiple times to ensure my config worked correctly. You can also attach USB devices live using the QM CLI for non-permanent devices or one-offs.

Technically you can even hot-plug a PCIE device virtually (something that was previously supported through spec, but physically easy to do). I'm not quite brave enough to try that though....

2
bolapara•

I've done this and there is one thing I would like to point out. I definitely regretted having my firewall in a VM. When having to do maintenance on the VM server it REALLY sucks to not have access to the Internet. I've since ensured that my firewall is always a physical machine.

1
StewgeOP•

I had this problem a few days ago actually (added more ram to the machine).

That being said, using the SSD as a boot drive and storage for the router VM meant the whole thing was up again in ~3 minutes. Most of that is due to the hardware RAID controller having to boot up. Without it installed the thing was up in 30 seconds.

1
dangolo•

Just curious whether you've seen or tried UnRAID? It's nearly identical to what you're currently runnning

https://lime-technology.com/virtualization-host/

1
StewgeOP•

I've considered it, but limitations due to licensing is annoying, especially for something so "experimental" (at least from my end). As far as I can tell they're both built on the same tech for GPU passthrough (KVM + VFIO) so they're drawing from the same very fast moving sources so it really comes down to which core/GUI you like.

I'm sure it's worth it for a polished product and those who prefer the relatively safe confines of the GUI. I'm very familiar with PVE and it's Debian base already. Also not afraid to get my hands dirty. To top it off, you can't really beat Free ;)

1
forever_compiling•

Annoyingly the dist-upgrade to 4.2 has broken my connectivity (I'm getting ERR_CONNECTION_REFUSED between nodes and in the web GUI) and not even a fresh install of 4.2 works! Looks like I'm stuck with 4.1 for now - will a regular apt-get upgrade from the no-subscription or test repository get me new enough versions of packages to make this work correctly?

1
StewgeOP•

That's weird. The 4.2 upgrade didn't push any big new stuff, only the GUI into "stable". I just upgraded

Something else is happening there which makes me think it's more to do with one of the new kernels. Have you got a lesser known NIC or something along those lines?

To top it off, you should always use Shift-F5 on the webGUI (or clear cache) after an upgrade. Especially with the GUI change it can seriously screw with the interface. Quite commonly it will bug out some of the graphs, show vms offline etc.

1
forever_compiling•

Weirdly enough if I removed the node, did a clean install of 4.2 and then added back to the cluster it would start working. So I did that for every node as a workaround in my case and got the pass through working like a charm.

1
MrMors_•

Thanks for your great write up. Also nice to see a fellow person doing the all in one. Been running a similar setup for a year or two minus the GPU passthough. Never was able to get that too work. Went and bought the same card as you and followed your setup and it worked! So thanks, also didn't have to use PVETest(maybe thats where my current issue lies). So I'm having slow disk access from inside of this VM compared to others without OVMF. They all go back to a SSD mirror. Have you had any similar experiences?

1
StewgeOP•

also didn't have to use PVETest

Much of the VFIO changes have since gone through to the main repos since the 4.x kernel series went stable which is great.

So I'm having slow disk access from inside of this VM compared to others without OVMF. They all go back to a SSD mirror

Hmm...what kind of SSD mirror? Mdadm/zfsr1 etc.

I've not done this myself but I daresay any issues there are to do with the cache settings or mount options. Another thing worth noting, is if you're using images files (not LVs) then make sure you use the RAW image format and not qcow2.

Qcow is fine for slow spinning disks and light servers, but the performance is absolutely garbage when SSDs are introduced into the mix.

If EXT3/4 is used at any point in the mix, make sure you mount with the "nobarrier" option as it'll speed things up a bunch.

1
MrMors_•

ZFS Mirror so I have to have cache=writeback on. I was using Qcow, but so is my other Windows VM. I'm currently in the process of converting to RAW.

Hope for the best. Also are you still using the Nvidia 359.06 driver or have you since updated?

I really appreciate the help. I'm leaps and bounds further than I ever have been due to this thread.

1
StewgeOP•

I'm running the latest driver and GFE Beta actually. Works fine, to my great surprise.

I'm guessing NV have truly given up on the KVM detection shenanigans.

1
Soepkip123•

I'm looking to setup something like this myself. I only can't figure out whether or not Quick Sync will work when the GPU is passed through in Proxmox? I found some comments that it will not work, and also that they are working on it. Could you tell me if you got this working?

1
StewgeOP•

I've actually not tried this myself.

Theoretically it should work because the Intel GPU is exposed as a standard PCIE GPU like any other.

The more likely problem is with Quick-Sync itself probably requiring some cooperation between the CPU and GPU.

You'll also need to ensure you have another GPU handy to run the host.

1