Announcement

Collapse
No announcement yet.

Linux KVM Continues Offering Much Better Performance Than VirtualBox

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #21
    Originally posted by Hi-Angel View Post
    Have they fixed work with external drives? A few years ago when I tried it, running a VM whose image is physically located on a partition mounted at /mnt have caused confusing errors, and required some non-trivial setup, something about pools of storage memory. Ironically, running that same image from terminal with QEMU was a lot easier (well, given you knew the arguments needed).
    My VM OS images are all on a NAS so I suppose they have it all sorted out by now.

    Comment


    • #22
      Originally posted by torsionbar28 View Post
      Audio is also a sore spot in qemu/kvm. IMO a general rule of thumb, is that for Linux guests, qemu/kvm is the obvious choice as it's very easy and straightforward to get going. But for Windows Desktop guests, Virtualbox offers a smoother simpler experience.
      Audio is... Complicated. From my experience, before qemu 3.0, audio would be fine with Jack (with pulse plugin) on host side running at 96khz and audio interface on Windows running at 88(or smth)khz (plays sound to host through pulse). On post-3.0 the guest audio interface has to run at really low sample rates (below 30 khz) in order to have it all smooth, but then it's smoother in general. Oh, and after 3.0 update it is a must to have the domain platform version updated to >=3.0 for old domains to have proper audio.

      It's a tricky setup nonetheless.

      Comment


      • #23
        Originally posted by emblemparade View Post
        BTW, as others have pointed out, VirtualBox uses KVM as hypervisor by default on Linux, so the title is a bit misleading.
        You don't understand what you're talking about and this is patently wrong.

        Comment


        • #24
          Originally posted by andoride View Post

          have you tried virt-manager?
          Yes, i got it working non-accelerated. Then i installed GIT version and get some cryptic error message. I will try again once i get around to reinstall the os, current install is several years old rolling so might be broken in some way.

          Comment


          • #25
            Has anyone here had success when installing Windows 10 in KVM? Any tips?

            First I got bluescreen when booting the installer, so I switched the CPU type to something else (as said by the allmighty Google), and now it does not bluescreen anymore but the installer does not start, I get 1 CPU thread at 100% and nothing happens.

            Installing Windows 7 works fine, installing OpenSUSE Leap works fine. I'm on OpenSUSE Tumbleweed.

            Comment


            • #26
              Originally posted by starshipeleven View Post
              Has anyone here had success when installing Windows 10 in KVM? Any tips?

              First I got bluescreen when booting the installer, so I switched the CPU type to something else (as said by the allmighty Google), and now it does not bluescreen anymore but the installer does not start, I get 1 CPU thread at 100% and nothing happens.

              Installing Windows 7 works fine, installing OpenSUSE Leap works fine. I'm on OpenSUSE Tumbleweed.
              I'm running a number of Windows 10 and Windows 2K12 (server) on KVM either directly (from command line) or from my large oVirt cluster.
              No issues what-so-ever.

              Host hardware? CPU?

              - Gilboa
              DEV: Intel S2600C0, 2xE52658V2, 32GB, 4x2TB + 2x3TB, GTX1080, F28/x86_64, Dell UP3216Q 4K.
              SRV: Intel S5520SC, 2xX5680, 36GB, 4x2TB, GTX550, F28/x86_64, Dell U2711..
              BAK: Tyan Tempest i5400XT, 2xE5335, 8GB, 3x1.5TB, 9800GTX, F28/x86-64.
              LAP: ASUS Strix GL502V, i7-6700HQ, 32GB, 1TB+256GB, 1070M, F29/x86_64.

              Comment


              • #27
                Originally posted by gilboa View Post
                I'm running a number of Windows 10 and Windows 2K12 (server) on KVM either directly (from command line) or from my large oVirt cluster.
                No issues what-so-ever.
                Yeah I'm sure this is either an issue for newer versions than what is used in stable-based distros, or it is a mistake in configuration on my part.

                For the BSOD on install, this is the thread I read https://forum.level1techs.com/t/wind...install/127425

                As you can see below I also tried with Windows 10 1703 as said in the forum but it did not really work either.

                Host hardware? CPU?
                Ryzen 5 1600X on a Asrock x370 Gaming ITX with 16GB ECC ram. VM disk images are stored in a local Sata drive with ext4 filesystem.

                It also has Virtualbox installed (I hoped I could switch over to KVM and uninstall it eventually as it kinda sucks even if it actually works reliably).

                I generated the VM using the GUI interface (virt-manager), this is the xml configuration file, I'm not doing anything fancy like PCIe/VGA passthrough (nor I plan to do so).

                Code:
                <domain type='kvm'>
                  <name>win10</name>
                  <uuid>be4650c5-e66e-4181-8869-26b8d9af3a21</uuid>
                  <metadata>
                    <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
                      <libosinfo:os id="http://microsoft.com/win/10"/>
                    </libosinfo:libosinfo>
                  </metadata>
                  <memory unit='KiB'>4194304</memory>
                  <currentMemory unit='KiB'>4194304</currentMemory>
                  <vcpu placement='static'>2</vcpu>
                  <os>
                    <type arch='x86_64' machine='pc-q35-3.0'>hvm</type>
                  </os>
                  <features>
                    <acpi/>
                    <apic/>
                    <hyperv>
                      <relaxed state='on'/>
                      <vapic state='on'/>
                      <spinlocks state='on' retries='8191'/>
                    </hyperv>
                    <vmport state='off'/>
                  </features>
                  <cpu mode='custom' match='exact' check='partial'>
                    <model fallback='allow'>kvm64</model>
                  </cpu>
                  <clock offset='localtime'>
                    <timer name='rtc' tickpolicy='catchup'/>
                    <timer name='pit' tickpolicy='delay'/>
                    <timer name='hpet' present='no'/>
                    <timer name='hypervclock' present='yes'/>
                  </clock>
                  <on_poweroff>destroy</on_poweroff>
                  <on_reboot>restart</on_reboot>
                  <on_crash>destroy</on_crash>
                  <pm>
                    <suspend-to-mem enabled='no'/>
                    <suspend-to-disk enabled='no'/>
                  </pm>
                  <devices>
                    <emulator>/usr/bin/qemu-system-x86_64</emulator>
                    <disk type='file' device='disk'>
                      <driver name='qemu' type='qcow2'/>
                      <source file='/run/media/alby/data_xeon_ext4/KVM_VM_folder/win10_disk.qcow2'/>
                      <target dev='vda' bus='virtio'/>
                      <boot order='2'/>
                      <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
                    </disk>
                    <disk type='file' device='cdrom'>
                      <driver name='qemu' type='raw'/>
                      <source file='/run/media/alby/data_xeon_ext4/winiso/Win10/Windows1709_32-64_EN.iso'/>
                      <target dev='sdb' bus='sata'/>
                      <readonly/>
                      <boot order='1'/>
                      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
                    </disk>
                    <disk type='file' device='cdrom'>
                      <driver name='qemu' type='raw'/>
                      <source file='/run/media/alby/data_xeon_ext4/winiso/KVM_drivers_virtio-win-0.1.141.iso'/>
                      <target dev='sdc' bus='sata'/>
                      <readonly/>
                      <address type='drive' controller='0' bus='0' target='0' unit='2'/>
                    </disk>
                    <controller type='usb' index='0' model='ich9-ehci1'>
                      <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x7'/>
                    </controller>
                    <controller type='usb' index='0' model='ich9-uhci1'>
                      <master startport='0'/>
                      <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x0' multifunction='on'/>
                    </controller>
                    <controller type='usb' index='0' model='ich9-uhci2'>
                      <master startport='2'/>
                      <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x1'/>
                    </controller>
                    <controller type='usb' index='0' model='ich9-uhci3'>
                      <master startport='4'/>
                      <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x2'/>
                    </controller>
                    <controller type='sata' index='0'>
                      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
                    </controller>
                    <controller type='pci' index='0' model='pcie-root'/>
                    <controller type='pci' index='1' model='pcie-root-port'>
                      <model name='pcie-root-port'/>
                      <target chassis='1' port='0x10'/>
                      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/>
                    </controller>
                    <controller type='pci' index='2' model='pcie-root-port'>
                      <model name='pcie-root-port'/>
                      <target chassis='2' port='0x11'/>
                      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
                    </controller>
                    <serial type='pty'>
                      <target type='isa-serial' port='0'>
                        <model name='isa-serial'/>
                      </target>
                    </serial>
                    <console type='pty'>
                      <target type='serial' port='0'/>
                    </console>
                    <input type='tablet' bus='usb'>
                      <address type='usb' bus='0' port='1'/>
                    </input>
                    <input type='mouse' bus='ps2'/>
                    <input type='keyboard' bus='ps2'/>
                    <graphics type='spice' autoport='yes'>
                      <listen type='address'/>
                      <image compression='off'/>
                    </graphics>
                    <sound model='ich9'>
                      <address type='pci' domain='0x0000' bus='0x00' slot='0x1b' function='0x0'/>
                    </sound>
                    <video>
                      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
                      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
                    </video>
                    <redirdev bus='usb' type='spicevmc'>
                      <address type='usb' bus='0' port='2'/>
                    </redirdev>
                    <redirdev bus='usb' type='spicevmc'>
                      <address type='usb' bus='0' port='3'/>
                    </redirdev>
                    <memballoon model='virtio'>
                      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
                    </memballoon>
                  </devices>
                </domain>

                Comment


                • #28
                  TBH I don't get why ppl bother self with VirtualBox on linux.
                  - Out of tree kernel crap to add some woes.
                  - Limided features.
                  - Awkward performance.
                  - Company behind it is opensource-unfriendly generally.

                  On other hand KVM is built-in in each and every linux version. It can take some efforts to get fully familiar with qemu+kvm but it does pays for itself. Been there, checked that.

                  Comment


                  • #29
                    Originally posted by SystemCrasher View Post
                    TBH I don't get why ppl bother self with VirtualBox on linux.
                    - Out of tree kernel crap to add some woes.
                    - Limided features.
                    - Awkward performance.
                    - Company behind it is opensource-unfriendly generally.

                    On other hand KVM is built-in in each and every linux version. It can take some efforts to get fully familiar with qemu+kvm but it does pays for itself. Been there, checked that.
                    Virtualbox is very user-friendly, much more than KVM (even with virt-manager GUI), and is much more convenient and hassle-free to use than VMWare (which is far superior otherwise), especially on a rolling release distro. For example I've never had issues with out-of-tree Virtualbox modules while VMWare ones routinely fail if your kernel version is too new.

                    That said I'm slowly migrating to KVM because I need more features, but boy is virt-manager limited, I have to use commandline and read documentation way too often to do stuff.

                    Also the guest drivers for Windows have to be installed manually from an ISO you download from Fedora/RedHat as there you find the only ones that are actually signed so Windows accepts them, while Virtualbox/VMWare automate this process without requiring you to figure out where is stuff and what you need to do.
                    Last edited by starshipeleven; 01-02-2019, 12:40 PM.

                    Comment


                    • #30
                      Originally posted by starshipeleven View Post
                      Yeah I'm sure this is either an issue for newer versions than what is used in stable-based distros, or it is a mistake in configuration on my part.

                      For the BSOD on install, this is the thread I read https://forum.level1techs.com/t/wind...install/127425

                      As you can see below I also tried with Windows 10 1703 as said in the forum but it did not really work either.

                      Ryzen 5 1600X on a Asrock x370 Gaming ITX with 16GB ECC ram. VM disk images are stored in a local Sata drive with ext4 filesystem.

                      It also has Virtualbox installed (I hoped I could switch over to KVM and uninstall it eventually as it kinda sucks even if it actually works reliably).

                      I generated the VM using the GUI interface (virt-manager), this is the xml configuration file, I'm not doing anything fancy like PCIe/VGA passthrough (nor I plan to do so).

                      Code:
                      <domain type='kvm'>
                      <name>win10</name>
                      <uuid>be4650c5-e66e-4181-8869-26b8d9af3a21</uuid>
                      <metadata>
                      <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
                      <libosinfo:os id="http://microsoft.com/win/10"/>
                      </libosinfo:libosinfo>
                      </metadata>
                      <memory unit='KiB'>4194304</memory>
                      <currentMemory unit='KiB'>4194304</currentMemory>
                      <vcpu placement='static'>2</vcpu>
                      <os>
                      <type arch='x86_64' machine='pc-q35-3.0'>hvm</type>
                      </os>
                      <features>
                      <acpi/>
                      <apic/>
                      <hyperv>
                      <relaxed state='on'/>
                      <vapic state='on'/>
                      <spinlocks state='on' retries='8191'/>
                      </hyperv>
                      <vmport state='off'/>
                      </features>
                      <cpu mode='custom' match='exact' check='partial'>
                      <model fallback='allow'>kvm64</model>
                      </cpu>
                      <clock offset='localtime'>
                      <timer name='rtc' tickpolicy='catchup'/>
                      <timer name='pit' tickpolicy='delay'/>
                      <timer name='hpet' present='no'/>
                      <timer name='hypervclock' present='yes'/>
                      </clock>
                      <on_poweroff>destroy</on_poweroff>
                      <on_reboot>restart</on_reboot>
                      <on_crash>destroy</on_crash>
                      <pm>
                      <suspend-to-mem enabled='no'/>
                      <suspend-to-disk enabled='no'/>
                      </pm>
                      <devices>
                      <emulator>/usr/bin/qemu-system-x86_64</emulator>
                      <disk type='file' device='disk'>
                      <driver name='qemu' type='qcow2'/>
                      <source file='/run/media/alby/data_xeon_ext4/KVM_VM_folder/win10_disk.qcow2'/>
                      <target dev='vda' bus='virtio'/>
                      <boot order='2'/>
                      <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
                      </disk>
                      <disk type='file' device='cdrom'>
                      <driver name='qemu' type='raw'/>
                      <source file='/run/media/alby/data_xeon_ext4/winiso/Win10/Windows1709_32-64_EN.iso'/>
                      <target dev='sdb' bus='sata'/>
                      <readonly/>
                      <boot order='1'/>
                      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
                      </disk>
                      <disk type='file' device='cdrom'>
                      <driver name='qemu' type='raw'/>
                      <source file='/run/media/alby/data_xeon_ext4/winiso/KVM_drivers_virtio-win-0.1.141.iso'/>
                      <target dev='sdc' bus='sata'/>
                      <readonly/>
                      <address type='drive' controller='0' bus='0' target='0' unit='2'/>
                      </disk>
                      <controller type='usb' index='0' model='ich9-ehci1'>
                      <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x7'/>
                      </controller>
                      <controller type='usb' index='0' model='ich9-uhci1'>
                      <master startport='0'/>
                      <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x0' multifunction='on'/>
                      </controller>
                      <controller type='usb' index='0' model='ich9-uhci2'>
                      <master startport='2'/>
                      <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x1'/>
                      </controller>
                      <controller type='usb' index='0' model='ich9-uhci3'>
                      <master startport='4'/>
                      <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x2'/>
                      </controller>
                      <controller type='sata' index='0'>
                      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
                      </controller>
                      <controller type='pci' index='0' model='pcie-root'/>
                      <controller type='pci' index='1' model='pcie-root-port'>
                      <model name='pcie-root-port'/>
                      <target chassis='1' port='0x10'/>
                      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/>
                      </controller>
                      <controller type='pci' index='2' model='pcie-root-port'>
                      <model name='pcie-root-port'/>
                      <target chassis='2' port='0x11'/>
                      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
                      </controller>
                      <serial type='pty'>
                      <target type='isa-serial' port='0'>
                      <model name='isa-serial'/>
                      </target>
                      </serial>
                      <console type='pty'>
                      <target type='serial' port='0'/>
                      </console>
                      <input type='tablet' bus='usb'>
                      <address type='usb' bus='0' port='1'/>
                      </input>
                      <input type='mouse' bus='ps2'/>
                      <input type='keyboard' bus='ps2'/>
                      <graphics type='spice' autoport='yes'>
                      <listen type='address'/>
                      <image compression='off'/>
                      </graphics>
                      <sound model='ich9'>
                      <address type='pci' domain='0x0000' bus='0x00' slot='0x1b' function='0x0'/>
                      </sound>
                      <video>
                      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
                      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
                      </video>
                      <redirdev bus='usb' type='spicevmc'>
                      <address type='usb' bus='0' port='2'/>
                      </redirdev>
                      <redirdev bus='usb' type='spicevmc'>
                      <address type='usb' bus='0' port='3'/>
                      </redirdev>
                      <memballoon model='virtio'>
                      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
                      </memballoon>
                      </devices>
                      </domain>
                      I never used to virt-manager GUI, but can you drop the CPU emulation to core2 or sandy-bridge?

                      - Gilboa
                      DEV: Intel S2600C0, 2xE52658V2, 32GB, 4x2TB + 2x3TB, GTX1080, F28/x86_64, Dell UP3216Q 4K.
                      SRV: Intel S5520SC, 2xX5680, 36GB, 4x2TB, GTX550, F28/x86_64, Dell U2711..
                      BAK: Tyan Tempest i5400XT, 2xE5335, 8GB, 3x1.5TB, 9800GTX, F28/x86-64.
                      LAP: ASUS Strix GL502V, i7-6700HQ, 32GB, 1TB+256GB, 1070M, F29/x86_64.

                      Comment

                      Working...
                      X