host passthrough not working with KVMs

Bug #1876365 reported by Bill Wear
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
MAAS
Fix Committed
Medium
Unassigned

Bug Description

When deploying a KVM VM, the CPU capabilities are very limited and set to QEMU/KVM CPU. I’d like to use host-passthrough as a default but I’m not sure where to find how MAAS communicates with Virsh or any config files.

I’d like the virtual machines that MAAS creates to have host-passthrough as the CPU arch instead of the current CPU arch which is very basic.

For example, creating a VM with MAAS will produce a virtual machine that can’t even run Docker because the VCPU doesn’t have SSE4 capabilities.

  <cpu mode='host-passthrough' check='none'/>

I’d like to be automatically inserted into each new domain that is created by MAAS

Just to confirm, we’re not talking about the CPU architecture as in x86_64 but the feature flags and processor name/details retrieved from /proc/cpuinfo. I’d like them to have the host flags and details as via host-passthrough.

Related branches

Revision history for this message
Björn Tillenius (bjornt) wrote :

How does this work for LXD VM hosts?

Changed in maas:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for MAAS because there has been no activity for 60 days.]

Changed in maas:
status: Incomplete → Expired
Revision history for this message
Brett Milford (brettmilford) wrote :

I believe this bug is still valid.

Is there a way to set host passthrough cpu model for libvirt guest?

@bjornt - I don't believe this is relevant to lxc containers because,as far as I know, there is no cpu emulation taking place.

Changed in maas:
status: Expired → New
Revision history for this message
Björn Tillenius (bjornt) wrote :

MAAS support VMs for both Virsh and LXD. LXD VM host is where we focus our attention on. Virsh will still be supported, but if you need more advanced features, you should use LXD VM hosts.

So my question is still valid. Is the issue present in LXD VM hosts as well? What configuration is needed to get it to work there?

Changed in maas:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for MAAS because there has been no activity for 60 days.]

Changed in maas:
status: Incomplete → Expired
Revision history for this message
Luca Cervigni (cervigni) wrote :

Could you please re-open this?

I am coming a bit later, but I found this issue too, and that is “probably” a bug on virsh.py

you can see that the host-passthrough parameter has been “omitted / forgotten” for AMD64 -> https://github.com/maas/maas/blob/3.2/src/provisioningserver/drivers/pod/virsh.py#L100
while on ARM64 and PCC is present see: https://github.com/maas/maas/blob/3.2/src/provisioningserver/drivers/pod/virsh.py#L151
https://github.com/maas/maas/blob/3.2/src/provisioningserver/drivers/pod/virsh.py#L192

This parameter should be a default and present for any KVM deployment as it is already default on many systems including openstack since quite a while. I will post on the related bug asking to re-open as well.

To fix your issue on a current deployment, edit the file:

/usr/lib/python3/dist-packages/provisioningserver/drivers/pod/virsh.py

and add `<cpu mode='host-passthrough'/>` under the AMD64 section.

Then restart maas-rackd for change the default for each of your POD creation.

Alberto Donato (ack)
tags: added: bug-council
Changed in maas:
status: Expired → Triaged
Revision history for this message
Jerzy Husakowski (jhusakowski) wrote :

We'll add the missing host passthrough option for amd64 arch.

Changed in maas:
importance: Undecided → Medium
milestone: none → 3.5.0
tags: removed: bug-council
Changed in maas:
status: Triaged → Fix Committed
Changed in maas:
milestone: 3.5.0 → 3.4.0
status: Fix Committed → Fix Released
status: Fix Released → Fix Committed
Changed in maas:
milestone: 3.4.0 → 3.5.0
Alberto Donato (ack)
Changed in maas:
milestone: 3.5.0 → 3.4.0
Alberto Donato (ack)
Changed in maas:
milestone: 3.4.0 → 3.4.0-beta2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.