Friday, January 15, 2016

Using CPU host-passthrough with virt-manager

I described virt-manager's CPU model default in this post. In that post I explained the difficulties of using either of the libvirt options for mirroring the host CPU: mode=host-model still has operational issues, and mode=host-passthrough isn't recommended for use with libvirt over supportability concerns.

Unfortunately since writing that post the situation hasn't improved any, and since host-passthrough is the only reliably way to expose the full capabilities of the host CPU to the VM, users regularly want to enable it. This is particularly apparent if trying to do nested virt, which often doesn't work on Intel CPUs unless host-passthrough is used.

However we don't explicitly expose this option in virt-manager since it's not generally recommended for libvirt usage. You can however still enable it in virt-manager:
  • Navigate to VM Details->CPU
  • Enter host-passthrough in the CPU model field
  • Click Apply


  1. Is virt-manager able to allow the GPU to be passed through? The instructions I've seen for doing that always say to use QEMU directly instead of libvirt.

    1. Not yet, the complete support is very new to qemu and libvirt. I'll be looking into it soon

    2. Great! I think it would greatly simplify the usecase of the gaming VM.

  2. Wow glad I found out about this. Thank you!