Results 1 to 9 of 9

Thread: Hardware choices for Passthrough with libvirt KVM

  1. #1

    Cool Hardware choices for Passthrough with libvirt KVM

    Hi,

    I am Yuichi. Nice to meet you.
    #Actually, this is the first post.

    I would like to ask you some pieces of your advice.

    I will buy a new computer for openSUSE leap 15 very soon.
    However, I will not buy a new very new hardwares and PCs,
    I will just buy some second hands of motherboard, CPU and etc..
    This is because I do not need something like a super fast gaming PC.

    I am preparing and testing with Virtualbox before buy it.
    Then, I have realised that PCI Passthrough on livert KVM needs hardware support.
    (ref. https://wiki.archlinux.org/index.php...rough_via_OVMF )

    1. Is it very sensitive to choose Chipsets, CPUs and motherboard?
    I will not buy something a few decades ago, but it must be a few years ago.

    2. If so, what kind of hardwares should I buy without having support issues?

    P.S.
    I have not experienced of using Linux as a main OS in my life.

  2. #2
    Join Date
    Jul 2018
    Location
    Loma Linda, Mo
    Posts
    66

    Default Re: Hardware choices for Passthrough with libvirt KVM

    Other than for gaming - I see no need for video hardware passthru.

    I have several original AMD AM3 motherboards with 32 GB of ram - most running 8 Virtual Machines ( Windows XP, 7, 8.1, 10, Opensuse 15, Centos, Ubuntu) with the host OS being Opensuse 15. VirtualBox with the guest extensions installed allows almost full access to the host resource. You have to "allow" USB connections.

    My 10 year old AMD video cards and motherboards are fast enough to play videos in a virtual machine with no flicker.

    My AMD AM3 CPU's have 8 cores and are 3.5 Ghz processors. They were on sale on black friday on newgg for $65.

    to try Opensuse 15 guest os premade with guest additions already to go download GeekoLinux - I like the MATE version as it looks like windows XP interface. It also can be installed as a Host OS and you can then install virtualbox (that spelling) on the host and download the extentions from the oracle virtualbox host.

    this script will install the host extensions - for some reason they do no come pre-installed. It has to be run anytime VirtualBox gets updated on the Host OS. This has to be installed as root.

    Code:
    # cat addvbext
    vbv=`/usr/bin/VBoxManage --version | tr "r" "_"`
    if [ ! -d "/tmpx" ]
    then 
    echo make tmpx
    mkdir /tmpx
    chmod 777 /tmpx
    fi
    echo update VirtualBox
    VBOX_VERSION=`/usr/bin/VBoxManage --version | awk -F_ {'print $1'}`
    VBOX_EXT_VERSION=`/usr/bin/VBoxManage --version | awk -F_ {'print $1'}`
    # echo Virtualbox version installed is $VBOX_VERSION and $VBOX_EXT_VERSION
    VBOX_EXT=`echo Oracle_VM_VirtualBox_Extension_Pack-${VBOX_EXT_VERSION}.vbox-extpack`
    # echo File is $VBOX_EXT
    cd /tmpx
    /usr/bin/wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/$VBOX_EXT
    echo Y | /usr/bin/VBoxManage extpack install --replace $VBOX_EXT
    rm -f $VBOX_EXT
    
    #
    Opensuse 15.0 with VirtualBox VM's (Windows 98, XP, 7, 8.1, 10 & OpenSUSE 15.0)

    Unix since 1974 (pdp-11 in "B" , Interdata 7/32 in "C") (AT&T, Tandy, Convergent, NCR, HP flavors)
    Linux since 1995 (mandrake, redhat, fedora, centos, now OpenSUSE)

  3. #3
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    25,494
    Blog Entries
    15

    Default Re: Hardware choices for Passthrough with libvirt KVM

    Quote Originally Posted by YuichiS View Post
    Hi,

    I am Yuichi. Nice to meet you.
    #Actually, this is the first post.

    I would like to ask you some pieces of your advice.

    I will buy a new computer for openSUSE leap 15 very soon.
    However, I will not buy a new very new hardwares and PCs,
    I will just buy some second hands of motherboard, CPU and etc..
    This is because I do not need something like a super fast gaming PC.

    I am preparing and testing with Virtualbox before buy it.
    Then, I have realised that PCI Passthrough on livert KVM needs hardware support.
    (ref. https://wiki.archlinux.org/index.php...rough_via_OVMF )

    1. Is it very sensitive to choose Chipsets, CPUs and motherboard?
    I will not buy something a few decades ago, but it must be a few years ago.

    2. If so, what kind of hardwares should I buy without having support issues?

    P.S.
    I have not experienced of using Linux as a main OS in my life.
    Hi and welcome to the Forum
    AFAIK dual gpus (best option), cpu that supports virtualization of course and iommu support would get you going, then RAM for both the host and guest(s)

    I have a HP laptop (HP 15-aw057nr | A10-9600P cpu | 12GB RAM) here with an AMD APU and dual AMD graphics (Carrizo/Topaz XT) as well as IOMMU support so should work fine.

    So perhaps some more detail on your requirements might help (guest OS, ram etc), and can setup a libvirt machine with passthrough.
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  4. #4
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    9,926
    Blog Entries
    1

    Default Re: Hardware choices for Passthrough with libvirt KVM

    That's an interesting reference that has existed only since Sept 2018 (as of this writing, that's only about 3 mths) and is why at the bottom of the article there is a warning that the article's content hasn't been fully verified.

    Instead of or in addition to what is in the article, I'd recommend you read the authoritative articles specific to the virtualization technology you're using... Although I posted the following a couple years ago, because it references 'living" documentation that is constantly updated, it's still all current and authoritative today and for the forseeable future.

    https://forums.opensuse.org/showthre...hlight=gpu+pas

    it should be noted also that GPU pass-through is generally considered separate from PCI pass-through... Nowadays, the GPU is practically never implemented using a PCI channel, At the least it would be implemented using a PCI Express channel or something else that's separate and faster. The OVMF article doesn't emphasize this distinction because it's talking mainly about OVMF, the PCI specific pass-through is correctly identified when discussing keyboard and mouse.

    YMMV bur a couple years ago I ran a web based banchmark in a VMware guest and the Host to test possible degradation due to virtualization, and found less than a 2% difference.
    That post can probably be found with its marks if you search this Forum.
    Be aware that was only for that technology using that test, and should not be considered representative of any other setup or situation.

    Although mainly used by Gamers, I imagine GPU pass-through would be of interest to GPU computing, maybe others.
    And ordinary PCI pass-through for I/O devices might sometimes be of interest to almost anybody... maybe there are situations for instance where some kind of mesh storage might be implemented, and the bottleneck is found to be in the virtualized storage connection so granting unvirtualized direct hardware access might be tried. Or, because current current virtualization evolution is concentrating heavily on virtualizing I/O devices, maybe you have something unusual where a virtualized driver does not yet exist. A pass-through might address that problem.

    And, I've only recently been looking at a Big Data Analytics project that suggests precise thread allocation to CPUs and cores that might require GPU pass-through to assign affinity... But, I'll also be looking at if a virtual setup might allow over-committing as well.

    HTH,
    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  5. #5
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    25,494
    Blog Entries
    15

    Default Re: Hardware choices for Passthrough with libvirt KVM

    Hi
    So far the system I have is looking good...

    Code:
    IOMMU Group 0 00:01.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Wani [Radeon R5/R6/R7 Graphics] [1002:9874] (rev ca)
    IOMMU Group 2 04:00.0 Display controller [0380]: Advanced Micro Devices, Inc. [AMD/ATI] Topaz XT [Radeon R7 M260/M265 / M340/M360 / M440/M445] [1002:6900] (rev 83)
    This is the one I've been looking at since the OP is looking at libvirt;
    https://heiko-sieger.info/running-wi...a-passthrough/
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  6. #6
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    25,494
    Blog Entries
    15

    Default Re: Hardware choices for Passthrough with libvirt KVM

    Hi
    So, with minimal fuss seem to get it going (albeit on Tumbleweed), does it work, not yet by the looks, I need to divert the card/hdmi to an external monitor and carry on using the laptops built in screen...

    So a few changes on the Grub kernel options and a couple of files for the modules (already present in kernel);

    Code:
    cat /etc/default/grub | grep GRUB_CMDLINE_LINUX_DEFAULT
    
    GRUB_CMDLINE_LINUX_DEFAULT="splash=silent resume=/dev/disk/by-id/ata-OCZ-VERTEX4_OCZ-7B81SXCWP5VKVR6X-part4 scsi_mod.use_blk_mq=1 video=LVDS-1:d amd_iommu=on iommu=pt quiet"
    
    dmesg | grep VFIO
    
    [    4.479629] VFIO - User Level meta-driver version: 0.3
    
    lspci -kn | grep -A 3 04:00
    
    04:00.0 0380: 1002:6900 (rev 83)
        DeviceName: AMD Radeon (TM) R7 440M
        Subsystem: 103c:81fe
        Kernel driver in use: vfio-pci
    
    lsmod | grep kvm
    
    kvm_amd               110592  4
    ccp                    98304  1 kvm_amd
    kvm                   729088  1 kvm_amd
    irqbypass              16384  3 vfio_pci,kvm
    
    lsmod | grep vfio
    
    vfio_pci               53248  1
    irqbypass              16384  3 vfio_pci,kvm
    vfio_virqfd            16384  1 vfio_pci
    vfio_iommu_type1       28672  1
    vfio                   32768  5 vfio_iommu_type1,vfio_pci
    
    
    cat /etc/modules-load.d/vfio.conf 
    vfio_pci
    vfio
    vfio_iommu_type1
    vfio_virqfd
    
    IOMMU Group 2 04:00.0 Display controller [0380]: Advanced Micro Devices, Inc. [AMD/ATI] Topaz XT [Radeon R7 M260/M265 / M340/M360 / M440/M445] [1002:6900] (rev 83)
    
    cat /etc/modprobe.d/11-vfio.conf 
    options vfio-pci ids=1002:6900
    It seems a lot easier if you have a desktop system and a couple of cards... The WinX guest shows as a AMD card (R7), however driver is not working...
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  7. #7
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    9,926
    Blog Entries
    1

    Default Re: Hardware choices for Passthrough with libvirt KVM

    Quote Originally Posted by malcolmlewis View Post
    Hi
    So far the system I have is looking good...

    Code:
    IOMMU Group 0 00:01.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Wani [Radeon R5/R6/R7 Graphics] [1002:9874] (rev ca)
    IOMMU Group 2 04:00.0 Display controller [0380]: Advanced Micro Devices, Inc. [AMD/ATI] Topaz XT [Radeon R7 M260/M265 / M340/M360 / M440/M445] [1002:6900] (rev 83)
    This is the one I've been looking at since the OP is looking at libvirt;
    https://heiko-sieger.info/running-wi...a-passthrough/
    Skimming the reference you provide,
    It looks pretty good as a practical guide, the author attempts to cover as much ground and in as much detail as possible, sprinkled with his personal experience.

    Almost enough to overlook some fairly obvious technical errors like equating IOMMU with CPU virtual extensions. He should know better, his own account says he has been doing GPU pass-through since 2012, so he should know that IOMMU as a technology only appeared after his initial efforts and has become a stable, useful and preferred approach only about the time he moved from Xen to KVM in 2016/2017. CPU virtualization extensions have been around far longer, at least since about 2003, but widely available only about the time 32-bit x86 processors were more or less deprecated approx. 2006/2007.

    But, those errors today have mainly historical and informational value and should not get in the way of successfully setting up hardware pass-through.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  8. #8
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    9,926
    Blog Entries
    1

    Default Re: Hardware choices for Passthrough with libvirt KVM

    Quote Originally Posted by malcolmlewis View Post
    Hi
    So, with minimal fuss seem to get it going (albeit on Tumbleweed), does it work, not yet by the looks, I need to divert the card/hdmi to an external monitor and carry on using the laptops built in screen...

    So a few changes on the Grub kernel options and a couple of files for the modules (already present in kernel);

    Code:
    cat /etc/default/grub | grep GRUB_CMDLINE_LINUX_DEFAULT
    
    GRUB_CMDLINE_LINUX_DEFAULT="splash=silent resume=/dev/disk/by-id/ata-OCZ-VERTEX4_OCZ-7B81SXCWP5VKVR6X-part4 scsi_mod.use_blk_mq=1 video=LVDS-1:d amd_iommu=on iommu=pt quiet"
    
    dmesg | grep VFIO
    
    [    4.479629] VFIO - User Level meta-driver version: 0.3
    
    lspci -kn | grep -A 3 04:00
    
    04:00.0 0380: 1002:6900 (rev 83)
        DeviceName: AMD Radeon (TM) R7 440M
        Subsystem: 103c:81fe
        Kernel driver in use: vfio-pci
    
    lsmod | grep kvm
    
    kvm_amd               110592  4
    ccp                    98304  1 kvm_amd
    kvm                   729088  1 kvm_amd
    irqbypass              16384  3 vfio_pci,kvm
    
    lsmod | grep vfio
    
    vfio_pci               53248  1
    irqbypass              16384  3 vfio_pci,kvm
    vfio_virqfd            16384  1 vfio_pci
    vfio_iommu_type1       28672  1
    vfio                   32768  5 vfio_iommu_type1,vfio_pci
    
    
    cat /etc/modules-load.d/vfio.conf 
    vfio_pci
    vfio
    vfio_iommu_type1
    vfio_virqfd
    
    IOMMU Group 2 04:00.0 Display controller [0380]: Advanced Micro Devices, Inc. [AMD/ATI] Topaz XT [Radeon R7 M260/M265 / M340/M360 / M440/M445] [1002:6900] (rev 83)
    
    cat /etc/modprobe.d/11-vfio.conf 
    options vfio-pci ids=1002:6900
    It seems a lot easier if you have a desktop system and a couple of cards... The WinX guest shows as a AMD card (R7), however driver is not working...
    Perhaps not surprising you're running into difficulties...
    A large part of a successful solution is ensuring the hardware supports the method, and I don't see your GPU listed in the Wikipedia link for CPUs that support IOMMU (That important link is in both your Heiko reference and my list of GPU pass-through links).

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  9. #9
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    25,494
    Blog Entries
    15

    Default Re: Hardware choices for Passthrough with libvirt KVM

    Quote Originally Posted by tsu2 View Post
    Perhaps not surprising you're running into difficulties...
    A large part of a successful solution is ensuring the hardware supports the method, and I don't see your GPU listed in the Wikipedia link for CPUs that support IOMMU (That important link is in both your Heiko reference and my list of GPU pass-through links).

    TSU
    Hi
    Not sure of the wikipedia article is up to date, since it shows no AMD gpu's, all refer to technology released at few years ago, as indicated in my output it's passing all the checks, so would have to assume all is good... Now I have it permanently connected to a monitor, what I need to do is extract the laptop so have two screens running and turn off my defaults.

    I have do have a AMD quad core (from memory it has iommu support) HP desktop with and Nvidia card, could put a PCI nvidia card I have run nouveau on one, nvidia on the other, at least it's older hardware which is one of the OP's requirements....
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

Posting Permissions

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