ELI5 KVM Windows VM...


Recommended Posts

I have successfully installed Windows 8.1 via VNC on Unraid 6 rc3 - I'm assuming it defaults to KVM. The thing is I don't want to access the VM using VNC via the browser - that's just too slow. I assumed that the

 

Initially I assumed that I did not need to use VNC at all and that by selecting my Nvidia GTX 580 for passthrough I would then somehow be able to access my windows VM using the local keyboard, mouse and monitor. Sadly I don't seem to be able to figure out how to do this. When I did try there was no obvious way to do the initial Windows install. When I started the VM manually via the webgui the screen on my local monitor (which formally would show linux login prompt for unRaid OS) would go black and keyboard would not respond to anything. As far as I could tell the VM was still running and so was unRaid as I could still access it as normal via the webGUI on another computer.

 

I'm actually setting up a VR development environment for use with Oculus Rift. Hoping the VM overhead does not cause me too much latency and that the Rift will still be usable - obviously accessing the VM via VNC is not going to work for the Rift. I think I'm missing something really obvious or have something mis-configured, despite having spent most of the day reading the various docs, wikis, and guides here on the forum.

 

Really I'm looking fro some clarification on how to get access to the VM in order to get the best performance. Should my local VM just appear on my local monitor when I start it up as I originally assumed? Any help shedding light on things would be most appreciated.

Link to comment

My experience is with 15b.

 

I think the easiest thing to do is start with VNC to get the VM up and running.  That is, install the OS, install the drivers (GPU specifically), *ENABLE remote desktop*, etc..  A trick is that you can't just pass through the GPU - that will disable VNC, but you won't have a keyboard/mouse to do anything.  Try passing a usb controller or specific keyboard/mouse to the VM and make sure they work with VNC.  Then try the GPU passthru with the same keyboard/mouse available.

Link to comment

Yep I already tried to install the latest Nvidia drivers via VNC but the installer said it couldn't find a compatible card. I think it's because I set the 580 GTX as a secondary card. Also I switched PCIe ACS Override to yes whilst trying to get things working earlier.

 

I'm going to switch on Remote Desktop via VNC, shutdown 1st VM and attach the .vdisk to a fresh second VM with just the 580 GTX configured for graphics - i.e. the vdisk I just installed Windows on to on. Hopefully I can then install the Nvidia driver via remote desktop.

 

Seems I need to switch bridging on too in order to get the VM on the same network as the host and the rest of my network. I think I do this by simply switching it on in the Network settings and then selecting that as the networking interface when creating the second fresh VM.

Link to comment

This is very frustrating  :-\ - I know it's nobody's fault - just that's the way it goes sometimes  :)

 

So I've been at this all day now and still no joy (when I say all day I mean nearly all day -  20 hours straight). So I attached the .vdisk to a second newly created VM and included VNC for primary and 580GTX as secondary passthrough. Appears that you have to have VNC first followed by the 580 GTX, no option to have passthrough first. When I booted up in to this second VM I ended up getting an error like this from windows:

 

system thread exception not handled - nvlddmkm.sys

 

Seemingly no way to repair or install nvidia drivers from the recovery command prompt because the vdisk was locked and inaccessible according to Windows. So I went back to the original VM I created (without passthrough) and logged in via VNC, set windows to startup so that it would give me the option to Safe Boot and quickly killed vm1 so that I could get the safe boot option on vm2. Switched back to and safe booted the 2nd VM with passthorugh, no exception on boot this time and sure enough I was then able to to see the 580 GTX in the device manager. Installed latest Nvidia drivers from the Nvidia site succesfully and then restarted. Now I get blue screen of death on startup with this message:

 

SYSTEM_SERVICE_EXCEPTION

 

My syslinux.cfg looks like this:

 

default /syslinux/menu.c32
menu title Lime Technology
prompt 0
timeout 50
label unRAID OS
  menu default
  kernel /bzimage
  append initrd=/bzroot
label unRAID OS Safe Mode (no plugins)
  kernel /bzimage
  append initrd=/bzroot unraidsafemode
label Memtest86+
  kernel /memtest

 

I also tried one like below and booted in to the newly created KVM option and got exactly the same results as outlined in my description above:

 

default /syslinux/menu.c32
menu title Lime Technology
prompt 0
timeout 50
label unRAID OS
  menu default
  kernel /bzimage
  append initrd=/bzroot
label unRAID OS Safe Mode (no plugins)
  kernel /bzimage
  append initrd=/bzroot unraidsafemode
label KVM/unRAID OS
  menu default
  kernel /bzimage
  append intel_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1 pcie_acs_override=downstream initrd=/bzroot
