Hyper-V: Improve Ubuntu 16.04 video performance

26,795

Solution 1

I also tried out Hyper-V on Windows 10 Pro with Ubuntu Desktop 64-bit 16.04 LTS as guest system. I am not satisfied with the graphics performance. I do not know if i missed out a setting. If anybody finds a good solution i would be happy to know about it too.

But this is what i did. I read and followed the information from the Microsoft documentation on TechNet. There is a table with features of Hyper-V. Most interestingly in this case is the row mentioning "Hyper-V specific video device". But it does not mention anything about Windows 10. Only about Windows Server host systems.

I did not change anything in /etc/initramfs-tools/modules. However, i followed the instructions and installed:

$> sudo apt-get update
$> sudo apt-get install --install-recommends linux-virtual-lts-xenial
$> sudo apt-get install --install-recommends linux-tools-virtual-lts-xenial linux-cloud-tools-virtual-lts-xenial

Then reboot. After reboot i found this:

$> lsmod | grep 'hyperv\|hv_'
hv_balloon        24576   0
hyperv_fb         20480   2
hv_storvsc        20480   3
hv_netvsc         36864   0
hv_utils          24576   2
hyperv_keyboard   16384   0
hid_hyperv        16384   0
hid              118784   2 hid_hyperv,hid_generic
hv_vmbus          73728   7 hv_balloon,hyperv_keyboard,hv_netvsc,hid_hyperv,hv_utils,hyperv_fb,hv_storvsc

So it seems to me that something worked out. But the graphics performance still seems to be poor. I am not sure if it improved maybe a little. Maybe you try it out and tell me if it helps?

Solution 2

I get a performance issue only with 64 bits Ubuntu (16.04 or 18.04), but no performance issue with 32 bits.

I resolved the performance issue by enabling "Migrate to a physical computer with a different processor version" in Settings → Processor → Compatibility.

(So it seems this may be related to CPU architecture.)

Share:
26,795

Related videos on Youtube

Trevor Sullivan
Author by

Trevor Sullivan

###Overview Trevor Sullivan has been working with enterprise solutions since 2004, and has worked as a sysadmin, engineer, consultant, and trainer. Trevor is hugely passionate about technology, sharing information, building relationships, and communicating clearly with people. Technologies Trevor has worked with the following technologies. Amazon Web Services (AWS) cloud Docker / containers Python programming Configuration Management: Ansible, PowerShell Desired State Configuration (DSC) Microsoft PowerShell Microsoft Azure Microsoft System Center Configuration Manager (SCCM) Microsoft Windows Operating System Deployment (OSD) Microsoft Windows Server 2008 R2, 2012, 2012 R2 Microsoft Windows 10 Microsoft Active Directory Microsoft SQL Server Awards Trevor has received the following professional awards. Microsoft MVP: Cloud & Data Center Management [2014 - 2017] Docker Captain [2016]

Updated on September 18, 2022

Comments

  • Trevor Sullivan
    Trevor Sullivan over 1 year

    I'm running Ubuntu 16.04 desktop in a Hyper-V virtual machine on a Windows 10 desktop computer. It is working fine, but video performance is very far from "smooth." Any ideas on how to install the Hyper-V Linux Integration Services (LIS)?

    I found an article that said to edit /etc/initramfs-tools/modules, but that didn't help at all.

    http://www.serverwatch.com/server-tutorials/installing-and-activating-hyper-v-linux-integration-services.html

    • Tim G
      Tim G almost 8 years
      Have you made sure that Intel VT-D is (sometimes more than one setting) enabled in your BIOS/UEFI? AMD equivalent, if applicable, is IOMMU.
    • Trevor Sullivan
      Trevor Sullivan almost 8 years
      @TimG In Task Manager, it says "Virtualization: Enabled." I'm using an Intel Core i5-2500k. This particular CPU doesn't support VT-D. Is that a requirement? How else might that missing feature impact performance?
    • Tim G
      Tim G almost 8 years
      Ah, I gave a slightly older marketing name; it's VT-x on that proc/chipset. Check to see if that is enabled in BIOS/UEFI. (The Virtualization: Enabled flag you refer to is probably the hypervisorlaunchtype auto setting in your BCD, which is automatically enabled by Windows when you do all that Hyper-V setup stuff. If it were off, I don't think the vm would even launch.)
  • Trevor Sullivan
    Trevor Sullivan over 7 years
    Thanks for the response -- it doesn't seem like there's very good support from Microsoft for graphics in Linux on Hyper-V. Maybe they'll improve this in the future.
  • Berg YE
    Berg YE over 4 years
    I resolved the performance issue by enable the 'migrate to a physical computer with a different processor version' through 'settings->processor->comatibility'
  • Eliah Kagan
    Eliah Kagan over 4 years
    Thanks. I've edited this to include that so it's clear that this is intended as an answer and what it is recommending. (Of course, please feel free to re-edit to make further changes.)