HOW-TO make dual-boot obsolete using kvm VGA passthrough

Questions about virtualization software
Forum rules
Before you post please read how to get help
powerhouse
Level 6
Level 6
Posts: 1056
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

Re: HOW-TO make dual-boot obsolete using kvm VGA passthrough

Post by powerhouse » Tue Aug 21, 2018 4:42 pm

I made some updates to my tutorial and added instructions to run the Windows VM in user mode, that is as non-root user.
See: https://heiko-sieger.info/running-windo ... e_non-root

It seems rather trivial now with Linux Mint 19. Obviously Ubuntu (and perhaps Linux Mint) have worked hard to better integrate qemu/kvm into the distribution. There seem to be no permission issues, as far as I can see. Please let me know if you tried it and it worked / didn't work.
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3, Noctua NH-D14 CPU cooler, GTX 970 + Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk 120GB + Samsung EVO 860 1TB SSD + 4 HDD, Corsair 500R, SeaSonic 660W Gold X PS https://heiko-sieger.info

powerhouse
Level 6
Level 6
Posts: 1056
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

Re: HOW-TO make dual-boot obsolete using kvm VGA passthrough

Post by powerhouse » Thu Aug 30, 2018 12:56 pm

I added a new tutorial for Installing a Linux Mint 19 (Ubuntu 18.04) VM with VGA Passthrough , as well as a post arguing in favor of a Linux Virtual Gaming Machine.

Once you installed Windows as a virtual machine with VGA passthrough, it's easy to create a Linux VM that can use the same graphics card you use for your Windows VM (of course, not while Windows is running!).

This should even further help migrate from Windows to Linux.

The nice thing is that I can experiment with the Linux gaming VM all the while my host system stays untouched and untainted by wine etc.

If you follow my tutorial, add the

Code: Select all

runas=<username> \
beneath the qemu... command to run the Linux VM in unprivileged mode. (<username> must first be added to the groups kvm and perhaps libvirt before this works.)
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3, Noctua NH-D14 CPU cooler, GTX 970 + Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk 120GB + Samsung EVO 860 1TB SSD + 4 HDD, Corsair 500R, SeaSonic 660W Gold X PS https://heiko-sieger.info

driz
Level 1
Level 1
Posts: 24
Joined: Mon May 12, 2014 3:38 pm

Re: HOW-TO make dual-boot obsolete using kvm VGA passthrough

Post by driz » Sun Sep 02, 2018 7:46 pm

hey all, been a while since I've posted, but today I built a new system for my parents. They needed two work stations and were about to buy a laptop. I ended up building them a system (very similar to my girls') for about 500$. Everything was going perfect, but I couldn't get the windows iso to boot and had never encountered this issue before. I came back here to discuss it and found you have a new blog @powerhouse, i ran through it and you had the exact solution. I was lazy and just rsynced my ovmf stuff over to their system, i read https://heiko-sieger.info/running-windo ... ont_boot_2 and this fixed it perfectly.

as usual, thanks for your efforts!

powerhouse
Level 6
Level 6
Posts: 1056
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

Re: HOW-TO make dual-boot obsolete using kvm VGA passthrough

Post by powerhouse » Mon Sep 03, 2018 5:21 pm

driz wrote:
Sun Sep 02, 2018 7:46 pm
hey all, been a while since I've posted, but today I built a new system for my parents. They needed two work stations and were about to buy a laptop. I ended up building them a system (very similar to my girls') for about 500$. Everything was going perfect, but I couldn't get the windows iso to boot and had never encountered this issue before. I came back here to discuss it and found you have a new blog @powerhouse, i ran through it and you had the exact solution. I was lazy and just rsynced my ovmf stuff over to their system, i read https://heiko-sieger.info/running-windo ... ont_boot_2 and this fixed it perfectly.

as usual, thanks for your efforts!
That's good news! I'm glad my website remains useful. How are the girls getting along with their virtual Windows PCs?
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3, Noctua NH-D14 CPU cooler, GTX 970 + Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk 120GB + Samsung EVO 860 1TB SSD + 4 HDD, Corsair 500R, SeaSonic 660W Gold X PS https://heiko-sieger.info

driz
Level 1
Level 1
Posts: 24
Joined: Mon May 12, 2014 3:38 pm

Re: HOW-TO make dual-boot obsolete using kvm VGA passthrough

Post by driz » Sun Sep 16, 2018 10:53 pm

powerhouse wrote:
Mon Sep 03, 2018 5:21 pm
That's good news! I'm glad my website remains useful. How are the girls getting along with their virtual Windows PCs?
Still running great! I keep trying to think of things to beef it up, but until they get into better games, it's just perfect man. I do wish everything could be put to sleep, but we can't have it all :D

mint_user1234
Level 1
Level 1
Posts: 1
Joined: Sun Sep 02, 2018 2:10 pm

Re: HOW-TO make dual-boot obsolete using kvm VGA passthrough

Post by mint_user1234 » Wed Sep 19, 2018 4:23 pm

Can someone help me?
I am having Problem isolating the GPU. I tried
viewtopic.php?f=231&t=212692&start=40#p1173262
https://pastebin.com/WSmrFtpL
and the one from Archwiki.

but it does not work:

dmesg | grep -i vfio
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.15.0-20-generic root=UUID=ad7ad043-8c9e-4133-b8f1-64807ba4546f ro iommu=1 amd_iommu=on rd.driver.pre=vfio-pci quiet splash vt.handoff=1
[ 0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.15.0-20-generic root=UUID=ad7ad043-8c9e-4133-b8f1-64807ba4546f ro iommu=1 amd_iommu=on rd.driver.pre=vfio-pci quiet splash vt.handoff=1

lspci:

07:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM206 [GeForce GTX 960] [10de:1401] (rev a1)
Subsystem: Micro-Star International Co., Ltd. [MSI] GM206 [GeForce GTX 960] [1462:3205]
Kernel driver in use: nouveau

What am I doing wrong? :/



I think my GPU does not support UEFI:

sudo ./rom-parser /tmp/image.rom
Valid ROM signature found @0h, PCIR offset 1a0h
PCIR: type 0 (x86 PC-AT), vendor: 10de, device: 1401, class: 030000
PCIR: revision 0, vendor revision: 1
Valid ROM signature found @e400h, PCIR offset 77ddh
Speicherzugriffsfehler

Do I need to flash the GPU-BIOS? The Isolation should work despite this, right?

Post Reply

Return to “Virtualization”