mirror of
https://github.com/retspen/webvirtcloud.git
synced 2026-04-26 16:05:58 +03:00
[GH-ISSUE #465] Destination host emulator is different. Cannot be migrated #283
Labels
No labels
bug
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/webvirtcloud#283
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @skyshe on GitHub (Oct 14, 2021).
Original GitHub issue: https://github.com/retspen/webvirtcloud/issues/465
Hi
host1:
libvirtd -V
libvirtd (libvirt) 4.0.0
host2:
libvirtd -V
libvirtd (libvirt) 4.0.0
host1:
cat /etc/issue
Ubuntu 18.04.6 LTS \n \l
host2:
cat /etc/issue
Ubuntu 18.04.6 LTS \n \l
I installed the ubuntu 18.04 system on 2 physical hosts, and both deployed libvirtd
Host 1 deploys webvirtcloud and libvirtd, and they are used normally. Host 2 only deploys libvirtd to connect to host 1's webvirtcloud via TCP, but an error is reported when using the migration function. Destination host emulator is different. Cannot be migrated
What could be the cause of this, and what should I do?
thanks
err imges:
![Uploading 20211014183144.jpg…]()
@catborise commented on GitHub (Oct 14, 2021):
qemu-kvm version is important. libvirt version has minor effect.
run virsh version command to see difference…
@skyshe commented on GitHub (Oct 15, 2021):
What puzzles me is that they are not different。
host1:
virsh version
Compiled against library: libvirt 4.0.0
Using library: libvirt 4.0.0
Using API: QEMU 4.0.0
Running hypervisor: QEMU 2.11.1
host2:
virsh version
Compiled against library: libvirt 4.0.0
Using library: libvirt 4.0.0
Using API: QEMU 4.0.0
Running hypervisor: QEMU 2.11.1
@catborise commented on GitHub (Oct 15, 2021):
Interesting, can you please check it if it working on cli with;
virsh migrate --live --persistent --undefinesource --verbose <vm name> qemu+ssh://<user@destinationip>/system@skyshe commented on GitHub (Oct 15, 2021):
When I execute it for the first time, it prompts that the storage file does not exist. When I manually scp the storage file to host 2, it prompts an error again.
err1
virsh migrate --live --persistent --undefinesource --verbose vm1 qemu+ssh://172.16.0.2/system
error: Cannot access storage file '/kvm/vfs/vm1.qcow2' (as uid:64055, gid:114): No such file or directory
virsh migrate --live --persistent --undefinesource --verbose vm1 qemu+tcp://172.16.0.2/system
error: Cannot access storage file '/kvm/vfs/vm1.qcow2' (as uid:64055, gid:114): No such file or directory
err2
virsh migrate --live --persistent --undefinesource --verbose vm1 qemu+tcp://172.16.0.2/system
error: Unable to resolve address 'andy' service '49152': Temporary failure in name resolution
virsh migrate --live --persistent --undefinesource --verbose vm1 qemu+ssh://172.16.0.2/system
error: Unable to resolve address 'andy' service '49152': Temporary failure in name resolution
@catborise commented on GitHub (Oct 15, 2021):
first of all, check your services for libvirt daemon. It should be in listening mode. (https://askubuntu.com/questions/423425/i-cant-use-libvirt-with-listen-tcp)
It would be nice to have NFS storage to keep vm disks for migration. if you do not have it then you should look at this article(https://hgj.hu/live-migrating-a-virtual-machine-with-libvirt-without-a-shared-storage/)
@skyshe commented on GitHub (Oct 15, 2021):
First of all, thank you for your enthusiastic answer.
The libvirt daemon service of my host 2 is running. TCP connection is in listening mode。
netstat -lntp
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:6010 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:16509 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:16510 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:5900 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN -
tcp 0 0 192.168.100.1:53 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
tcp6 0 0 ::1:6010 :::* LISTEN -
tcp6 0 0 :::80 :::* LISTEN -
tcp6 0 0 240c::1:53 :::* LISTEN -
tcp6 0 0 fe80::5054:ff:fedd:4:53 :::* LISTEN -
tcp6 0 0 :::22 :::* LISTEN -
#systemctl status libvirt-bin.service
● libvirtd.service - Virtualization daemon
Loaded: loaded (/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2021-10-14 18:23:21 CST; 22h ago
Docs: man:libvirtd(8)
https://libvirt.org
Main PID: 2529 (libvirtd)
Tasks: 27 (limit: 32768)
CGroup: /system.slice/libvirtd.service
├─2089 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/NAT.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leaseshelper
├─2090 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/NAT.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leaseshelper
├─2529 /usr/sbin/libvirtd -l
└─5034 qemu-system-x86_64 -enable-kvm -name guest=vyos,debug-threads=on -S -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-1-vyos/master-key.aes -machine pc-i440fx-2.11,accel=kvm,usb=off,
#systemctl status libvirtd.service.service
Unit libvirtd.service.service could not be found.
andy@andy:~$ systemctl status libvirtd.service
● libvirtd.service - Virtualization daemon
Loaded: loaded (/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2021-10-14 18:23:21 CST; 22h ago
Docs: man:libvirtd(8)
https://libvirt.org
Main PID: 2529 (libvirtd)
Tasks: 27 (limit: 32768)
CGroup: /system.slice/libvirtd.service
├─2089 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/NAT.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leaseshelper
├─2090 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/NAT.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leaseshelper
├─2529 /usr/sbin/libvirtd -l
@skyshe commented on GitHub (Oct 15, 2021):
@skyshe commented on GitHub (Oct 15, 2021):
The current problems encountered are:
Migrate in the web console and report an error Destination host emulator is different. Cannot be migrated
Operation in cli reports an error, error: Unable to resolve address'andy' service '49152': Temporary failure in name resolution
@catborise commented on GitHub (Oct 19, 2021):
sorry for late answer. webvirtcloud is an interface, nothing more. if you cannot migrate with "virsh migrate" command, webvirtcloud cannot also.
you should fix it with libvirt configuration.
"Operation in cli reports an error, error: Unable to resolve address'andy' service '49152': Temporary failure in name resolution" there should not be any service with named andy. may be it is related with firewall: https://stackoverflow.com/questions/55396045/live-migrate-kvm-vm-failed-with-tcp-connection-in-ubuntu
@skyshe commented on GitHub (Oct 20, 2021):
Hi
First of all thank you for your reply,
Currently, two-way migration under cli is normal,
but migration under WebVirtCloud still prompts an error:(Destination host emulator is different. Cannot be migrated)
At present, WebVirtCloud reports an error during the migration operation and still can't find a solution.
host1
virsh migrate --live --persistent --verbose 5 qemu+ssh://172.16.0.2/system
Migration: [100 %]
virsh migrate --live --persistent --verbose 7 qemu+tcp://172.16.0.2/system
Migration: [100 %]
host2
virsh migrate --live --persistent --verbose 18 qemu+ssh://172.16.0.1/system
Migration: [100 %]
virsh migrate --live --persistent --verbose 17 qemu+tcp://172.16.0.1/system
Migration: [100 %]
@skyshe commented on GitHub (Dec 9, 2021):
I now use the virsh migrate command, including the use of virt-manager UI to connect to the host and the migration is normal, but the migration operation is still not possible in webvirtcloud, every time it is prompted: Destination host emulator is different. Cannot be migrated
sudo virsh migrate --live --persistent --verbose vm1.xxx.com qemu+tcp://172.16.0.1/system
Migration: [100 %]
@catborise commented on GitHub (Dec 9, 2021):
may be the problem is related with host adding method. one host added with "localhost" the other is with ip.
can you please add both hosts with IP adress, then try it again.
@skyshe commented on GitHub (Dec 10, 2021):
Currently, all TCP connections are used in WebVirtCloud.
connect qemu+tcp://172.16.0.1/system
connect qemu+tcp://172.16.0.2/system
node1:~$ virsh version
Compiled against library: libvirt 4.0.0
Using library: libvirt 4.0.0
Using API: QEMU 4.0.0
Running hypervisor: QEMU 2.11.1
node2:~$ virsh version
Compiled against library: libvirt 4.0.0
Using library: libvirt 4.0.0
Using API: QEMU 4.0.0
Running hypervisor: QEMU 2.11.1
@catborise commented on GitHub (Dec 10, 2021):
there must be a glitch we should detect:

can you please check emulator on host overview page to see if they are same on both host
@skyshe commented on GitHub (Dec 10, 2021):
The host overview page and virsh version show the same version
node1

node2

@skyshe commented on GitHub (Dec 10, 2021):
The host overview page and virsh version show the same version
node1

node2

@catborise commented on GitHub (Dec 10, 2021):
can you post also instance XML definition.
@skyshe commented on GitHub (Dec 10, 2021):
This is the xml of one of the VMs
vm.txt
xx.xx.com fb0ef64c-2c87-4175-84d7-faf31cd78b44 xx.xx.com 1048576 1048576 1 /machine hvm destroy restart restart /usr/bin/kvm-spice@catborise commented on GitHub (Dec 10, 2021):
please share with me output of
virsh capabilitiescommand. run this command on both hosts@skyshe commented on GitHub (Dec 10, 2021):
node1
1.txt
node2
2.txt
@catborise commented on GitHub (Dec 10, 2021):
attaching text file can be dangerous you can add content with code block (with three apostrophe not one `)

by the way;
i guess your problem is related with emulator difference.
what the heck is that:
<emulator>/usr/bin/kvm-spice</emulator>ubuntu kvm 2.11 package has riddiculus addings.can you please change XML manually with
<emulator>/usr/bin/kvm-spice</emulator>to<emulator>/usr/bin/qemu-system-x86_64</emulator>@skyshe commented on GitHub (Dec 10, 2021):
node1
node2
@catborise commented on GitHub (Dec 20, 2021):
@skyshe did you try migrate after changing "/usr/bin/kvm-spice" to "/usr/bin/qemu-system-x86_64"
if it is working we can work on a solution