label Memtest86+
  kernel /memtest

 

Any help on troubleshooting this would be great.

 

P.S. Just to clarify - should I be seeing something on the local monitor if things are working correctly for passthrough? It's not clear to me in anything that I've read that my local monitor should spring to life once passthrough is working correctly. I'm assuming this is the only way highly performant local VMs can work for gaming/3d etc...?

Link to comment

This is very frustrating  :-\ - I know it's nobody's fault - just that's the way it goes sometimes  :)

 

So I've been at this all day now and still no joy (when I say all day I mean nearly all day -  20 hours straight). So I attached the .vdisk to a second newly created VM and included VNC for primary and 580GTX as secondary passthrough. Appears that you have to have VNC first followed by the 580 GTX, no option to have passthrough first. When I booted up in to this second VM I ended up getting an error like this from windows:

 

system thread exception not handled - nvlddmkm.sys

 

Seemingly no way to repair or install nvidia drivers from the recovery command prompt because the vdisk was locked and inaccessible according to Windows. So I went back to the original VM I created (without passthrough) and logged in via VNC, set windows to startup so that it would give me the option to Safe Boot and quickly killed vm1 so that I could get the safe boot option on vm2. Switched back to and safe booted the 2nd VM with passthorugh, no exception on boot this time and sure enough I was then able to to see the 580 GTX in the device manager. Installed latest Nvidia drivers from the Nvidia site succesfully and then restarted. Now I get blue screen of death on startup with this message:

 

SYSTEM_SERVICE_EXCEPTION

 

My syslinux.cfg looks like this:

 

default /syslinux/menu.c32
menu title Lime Technology
prompt 0
timeout 50
label unRAID OS
  menu default
  kernel /bzimage
  append initrd=/bzroot
label unRAID OS Safe Mode (no plugins)
  kernel /bzimage
  append initrd=/bzroot unraidsafemode
label Memtest86+
  kernel /memtest

 

I also tried one like below and booted in to the newly created KVM option and got exactly the same results as outlined in my description above:

 

default /syslinux/menu.c32
menu title Lime Technology
prompt 0
timeout 50
label unRAID OS
  menu default
  kernel /bzimage
  append initrd=/bzroot
label unRAID OS Safe Mode (no plugins)
  kernel /bzimage
  append initrd=/bzroot unraidsafemode
label KVM/unRAID OS
  menu default
  kernel /bzimage
  append intel_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1 pcie_acs_override=downstream initrd=/bzroot
label Memtest86+
  kernel /memtest

 

Any help on troubleshooting this would be great.

 

P.S. Just to clarify - should I be seeing something on the local monitor if things are working correctly for passthrough? It's not clear to me in anything that I've read that my local monitor should spring to life once passthrough is working correctly. I'm assuming this is the only way highly performant local VMs can work for gaming/3d etc...?

 

You probably could have saved a lot of time reading through the manual under the support menu of our website.  It covers the bases with GPU assignment fairly well and even highlights the different methods you can attempt to get GPU pass through working properly.  That said, the GTX 580 is a much older series card, so success with pass through may be limited.  It could also be related to your motherboard / CPU combo, but considering that the device did pass through initially would lead me to suspect a newer-series GPU would work better.  650 Ti works well, as does a 750, a 780, or a 970.  There are specific recommendations in the manual now as well.

Link to comment

Hi Jon,

 

Thanks for replying. Yep I read through what I thought were the relevant parts of manuals multiple times - could you provide a link to the bit you think I perhaps missed. From what I read I got the impression that the GUI should take care of everything for me now and I shouldn't have to manually edit any config files. After this did not work I took to the forums where there was lots of advice on how to modify the xml and the syslinux.cfg. I tried lots of stuff from the forums, probably should have just stuck with the GUI config, and none of that worked either.

 

I think it's perhaps a case of a bad/old GPU/Motherboard combo. Sad because I know that others have got the 580 GTX passing through via KVM on their setups, just no reports of it working with the 580GTX working unRAID yet. I know it doesn't work on Xen under any circumstance from what I've read.

 

Final suggestion. Worth mentioning in the docs how passthrough manifests itself. I was kind of expecting some sort of menu on the locally attached monitor that would let me switch between various VMs. But when I got a black screen I started to wonder if I needed to access the VM using TurboVNC and VirtualGL or something. Also I think I read somewhere that the ability to switch between VMs that share a GPU was not possible. Is a reboot required in this case?

Link to comment

Hi Jon,

 

Thanks for replying. Yep I read through what I thought were the relevant parts of manuals multiple times - could you provide a link to the bit you think I perhaps missed.

 

