KVM迁移报错the CPU is incompatible with host CPU: Host CPU does not provide required features

KVM启动虚拟机CPU报错,之前已经写过日志,这里说的是如果你实在找不到对应的CPU架构,那就直接选择”host-model”

比如,我之前的配置文件,cpu对应的配置如下:

<cpu mode='custom' match='exact' check='partial'>
<model fallback='allow'>Skylake-Client</model>
<feature policy='require' name='md-clear'/>
<feature policy='require' name='spec-ctrl'/>
<feature policy='require' name='ssbd'/>
</cpu>

这个配置是我创建模板机默认的,现在我把其中一台虚拟机迁移到另外一台主机就报错了

the CPU is incompatible with host CPU: Host CPU does not provide required features: x2apic, hle, rtm, mpx, rdseed, adx, smap, xsavec, xgetbv1, 3dnowprefetch

那我又不想去查微代码,那就直接改成复制主机模式吧,更改如下:

<cpu mode='host-model' check='partial'>
<model fallback='allow'/>
</cpu>

这一类报错网上有很多说明,我贴一个:

https://bugzilla.redhat.com/show_bug.cgi?id=1609818

重点是最后几位小哥的建议:

Daniel Berrangé 2018-07-30 15:03:30 UTC
Ok your guest has been given the -IBRS variant which requires spec-ctrl

    <model fallback='allow'>Skylake-Client-IBRS</model>

but the host does not support this:

    <model>Skylake-Client</model>

So either don't request this -IBRS CPU for your guest, or you'll need the new microcode.

Comment 9Martin Krajnak 2018-07-30 15:12:43 UTC
Ok, I noticed just now that I have that CPU param, not sure where it came from I was just confused since it worked on different kernel.

So if anyone hits this issue all you have to do is:

1.Open virt-manager
2.Go to parameters of VM
3.Go to cpu section
4.Check "Copy host CPU configuration" and click Apply

that fixed the problem for me

thanks a lot Daniel

Comment 10James Hartsock 2018-09-17 13:52:44 UTC
The virt-install way would be to add '--cpu host', or at least it worked for me.

 

此条目发表在kvm分类目录,贴了标签。将固定链接加入收藏夹。

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注