Page 2 of 2

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

Posted: Wed Apr 08, 2020 7:26 am
by MikeBwca
Oh.. Ok... I get it now! :roll:

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

Posted: Sat Apr 11, 2020 9:36 pm
by squirrelslikenuts
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!

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

Posted: Sat Apr 11, 2020 9:38 pm
by squirrelslikenuts
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.

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

Posted: Fri Apr 24, 2020 8:20 am
by mlisted
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.

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

Posted: Fri Apr 24, 2020 4:40 pm
by HeneryH
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?

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

Posted: Wed Oct 28, 2020 2:40 am
by fellhahn
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.