nde*_*mou 4 libvirt kvm-virtualization
我试图将我的 KVM 主机从带有 AMD cpu 的主机迁移到带有 Intel CPU 的主机,但是当我运行时virsh start guest_name
我得到了error: unsupported configuration: CPU model ... is not supported by hypervisor
.
我知道 KVM 支持这样的迁移(在 FAQ 中他们甚至谈到了 64 位 AMD/Intel CPU 之间的实时迁移)。我该怎么办?
您应该编辑来宾的 xml 定义部分,使其包含在两个 CPU(Intel 和 AMD)中都能找到的 CPU 功能子集。您可以使用virsh
查找此子集。就是这样:
$ virsh capabilities | virsh cpu-baseline /dev/stdin > /tmp/host1.xml
# copy this file to Host#2 -- e.g.:
$ scp /tmp/host1.xml $HOST2:/tmp/host1.xml
Run Code Online (Sandbox Code Playgroud)
$ virsh capabilities | virsh cpu-baseline /dev/stdin > /tmp/host2.xml
$ cat /tmp/host1.xml /tmp/host2.xml > /tmp/both-cpus.xml
Run Code Online (Sandbox Code Playgroud)
现在编辑both-cpus.xml
和:
<cpu>....</cpu>
部分<vendor>....</vendor>
最后运行这个:
$ virsh cpu-baseline /tmp/both-cpus.xml
Run Code Online (Sandbox Code Playgroud)
如果您收到此错误“XML 错误:缺少 CPU 架构”,请<arch>x86_64</arch>
在这两个<cpu>...</cpu>
部分中添加。当然x86_64
适用于现代 AMD 和 Intel CPU,如果您使用其他架构进行适当调整(感谢harald提供此提示)。
必须在来宾的 xml 定义中使用上述命令的输出。
https://www.berrange.com/posts/2010/02/15/guest-cpu-model-configuration-in-libvirt-with-qemukvm/
https://www.redhat.com/archives/libvir-list/2011-March/msg01022.html
归档时间: |
|
查看次数: |
3220 次 |
最近记录: |