Anybody ever try a Win VM on top of Linux KVM?

General discussion about Blue Iris
MikeBwca
Posts: 624
Joined: Thu Jun 20, 2019 5:39 am

Re: Anybody ever try a Win VM on top of Linux KVM?

Post by MikeBwca » Wed Apr 08, 2020 7:26 am

Oh.. Ok... I get it now! :roll:
squirrelslikenuts
Posts: 2
Joined: Sat Apr 11, 2020 9:33 pm

Re: Anybody ever try a Win VM on top of Linux KVM?

Post by squirrelslikenuts » Sat Apr 11, 2020 9:36 pm

HeneryH wrote:
Mon Apr 06, 2020 10:44 pm
Who Am I ... ???

That is the stupidest thing ever. There is never a reason for this. You are a Linux SNOB! The only acceptable solution is to run BI in a fresh install of windows on clean bare metal and only connected to a subnet that is completely isolated from the internet except for a VPN. BANNED!
HOLY BALLS ! I JUST SPIT OUT MY BEER! That is HILARIOUS!!!

Kudos Sir!
squirrelslikenuts
Posts: 2
Joined: Sat Apr 11, 2020 9:33 pm

Re: Anybody ever try a Win VM on top of Linux KVM?

Post by squirrelslikenuts » Sat Apr 11, 2020 9:38 pm

I have run BI 4.8 on a Xeon server for just over a year. I just virtualized it yesterday, and have seen about a 20% reduction is resource use and 50 watts reduction in power consumption overall compared to bare metal.

I run it in a Win10 VM, on unraid which uses KVM.

Quite happy so far.
mlisted
Posts: 7
Joined: Sat Nov 09, 2019 1:19 am

Re: Anybody ever try a Win VM on top of Linux KVM?

Post by mlisted » Fri Apr 24, 2020 8:20 am

I run BI in a Windows VM on top of Debian running KVM. It’s great once you set up Intel GVT-g for hardware acceleration. I do get virtual GPU crashes every couple of days, since apparently Intel employs like two very slow people to maintain their buggy virtual GPU code, but the headache is worth it. I wish BI would move to Linux like every other server software.
HeneryH
Posts: 367
Joined: Thu Jul 18, 2019 2:50 pm

Re: Anybody ever try a Win VM on top of Linux KVM?

Post by HeneryH » Fri Apr 24, 2020 4:40 pm

I tabled this until I can pick up a reasonably priced graphics card since you need to dedicate the onboard graphics to the Win VM leaving no graphics for the Linux host. I'll revisit.

Anyone here have a reco for a cheaper non-gaming quality level graphics card to host my Linux Desktop Graphics?
fellhahn
Posts: 1
Joined: Tue Aug 27, 2019 5:35 am

Re: Anybody ever try a Win VM on top of Linux KVM?

Post by fellhahn » Wed Oct 28, 2020 2:40 am

I ran BI in a Hyper-V VM for about 2 years. Worked OK but definitely had to make compromises to get the CPU usage down.

6 months ago I ditched the MS Hyper-V server and switched to Ubuntu Server 20.04 LTS. The vast majority of applications I was running could be migrated directly to docker containers instead. Blue Iris remains the one stubborn thorn in my side that demands the presence of a windows VM, running on KVM/Qemu. There's been a lot of learning but bit by bit I've made some significant gains in performance and utilisation.

I have a Quadro P620 (Cost about ~$140USD) that is passed through to the guest using VFIO. This was honestly the biggest headache of the whole setup but worth it once done.

I've found using DXVA2 HW accel makes better use of the card then NVDEC. (Lower VRAM use)

CPU isolation and CPU pinning gave some good gains in CPU consumption.

Couple of things I cannot get to work are dynamic memory and nested virtualisation. Shame, as installing docker on the Win10 guest requires functioning nested virtualisation, and I have some docker containers that could make good use of the GPU also.

I can post the virsh xml if you're interested. For the VFIO stuff I found this guide the most helpful:

https://heiko-sieger.info/running-windo ... ssthrough/

(a key troubleshooting point for me was putting vfio-pci.ids in the GRUB_CMDLINE_LINUX_DEFAULT of /etc/default/grub, can't remember if that guide covered it).

For reference on how the system performs:

6 X 6MP Dahua's and 2 x 2MP Armcrests. 10 FPS H264 VBR High on all of them.
4 pinned vCPUs (Chip is an Intel Xeon e2146G)
10GB of virtual memory (only really needs 6 but the guest occasionally does some other stuff).
DXVA2 HW accel turned on for all cameras.
Sub streams enabled on all cameras.
Limit decoding unless required is NOT checked. This was required to fix some viewing issues in the mobile app.
Edge vector motion detection active on 5 of the cameras (also have PIR sensors acting as triggers).
I do not record 24x7.
With no viewers open, 3 of the 4 cores will hover between 10-25%. The fourth core sits at 75%. Opening the web UI will cause 3 of the 4 to go to 20-40%, the fourth bumps slightly to 80%.

Before coming by here I was already investigating the docker container that people have mentioned. I'm running it as an experiment, it works, but currently uses CPU only.
What it actually is doing is running ubuntu inside docker and then using Wine to run BI5. It is not a first party solution and looks to be mostly a hobby project run by 2/3 people. It has potential but getting HW accel working for a wine emulated app inside a container is likely to be a huge headache.
Post Reply