libvirt KVM migration – error: unsupported configuration

libvirt KVM migration – error: unsupported configuration: Target domain max memory does not match source


I recently ran in to trouble trying to migrate a KVM libvirt virtual machine (AKA domain):

[user@hypervisor01 ~]# time virsh migrate --live webserver01 qemu+ssh:// --copy-storage-all --persistent --undefinesource --verbose --abort-on-error --xml virtmigrate/webserver01.xml's password:
error: unsupported configuration: Target domain max memory 8388608 does not match source 9437184

[user@hypervisor01 ~]# tail /var/log/libvirt/libvirtd.log
2015-08-13 07:44:07.781+0000: 4418: error : virDomainDefCheckABIStability:11730 : unsupported configuration: Target domain max memory 8388608 does not match source 9437184

These hypervisors were not using shared storage, so I had previously created updated copies of the configs (in this case, virtmigrate/webserver01.xml) that contained the correct path to their new storage location (source dev). The error I was receiving was due to the memory assigned to webserver01 being changed since I created the updated configs.
The migration config (virtmigrate/webserver01.xml) contained the older, smaller memory parameters:

<memory unit="KiB">8388608</memory>
<currentmemory unit="KiB">

While the current/running config contained the larger:

<memory unit="KiB">9437184</memory>
<currentmemory unit="KiB">

I updated the migration config virtmigrate/webserver01.xml and it is now working fine.

Here are some additional commands that may be useful in a similar situation.

virsh dominfo (domain): Returns basic information about the domain, including max and used memory

[user@hypervisor01 ~]# virsh dominfo webserver01
Id: 23
Name: webserver01
UUID: bce54f4b-32af-ec6d-7cab-bb57d0e85782
OS Type: hvm
State: running
CPU(s): 4
CPU time: 1578499.8s
Max memory: 9437184 KiB
Used memory: 9437184 KiB
Persistent: yes
Autostart: enable

virsh edit domain: Edit the XML configuration file for a domain, which will affect the next boot of the guest.
This is equivalent to:

virsh dumpxml --inactive --security-info domain > domain.xml
vi domain.xml (make changes)
virsh define domain.xml

except that it does some error checking.

virsh setmaxmem (domain) 16G --config: Set the max memory for a domain, will take effect at next boot of guest


Leave a Reply

Your email address will not be published. Required fields are marked *