Question about local migration between containers

Hello On kubevirt project we are using IpV6 Kind cluster, and trying to support migration, but since both of the containers are on the same host we get this error {"component":"virt-launcher","level":"error","msg":"internal error: Attempt to migrate guest to the same host 32323136-3731-4247-3831-303946353338","pos":"virNetClientProgramDispatchError:172","subcomponent":"libvirt","thread":"44", "timestamp":"2020-03-25T10:41:12.123000Z"} Is there a way to work around this please ? it comes of course from https://github.com/libvirt/libvirt/blob/master/src/qemu/qemu_migration_cooki... (not sure what version of libvirt i have but it shows the uuid so i guess this is the one) Thanks

On Thu, Mar 26, 2020 at 04:47:50PM +0200, Or Shoval wrote:
Hello
On kubevirt project we are using IpV6 Kind cluster, and trying to support migration,
but since both of the containers are on the same host we get this error
{"component":"virt-launcher","level":"error","msg":"internal error: Attempt to migrate guest to the same host 32323136-3731-4247-3831-303946353338","pos":"virNetClientProgramDispatchError:172","subcomponent":"libvirt","thread":"44", "timestamp":"2020-03-25T10:41:12.123000Z"}
Is there a way to work around this please ?
it comes of course from https://github.com/libvirt/libvirt/blob/master/src/qemu/qemu_migration_cooki...
(not sure what version of libvirt i have but it shows the uuid so i guess this is the one)
The link above points to git master, which only checks the UUID. This was released in 6.2.0 All versions of libvirt before 6.2.0, will also check the hostname for equality. Since you're inside a container you should be able to set an arbitrary hostname for each container. For the UUID, we obtain the value from SMBIOS data tables. To override this there is a parameter in /etc/libvirt/libvirtd.conf. 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 :|

Hi Daniel, thanks for the quick reply we did try to override SMBIOS host_uuid_source = "machine-id" and it didn't work even that nodes have different [root@modi01 kubevirt]# ./cluster-up/ssh.sh kind-1.17.0-worker root@kind-1:/# cat /etc/machine-id [root@modi01 kubevirt]# ./cluster-up/ssh.sh kind-1.17.0-control-plane root@kind-1:/# cat /etc/machine-id 71ebb3fc051a48b2b45345b67bb1002b Thanks On Thu, Mar 26, 2020 at 5:05 PM Daniel P. Berrangé <berrange@redhat.com> wrote:
On Thu, Mar 26, 2020 at 04:47:50PM +0200, Or Shoval wrote:
Hello
On kubevirt project we are using IpV6 Kind cluster, and trying to support migration,
but since both of the containers are on the same host we get this error
{"component":"virt-launcher","level":"error","msg":"internal error: Attempt to migrate guest to the same host
32323136-3731-4247-3831-303946353338","pos":"virNetClientProgramDispatchError:172","subcomponent":"libvirt","thread":"44",
"timestamp":"2020-03-25T10:41:12.123000Z"}
Is there a way to work around this please ?
it comes of course from
https://github.com/libvirt/libvirt/blob/master/src/qemu/qemu_migration_cooki...
(not sure what version of libvirt i have but it shows the uuid so i guess this is the one)
The link above points to git master, which only checks the UUID. This was released in 6.2.0
All versions of libvirt before 6.2.0, will also check the hostname for equality.
Since you're inside a container you should be able to set an arbitrary hostname for each container.
For the UUID, we obtain the value from SMBIOS data tables. To override this there is a parameter in /etc/libvirt/libvirtd.conf.
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 :|

On Thu, Mar 26, 2020 at 05:25:59PM +0200, Or Shoval wrote:
Hi Daniel, thanks for the quick reply
we did try to override SMBIOS host_uuid_source = "machine-id"
and it didn't work even that nodes have different
[root@modi01 kubevirt]# ./cluster-up/ssh.sh kind-1.17.0-worker root@kind-1:/# cat /etc/machine-id
This machine-id really shouldn't be empty - this may well cause issues in libvirt.
[root@modi01 kubevirt]# ./cluster-up/ssh.sh kind-1.17.0-control-plane root@kind-1:/# cat /etc/machine-id 71ebb3fc051a48b2b45345b67bb1002b
You can check what UUID libvirtd thinks it has using: $ virsh capabilities |xmllint --xpath /capabilities/host/uuid - If the UUIDs reported are different and you still get the migration error, then it is the duplicate hostname that is the problem. 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 :|

i did a mistake in the paste [root@modi01 kubevirt]# ./cluster-up/ssh.sh kind-1.17.0-worker root@kind-1:/# cat /etc/machine-id *24bfea9624e44e01a3859eb6c9ef1dad* root@kind-1:/# hostname *kind-1.17.0-worker* [root@modi01 kubevirt]# ./cluster-up/ssh.sh kind-1.17.0-control-plane root@kind-1:/# cat /etc/machine-id *71ebb3fc051a48b2b45345b67bb1002b* root@kind-1:/# hostname *kind-1.17.0-control-plane* i am trying other approach as well, i might use old libvirt or something, if more info is needed, please let me know, thanks On Thu, Mar 26, 2020 at 5:31 PM Daniel P. Berrangé <berrange@redhat.com> wrote:
On Thu, Mar 26, 2020 at 05:25:59PM +0200, Or Shoval wrote:
Hi Daniel, thanks for the quick reply
we did try to override SMBIOS host_uuid_source = "machine-id"
and it didn't work even that nodes have different
[root@modi01 kubevirt]# ./cluster-up/ssh.sh kind-1.17.0-worker root@kind-1:/# cat /etc/machine-id
This machine-id really shouldn't be empty - this may well cause issues in libvirt.
[root@modi01 kubevirt]# ./cluster-up/ssh.sh kind-1.17.0-control-plane root@kind-1:/# cat /etc/machine-id 71ebb3fc051a48b2b45345b67bb1002b
You can check what UUID libvirtd thinks it has using:
$ virsh capabilities |xmllint --xpath /capabilities/host/uuid -
If the UUIDs reported are different and you still get the migration error, then it is the duplicate hostname that is the problem.
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 :|
participants (2)
-
Daniel P. Berrangé
-
Or Shoval