I'm exporting a domain from 'old pc' to 'new pc'

# Export domain (from old pc)
ssh user@"$REMOTE_IP" "virsh --connect qemu:///system suspend --domain magento-base > /dev/null 2>&1"                                                                                       # Pause vm
ssh user@"$REMOTE_IP" "virsh --connect qemu:///system dumpxml --update-cpu --domain magento-base > ~/workspaces/virtual-machines/magento-base/magento-base.xml"                             # Export vm
ssh user@"$REMOTE_IP" "virsh --connect qemu:///system snapshot-dumpxml --domain magento-base --snapshotname snapshot1 > ~/workspaces/virtual-machines/magento-base/snapshots/snapshot1.xml" # Export snapshot1

# Import domain (to new pc)
virsh --connect qemu:///system destroy --domain magento-base > /dev/null 2>&1                                                                                                          # Stop old vm
virsh --connect qemu:///system undefine --domain magento-base > /dev/null 2>&1                                                                                                         # Delete old vm
virsh --connect qemu:///system define ~/workspaces/virtual-machines/magento-base/magento-base.xml                                                                                      # Import new vm
virsh --connect qemu:///system snapshot-create --domain magento-base --xmlfile ~/workspaces/virtual-machines/magento-base/snapshots/snapshot1.xml --atomic --redefine --current --halt # Import snapshot1

PROBLEM When I start the domain, or the snapshot in the new pc, I get the error:

The CPU is incompatible with host CPU

What's the right way to fix this error? Thank you.

  • Is that the full error message? – fpmurphy May 4 '20 at 14:30
  • Full error when I start the domain: pastebin.com/raw/Natbnchb – Adrian Lopez May 4 '20 at 14:35
  • Full error when I start the snapshot: pastebin.com/raw/NU4TpjE2 – Adrian Lopez May 4 '20 at 14:37
  • 1
    Migrating between different CPU archectures/models/vendors is never fully suppported. This is a common limitation with most virtualization techniques. – fpmurphy May 4 '20 at 14:49

Currently there's no way to fix this issue. Both 'old pc' and 'new pc' must support the same cpu flags.

Source: This answer from libvirt IRC channel:

- when you save the running VM state, the details of the current exposed guest CPU are recorded.
- when we restore the guest from saved state, we must ensure the host CPU is able to support all the features the guest was currently run with IOW, your new host  lacks some CPU flags that the old host had.
- there's no safe way to "fix" this problem in general.
- unless there's a BIOS update you're missing for your new host.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.