Ask Your Question

Packstack live migration fails: qemu address resolution error

asked 2017-02-20 00:16:31 -0500

updated 2017-02-20 18:37:16 -0500

I provisioned an all-in-one server ("controller") and a compute node on two virtual machines with Packstack (Newton). The hypervisor is libvirt/qemu. The purpose is to experiment with live migration.

Problem: I can live-migrate an instance from controller to compute but not the other way around. After a failed migration compute->controller, I find the following error in /var/log/libvirt/libvirtd.log on the compute node:

2017-02-20 05:56:29.084+0000: 13550: debug : qemuMonitorJSONCheckError:376 : unable to execute QEMU command {"execute":"drive-mirror","arguments":{"device":"drive-virtio-disk0","target":"nbd:controller:49153:exportname=drive-virtio-disk0","speed":9223372036853727232,"sync":"top","mode":"existing","format":"raw"},"id":"libvirt-41"}: {"id":"libvirt-41","error":{"class":"GenericError","desc":"address resolution failed for controller:49153: Name or service not known"}}

When I migrate successfully in the other direction, I see the same drive-mirror command (except "controller" is replaced by "compute1") but without error.

Where does the address resolution error come from? Is it name resolution? As user qemu, I can ping controller from the compute node, and also ping controller.home (the FQDN).

Where can I start troubleshooting this?

edit retag flag offensive close merge delete


Hmmmm, it should be still DNS stuff. Here is the workaround/fault isolation stuff: can you add entry for controller in /etc/hosts in that compute?

volenbovsky gravatar imagevolenbovsky ( 2017-02-20 07:33:18 -0500 )edit

Well, it's in /etc/hosts already. But you get me thinking - perhaps I should disable DNS and only use /etc/hosts. If the problem occurs again (I am re-provisioning), I will try that.

Bernd Bausch gravatar imageBernd Bausch ( 2017-02-20 09:19:12 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2017-02-22 04:22:27 -0500

I found that this error was caused by the SELinux context of /etc/hosts, which was set incorrectly (by me or by Packstack). As a result, qemu was unable to access /etc/hosts, and consequently couldn't resolve the hostname of the destination compute node.

This was particularly difficult to find, since migration in the other direction worked (the /etc/hosts file on the other node was correct), and everything I tried to resolve the name, including a small program using the getaddrinfo() library function, was successful. Of course, all my name resolution attempts worked, since I did them as an interactive user, who is not bothered by SELinux contexts.

I had forgotten the iron rule: If you spend hours scratching your head, it's probably related to SELinux.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2017-02-20 00:16:31 -0500

Seen: 619 times

Last updated: Feb 22 '17