I tried to migrate my KVM host from a host with AMD cpu to a host with Intel CPU but when I run virsh start guest_name
I got error: unsupported configuration: CPU model ... is not supported by hypervisor
.
I know that KVM supports such a migration (in the FAQ they even talk about live migration between 64 bit AMD/Intel CPUs). What should I do?
You should edit the part of the xml definition of your guest so that it contains a subset of CPU capabilities that are found in both CPUs (Intel and AMD). You can use
virsh
to find this subset. Here's how:At the 1st host
Everything else happens at the 2nd host
Now edit
both-cpus.xml
and:<cpu>....</cpu>
sections<vendor>....</vendor>
Finally run this:
If you get this error "XML error: Missing CPU architecture" add
<arch>x86_64</arch>
in both<cpu>...</cpu>
sections. Ofcoursex86_64
is for modern AMD and Intel CPUs, if you work with some other architecture adjust appropriately (thanks to harald for this tip).The output of the above command must be used inside the xml definitions of the guest.
References
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