Clearly we're missing the mark on some documentation here, so in lieu of just replying with all the information, I added it to the wiki here:  http://lime-technology.com/wiki/index.php/UnRAID_Manual_6#Assigning_Graphics_Devices_to_Virtual_Machines_.28GPU_Pass_Through.29

 

Please review and let me know if after trying all that if anything changes for you.

 

From what I read I got the impression that the GUI should take care of everything for me now and I shouldn't have to manually edit any config files. After this did not work I took to the forums where there was lots of advice on how to modify the xml and the syslinux.cfg. I tried lots of stuff from the forums, probably should have just stuck with the GUI config, and none of that worked either.

 

If you have an Intel-based system, you shouldn't need to modify anything with the syslinux.cfg file.  AMD users have reported the need to add iommu=pt to their syslinux.cfg file, but as we don't test with AMD hardware, I cannot verify this.

 

I think it's perhaps a case of a bad/old GPU/Motherboard combo. Sad because I know that others have got the 580 GTX passing through via KVM on their setups, just no reports of it working with the 580GTX working unRAID yet. I know it doesn't work on Xen under any circumstance from what I've read.

 

Xen doesn't support the assignment of any NVIDIA GTX-class GPUs.  They only support it on the Quadro series I believe.  As far as folks reporting success with the 580, there are a few that say they have had success (from looking at a community-maintained spreadsheet here):  https://docs.google.com/spreadsheets/d/1LnGpTrXalwGVNy0PWJDURhyxa3sgqkGXmvNCIvIMenk/edit#gid=0).  But the level of success is unclear.  I have an NVIDIA GTX 550 that would pass through to the VM initially, but upon reboots of the VM, would blue screen.  Unfortunately there is nothing we can do to fix that type of issue from our side.  The folks claiming success with it in the spreadsheet I referenced may be having the same thing, or maybe their motherboard accommodates the deficiency in the GPU for this.  Either way, it's definitely not a card we're recommending at this point.

 

The fact that your motherboard passed through the GPU initially means that your best bet at this point would be to swap GPUs, not motherboards.  If you weren't getting any pass through working at all with your motherboard, or if you lacked the proper Intel VT-d support, then I'd suggest new motherboard / CPU, but because you had it pass through initially, you'll probably have success using a better supported GPU.

 

Final suggestion. Worth mentioning in the docs how passthrough manifests itself. I was kind of expecting some sort of menu on the locally attached monitor that would let me switch between various VMs. But when I got a black screen I started to wonder if I needed to access the VM using TurboVNC and VirtualGL or something. Also I think I read somewhere that the ability to switch between VMs that share a GPU was not possible. Is a reboot required in this case?

 

This through me for a loop.  Not sure where that expectation would come from, but seems like we need to be more clear on this.  When you assign a GPU to a VM, it's akin to plugging a GPU into a physical machine.  I think what you're looking for at the technical level is GPU hotplugging support, where you can assign a GPU to a running VM, detach it from that VM, then assign it to a different VM, then detach it there, then back again.  This is not supported at this time (and may never be supported).  However, if you shut down a VM that has a GPU assigned, you should be able to then assign that GPU to a different VM (that is also shut down), then turn it on.  This doesn't require a reboot of your host.

 

Let me know how it goes following the recommendations in the wiki and if you have any follow up questions.

Link to comment

When I very first started trying to passthrough my gtx 660 I was having pretty much the same results as you and the ONLY way I found out how to get it to work was adding a 2nd video card for unraid console to latch onto ( no integrated graphics ).  I added a cheap gt 210 and unraid console picks that graphics card first so that my 660 is free for the vm's and its working awesome with windows 8.1 and nvidia drivers up to date .

 

granted I have not tried the new steps listed in the wiki ,I'll be doing that here in the next week or 2 so that I can hopefully free that pcie slot for another card/machine. I need a way to tell unraid not to attach the console to the first card or maybe tell unraid that its headless and  so I can test it out , but idk if thats possible. anyways if you have another card to test might be worth a shot.

 

my hardware

asrock 990fx fatality

fx8350

msi gtx660

msi gtx 660TI pe

 

 

Link to comment
  • 10 months later...

Hey! Here’s the mail I got recently for my problem, It may help to look at the minidump files from the crashes with a debugger.

Can you zip up the minidump files in the C:\Windows\Minidump folder and make available (provide link) via Windows Live SkyDrive or similar site?

The following link has information:

How To Fix SYSTEM THREAD EXCEPTION NOT HANDLED – 0x0000007E ?

 

If you have problems zipping the minidump files copy the minidump files to another location such as a folder on the Desktop

Also, you do not necessarily have to zip up the minidump files, you can upload them one at a time.

 

 

Link to comment
  • 3 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.