Bug 1521202
Summary: | libvirt change the running guest cpu model after upgrade from 7.3 | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Luyao Huang <lhuang> |
Component: | libvirt | Assignee: | Jiri Denemark <jdenemar> |
Status: | CLOSED ERRATA | QA Contact: | Luyao Huang <lhuang> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.5 | CC: | dyuan, jdenemar, jishao, lhuang, lizhu, lmiksik, rbalakri, xuzhang, yalzhang, zpeng |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libvirt-3.9.0-6.el7 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2018-04-10 11:00:58 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1199452 |
Description
Luyao Huang
2017-12-06 01:07:25 UTC
Patches sent upstream for review: https://www.redhat.com/archives/libvir-list/2017-December/msg00250.html Fixed upstream by commit 4486dcdb4a386a906807d4eb7de586202e50cd18 Refs: v3.10.0-37-g4486dcdb4a Author: Jiri Denemark <jdenemar> AuthorDate: Thu Dec 7 11:21:48 2017 +0100 Commit: Jiri Denemark <jdenemar> CommitDate: Fri Dec 8 15:50:52 2017 +0100 qemu: Separate fetching CPU definitions from filling qemuCaps virQEMUCapsProbeQMPCPUDefinitions is now a small wrapper which fills in qemuCaps with CPU models fetched by virQEMUCapsFetchCPUDefinitions. Signed-off-by: Jiri Denemark <jdenemar> commit ce73de441d35e17a29b83b8741e668a6ddc013ba Refs: v3.10.0-38-gce73de441d Author: Jiri Denemark <jdenemar> AuthorDate: Thu Dec 7 11:23:50 2017 +0100 Commit: Jiri Denemark <jdenemar> CommitDate: Fri Dec 8 15:50:52 2017 +0100 qemu: Make sure host-model uses CPU model supported by QEMU When reconnecting to a running domain started by old libvirt, which did not change host-model into a custom CPU definition, we replace the CPU definition with a specific CPU model from host capabilities. However, that CPU model may not be supported by the running qemu process. We need to translate the CPU model to one of the models which libvirt could have used when starting the domain. https://bugzilla.redhat.com/show_bug.cgi?id=1521202 Signed-off-by: Jiri Denemark <jdenemar> Hi jirka, I found that still get failure when migrate to a rhel7.3 host, but the error is different this time (the step is the same with comment 0): 1. the guest xml before upgrade to 7.5: <cpu mode='host-model' match='exact'> <model fallback='forbid'>Opteron_G3</model> <vendor>AMD</vendor> <feature policy='require' name='vme'/> <feature policy='require' name='ht'/> <feature policy='require' name='pclmuldq'/> <feature policy='require' name='ssse3'/> <feature policy='require' name='fma'/> <feature policy='require' name='sse4.1'/> <feature policy='require' name='sse4.2'/> <feature policy='require' name='movbe'/> <feature policy='require' name='aes'/> <feature policy='require' name='xsave'/> <feature policy='require' name='osxsave'/> <feature policy='require' name='avx'/> <feature policy='require' name='f16c'/> <feature policy='require' name='rdrand'/> <feature policy='require' name='arat'/> <feature policy='require' name='fsgsbase'/> <feature policy='require' name='bmi1'/> <feature policy='require' name='avx2'/> <feature policy='require' name='smep'/> <feature policy='require' name='bmi2'/> <feature policy='require' name='rdseed'/> <feature policy='require' name='adx'/> <feature policy='require' name='smap'/> <feature policy='require' name='clflushopt'/> <feature policy='require' name='xsaveopt'/> <feature policy='require' name='xsavec'/> <feature policy='require' name='xgetbv1'/> <feature policy='require' name='mmxext'/> <feature policy='require' name='fxsr_opt'/> <feature policy='require' name='pdpe1gb'/> <feature policy='require' name='cmp_legacy'/> <feature policy='require' name='extapic'/> <feature policy='require' name='cr8legacy'/> <feature policy='require' name='3dnowprefetch'/> <feature policy='require' name='osvw'/> <feature policy='require' name='skinit'/> <feature policy='require' name='wdt'/> <feature policy='require' name='tce'/> <feature policy='require' name='topoext'/> <feature policy='require' name='perfctr_core'/> <feature policy='require' name='perfctr_nb'/> <feature policy='require' name='ibpb'/> 2. guest xml after update to 7.5: # virsh dumpxml vm1 ... <cpu mode='custom' match='exact' check='full'> <model fallback='allow'>Opteron_G5</model> <vendor>AMD</vendor> <feature policy='require' name='vme'/> <feature policy='require' name='x2apic'/> <feature policy='require' name='movbe'/> <feature policy='require' name='rdrand'/> <feature policy='require' name='hypervisor'/> <feature policy='require' name='arat'/> <feature policy='require' name='fsgsbase'/> <feature policy='require' name='bmi1'/> <feature policy='require' name='avx2'/> <feature policy='require' name='smep'/> <feature policy='require' name='bmi2'/> <feature policy='require' name='rdseed'/> <feature policy='require' name='adx'/> <feature policy='require' name='smap'/> <feature policy='require' name='clflushopt'/> <feature policy='require' name='xsaveopt'/> <feature policy='require' name='xsavec'/> <feature policy='require' name='xgetbv1'/> <feature policy='require' name='mmxext'/> <feature policy='require' name='fxsr_opt'/> <feature policy='require' name='cmp_legacy'/> <feature policy='require' name='cr8legacy'/> <feature policy='require' name='osvw'/> <feature policy='require' name='ibpb'/> <feature policy='disable' name='rdtscp'/> <feature policy='disable' name='svm'/> <feature policy='disable' name='xop'/> <feature policy='disable' name='fma4'/> <feature policy='disable' name='tbm'/> <feature policy='disable' name='ht'/> <feature policy='disable' name='osxsave'/> <feature policy='disable' name='extapic'/> <feature policy='disable' name='skinit'/> <feature policy='disable' name='wdt'/> <feature policy='disable' name='tce'/> <feature policy='disable' name='topoext'/> <feature policy='disable' name='perfctr_core'/> <feature policy='disable' name='perfctr_nb'/> <feature policy='disable' name='monitor'/> <feature policy='disable' name='sha-ni'/> ... # virsh dumpxml vm1 --migratable ... <cpu mode='custom' match='exact' check='partial'> <model fallback='allow'>EPYC</model> <vendor>AMD</vendor> <feature policy='require' name='ht'/> <feature policy='require' name='osxsave'/> <feature policy='require' name='cmp_legacy'/> <feature policy='require' name='extapic'/> <feature policy='require' name='skinit'/> <feature policy='require' name='wdt'/> <feature policy='require' name='tce'/> <feature policy='require' name='topoext'/> <feature policy='require' name='perfctr_core'/> <feature policy='require' name='perfctr_nb'/> <feature policy='require' name='ibpb'/> ... # virsh migrate --live vm1 qemu+ssh://target/system error: internal error: Unknown CPU feature sha-ni Could you please help to check this issue ? Thanks in advance for your reply! Sigh, it looks like a never ending punishment for not storing the actual CPU model used to start a domain with host-model CPU in the XML from the moment we added support for host-model. We could possibly try to avoid adding CPU features which were not available in the old libvirt into the guest CPU definition when replacing host-model for a running domain. However, we need to do it in a very smart way to avoid breaking migration to new libvirt. Could you file a separate bug for that and keep this one just for the CPU model name change? (In reply to Jiri Denemark from comment #7) > Sigh, it looks like a never ending punishment for not storing the actual CPU > model used to start a domain with host-model CPU in the XML from the moment > we added support for host-model. We could possibly try to avoid adding CPU > features which were not available in the old libvirt into the guest CPU > definition when replacing host-model for a running domain. However, we need > to do it in a very smart way to avoid breaking migration to new libvirt. > > Could you file a separate bug for that and keep this one just for the CPU > model name change? Okay, I have filed a new bug 1539484 to track this new issue, and thanks for your reply. And verify this bug with comment 6, since the libvirt update the guest cpu to a old qemu supported cpu model, this cpu-model won't broke the migration. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2018:0704 |