Uploaded image for project: 'Qt Quality Assurance Infrastructure'
  1. Qt Quality Assurance Infrastructure
  2. QTQAINFRA-3416

Windows 10 VMs consume too much CPU usage while being idle



    • Type: Bug
    • Status: Open
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: unversioned
    • Fix Version/s: None
    • Labels:


      This seems to be an issue with KVM virtualisation.

      • I deployed windows VMs on an unused hypervisor host
      • I assigned 4 cores and 50 GB RAM to it

      I notice the following:

      • inside the VM I see task manager showing 1% CPU usage and 1.2 GB RAM usage
      • on the hypervisor host I see the qemu process consuming 70% to 240% CPU usage and 50GB RAM

      Possible tweaks to improve the situation

      • In the VM install virtio ballooning, network and block drivers, and install the qemu-guest-agent too as described here
      • Make sure the qemu-guest-agent is running after rebooting the VM (run the powershell command Get-Service QEMU-GA)
      • In opennebula template turn the feature "qemu guest agent" on
        FEATURES = [
          ACPI = "yes",
          APIC = "yes",
          GUEST_AGENT = "yes",
          HYPERV = "yes" ]
      • In opennebula template turn on the ballooning autodeflate feature and a couple of hyperv tweaks
        RAW = [
          DATA = "<features><hyperv> <synic state='on'/> <stimer state='on'/> </hyperv></features>
                  <devices> <memballoon model='virtio' autodeflate='on' /> </devices>",
          TYPE = "kvm" ]
      • Change the disk device of the windows VM to "virtio" driver; might need a couple of tweaks to reboot from the new drive
      • Change the network device of the windows VM to "netkvm" driver
      • OpenNebula unfortunately does not support yet setting two different memory sizes, so that the balloon gets inflated/deflated. See issues 949 and 906
        • so there doesn't seem to be a way to reduce the 50GB RAM utilisation
        • we can minimize the impact by keeping a big swap partition per SSD drive on the hypervisor hosts
        • and by running services "ksm" and "ksmtuned" on the hypervisor hosts (kernel same page merging, see here)


      • Test if the hypervisor connects to the qemu-guest-agent:
        • run virsh dumpxml $DOMAINID
        • check the status "connected" in a line like the following:
        • <target type='virtio' name='org.qemu.guest_agent.0' state='connected'/>
      • You can also get information with:
        virsh qemu-agent-command $DOMAINID '{"execute":"guest-info"}'



          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.



              hehalmet Heikki Halmet
              jimis Dimitrios Apostolou
              0 Vote for this issue
              1 Start watching this issue



                  Gerrit Reviews

                  There are no open Gerrit changes