On Mon, Mar 02, 2020 at 09:17:27AM +0100, Michal Privoznik wrote:
> Libvirt tries to forbid migration onto the same host and it does
> that by checking if local and remote hostnames are the same and
> whether local and remote UUIDs are the same. Well, the latter
> makes sense but the former doesn't really because libvirtd can be
> running inside an UTS namespace and hostnames can appear the same
> on both sides of migration. On the other hand, host UUIDs are
> unique, so rely on them when trying to prevent migration onto the
> same host.

This check originates in

  commit 8654175c5b0c3db9e5f70907f102f0f900355d28
  Author: Daniel P. Berrangé <berra...@redhat.com>
  Date:   Mon Jan 24 18:06:16 2011 +0000

    Introduce migration cookies to QEMU driver
    
We've always had both hostname and uuid checks here, as a way to
prevent localhost-migration. The only way I can think to bypass
the UUID check is to run a second libvirtd on the same host,
but inside a container so you can change UUID or libvirtd.conf.
At that point, you can set things up so that you are safe todo a
local migration, so its ok to allow for that.

> Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1639596
> 
> Signed-off-by: Michal Privoznik <mpriv...@redhat.com>
> ---
>  src/qemu/qemu_migration_cookie.c | 12 +++++-------
>  1 file changed, 5 insertions(+), 7 deletions(-)

Reviewed-by: Daniel P. Berrangé <berra...@redhat.com>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

Reply via email to