Page 3 of 9 FirstFirst 12345 ... LastLast
Results 21 to 30 of 89

Thread: Windows Gaming VM - KVM / UEFI Version - HowTo

  1. #21
    Join Date
    Sep 2012
    Beans
    579
    Distro
    Ubuntu Gnome 17.04 Zesty Zapus

    Re: Windows Gaming VM - KVM / UEFI Version - HowTo

    Quote Originally Posted by tsend4u View Post
    Hello!
    At begining I want to thank for your work, redger. (not only here )

    Am not posting much in net - almost always I solve my problems w/o asking for help.
    But now am stuck - time to post and ask for some ideas or I will get crazy .

    Because I've read a lot in web about this, also tried many ways to achieve aims,
    so here is only some basic info about my environment and things done:

    Hardware:
    Notebook Leneovo ThinkPad W540, Core i7 Extreme 4930MX, 32GB RAM, NVidia Quadro K2100M
    Does the notebook give you the option of selecting the hosts video device and display, guess this would be in the EFI? Struggling to see how pass through would work for you with a single display unless you can manually choose in the EFI both the primary video adapter as well as the output display...then you'd output host video via a HDMI using Intel IGD and could therefore passthrough the Nvidia and use the built-in screen.

  2. #22
    Join Date
    Jul 2014
    Beans
    3

    Re: Windows Gaming VM - KVM / UEFI Version - HowTo

    Quote Originally Posted by KillerKelvUK View Post
    Does the notebook give you the option of selecting the hosts video device and display, guess this would be in the EFI? Struggling to see how pass through would work for you with a single display unless you can manually choose in the EFI both the primary video adapter as well as the output display...then you'd output host video via a HDMI using Intel IGD and could therefore passthrough the Nvidia and use the built-in screen.
    Later I will provide EFI System Settings screenshot.
    - NO option to select primary graphics (this system doesn't work that way)
    - Option to set discrete graphics (NVidia) power mode (Balance / Performance)
    - Option to set BOOT display output [ThinkPad LCD / Analog Output (VGA) / Digital Output (DisplayPort) / Display Dock]
    - no HDMI Port
    - D-Sub and mDP (mini Display Port) available (obviously supporting HDMI Display via mDP-HDMI cable)

    But you gave me an idea to change System Settings, as I use High Security Option - Secure Chip / Secure Boot etc.
    I disabled all for testing and switched to legacy mode, but no difference - supposed that as since purchase I made my own system configuration and created Custom Security Setup to support full secure EFI mode and full unsecured Legacy. This notebook is portable workstation and I use to many different purposes (as it was created for). But off work I'd like to use VM for some windows gaming.

    Fixed
    Code:
    libvirtd error : virSecurityManagerNew :195 : unsupported configuration: Security driver "none" can not create confined guests
    AppArmor parser error for /etc/apparmor.d/usr.sbin.libvirtd in /etc/apparmor.d/usr.sbin.libvirtd at line 44: syntax error, unexpected TOK_END_OF_RULE, expecting TOK_MODE

    - Reinstalled Apparmor (just in case), fixed config overwrites, removed syntax "unix" from line 44. ~ invoke-rc.d apparmor reload SUCCESS
    - Set security_driver=apparmor @ /etc/libvirt/qemu.conf . ~ /etc/init.d/libvirt-bin restart SUCCESS
    I think that's cause of higher version of libvirt, which provides unknow syntax for older apprmor.
    Maybe this should be included in 1st post, cause default security driver is "none" and option is commented out /etc/libvirt/qemu.conf ?

    More detailed information (I will upgrade my previous post also):
    - Qemu version 2.1.2 (from xorg-edgers)
    - I completely removed nouveau from system
    - I use some custom xorg init options for my rare ThinkPad to achieve: (but am pretty sure it shouldn't affect this problem)
    -- brightness control (for both NVidia and Intel)
    -- full usage of ThinkPad ClickPad (TouchPad) which I ported from AUR.arch (here is my script: https://bugs.launchpad.net/ubuntu/+s...83/comments/50 )
    -- blackscreen / blankdesktop solution (by http://vxlabs.com/2015/02/05/solving...-screen-issue/ ) for which I made easy switch scripts.
    - Host Driver - NVidia 346 Drivers on Host from https://launchpad.net/~xorg-edgers/+archive/ubuntu/ppa
    - VM Driver - old NVidia for Quadro (332.21) (According to ISSUES @ very end of 1st post https://bbs.archlinux.org/viewtopic.php?id=162768 )

    According to
    http://www.mail-archive.com/qemu-dev...msg174066.html
    Code:
    root@TP-W540:/ # head --lines=1 /dev/vga_arbiter
    count:1,PCI:0000:00:02.0,decodes=io,owns=io,locks=none(0:0)
    Last edited by tsend4u; March 10th, 2015 at 11:18 AM.

  3. #23
    Join Date
    May 2008
    Beans
    94

    Re: Windows Gaming VM - KVM / UEFI Version - HowTo

    @tsend4u
    are you still working on this ?
    From my reading on the Arch KVM VFIO forum the only way this will work is if the NVidia "card" has a hardware dedicated output connector ie. one (or more) connectors dedicated just to the extra graphics card which is defined in hardware, unchangeable, and not related to the integrated graphics. Apparently many / most implementations use the integrated chip for rendering ..... in which case it's impossible to pass the extra processor through to a VM (because it still needs the IGP for rendering)

    Furthermore Intel integrated graphics cannot be passed through either because of the way they're entangled with the other hardware

    On the other hand you could try KVM-GT or XEN-GT http://lists.freedesktop.org/archive...er/056652.html which may achieve something close to what you want

  4. #24
    Join Date
    Jul 2014
    Beans
    3

    Re: Windows Gaming VM - KVM / UEFI Version - HowTo

    @redger
    Thank you for your reply.

    Last days I was busy, but yes I'm still working on this - and I will until successful passthrough. I'm sick of rebooting to GatesOS.

    That I was afraid and not sure about - implementation of combined IGP and discrete VGA on this ThinkPad's system in aspect of passing trough.
    I didn't want to start XEN til this will be the last way possible. First I will read about and try KVM-GT. If you have any helpful info about it before I will start googling, I will be very grateful for providing it.

    Kind regards,
    T_Send.

  5. #25
    Join Date
    Oct 2014
    Beans
    11

    Re: Windows Gaming VM - KVM / UEFI Version - HowTo

    Finally gave this another try, got my motherboard replaced and lo and behold, everything boots just fine when I pass the intel-iommu=on to the kernel, without having to apply any patch whatsoever! I tried it on Ubuntu 15.04, completely messes up DMAR, back to 14.04, everything fine so far...

    Create a disk image for the VM - I recommend an LVM partition. In my case I allocate LVM partitions on the mechanical drive until I'm happy everything's running ok and then copy them across to the SSD using dd.
    You'll also need a small (4GB) Fat32 partition on a "GPT" drive which we'll copy the installation files to. The install iso should be copied to an install partition as accessible to a VM ie.

    • Create a new partition for this purpose, can be LVM or 'flat' but must reside on a GPT disk not MBR
    • Allocate the new partition to a VM – so it can be formatted. DO NOT format this using host format tools, it must be done from a VM
    • Allocate the new partition to a windows VM
    • Format as FAT32, consider adding the WIN xx bootloader as well. Not necessary but seems cleaner and make the partition bootable (set “active” or bootable flag in parition table)
    • Copy the install iso to the newly formatted partition. This can be accomplished by passing the iso to the VM used to format the new install partition as a CD-ROM (use virt-manager)
    • Check that the \efi\boot partition exists and contains the same files as \efi\microsoft\boot. If necessary copy files into a new \efi\boot partition. Also must contain a copy bootmgw.efi named bootx64.efi in \efi\boot
    • Check the contents of \source\ei.cfg to ensure it nominates the correct OS product (best to use “Professional”).
    • It can be beneficial to use Win Toolkit to include the linux qxl driver (spice screen driver) in the Windows build although I'm not convinced this is necessary.
    • Exit the VM used to format the install partition



    Define the new VM in virt-manager. Remember to -

    • Select a “dummy” iso to install from … we're going to replace this later
    • Select UEFI as the bios (Advanced Options on last screen)
    • use appropriate names etc
    Redger ,I don't quite understand what you're aiming at here: do I need to make a new partition and allocate that to another windows VM to have formatted it in fat32?

  6. #26
    Join Date
    Oct 2014
    Beans
    11

    Re: Windows Gaming VM - KVM / UEFI Version - HowTo

    Seems like I was to quick to state everything went fine... When I use the IGP from my I7 cpu in combination with IOMMU this completely messes up DMAR, hundreds of errors in the output of

    dmesg | grep -DMAR
    looked it up, known problem. https://www.kernel.org/doc/Documenta...ntel-IOMMU.txt
    They advise to give the following parameter to the kernel: intel_iommu=igfx_off, but this disables iommu as well so...
    Seems like I'm going to have to buy a second graphics card after all...

  7. #27
    Join Date
    Mar 2014
    Beans
    3

    Re: Windows Gaming VM - KVM / UEFI Version - HowTo

    OP, ever consider spinning your setups as a distro/Modified Ubuntu image?

    Make an image for AMD gpu's and Nvidia gpu's specifically. Add some scripts to hand-hold the windows OS installation and other post installation setup's. Post a "this is the cpu/gpu/mobo hardware that work list. Would be a great resource for those non-1337 enough to figure this kinda thing out by themselves.

  8. #28
    Join Date
    May 2008
    Beans
    94

    Re: Windows Gaming VM - KVM / UEFI Version - HowTo

    hi jclaeyssens

    your first question about the partitions required ..... the Fat32 partition is used as a source for the install DVD. It gives you full control of the executables used by the Windows installer and overcomes some UEFI boot issues. It can be discarded once installation is completed
    All the checking is to ensure that the Windows installation programs will run and do what you want

    We originally define the VM with a "dummy" install so we don't accidentally start the install before the VM definition has been modified ie. defined the basics, stop the process early in the boot process before anything is actually installed, make a number of definition changes (virsh edit) and then restart the VM to commence the actual install

    if you'd like to clarify the text I'll be happy to paste it in



    did you resolve your DMAR issues ? I'm a bit confused with that. What sort of hardware are you using (the Asrock C226WS motherboard ?) ... and how are you allocating it (the PCI ports etc.) Are you trying to allocate the IGP to a VM ?
    Asrock motherboards (BIOS) are usually pretty good for IOMMU functionality .... are you running the latest firmware ? It's possible there's a fix

  9. #29
    Join Date
    May 2008
    Beans
    94

    Smile Re: Windows Gaming VM - KVM / UEFI Version - HowTo

    @devin-a-hudson

    it's a great idea .... I'm not that much of a masochist. Too many variables & support "opportunities" ... even if I had the expertise

  10. #30
    Join Date
    Oct 2014
    Beans
    11

    Re: Windows Gaming VM - KVM / UEFI Version - HowTo

    Quote Originally Posted by redger View Post
    hi jclaeyssens

    your first question about the partitions required ..... the Fat32 partition is used as a source for the install DVD. It gives you full control of the executables used by the Windows installer and overcomes some UEFI boot issues. It can be discarded once installation is completed
    All the checking is to ensure that the Windows installation programs will run and do what you want

    We originally define the VM with a "dummy" install so we don't accidentally start the install before the VM definition has been modified ie. defined the basics, stop the process early in the boot process before anything is actually installed, make a number of definition changes (virsh edit) and then restart the VM to commence the actual install

    if you'd like to clarify the text I'll be happy to paste it in



    did you resolve your DMAR issues ? I'm a bit confused with that. What sort of hardware are you using (the Asrock C226WS motherboard ?) ... and how are you allocating it (the PCI ports etc.) Are you trying to allocate the IGP to a VM ?
    Asrock motherboards (BIOS) are usually pretty good for IOMMU functionality .... are you running the latest firmware ? It's possible there's a fix
    Bought myself a second graphics card last week, since I found out the IGP messed up my DMAR. Deactivated the IGP in bios, installed the new one, passed the intel_iommu=on in grub and DMAR seems to work fine, no more errors!
    But off course, things can't go this smoothly... I just found out that the motherboard paired the two graphic cards to one vfio group... So this means I'll have to apply the ACS patch after all... The never-ending story continues... I saw KillerKelvUk opened a thread on the ACS patching of the 15.04 kernel, guess I'll have to take a look at that...

Page 3 of 9 FirstFirst 12345 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •