Bug 1456185
| Summary: | Failed to do Tunnelled migration via virt-manager | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | zhoujunqin <juzhou> | ||||||
| Component: | virt-manager | Assignee: | Pavel Hrdina <phrdina> | ||||||
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | ||||||
| Severity: | medium | Docs Contact: | |||||||
| Priority: | medium | ||||||||
| Version: | 7.4 | CC: | jyundt, kuwei, mxie, phrdina, tzheng, xiaodwan | ||||||
| Target Milestone: | rc | ||||||||
| Target Release: | --- | ||||||||
| Hardware: | x86_64 | ||||||||
| OS: | Unspecified | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | virt-manager-1.4.3-2.el7 | Doc Type: | If docs needed, set a value | ||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2018-04-10 11:40:46 UTC | Type: | Bug | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Embargoed: | |||||||||
| Bug Depends On: | |||||||||
| Bug Blocks: | 1473046 | ||||||||
| Attachments: |
|
||||||||
Upstream patch posted: https://www.redhat.com/archives/virt-tools-list/2017-September/msg00034.html Upstream commit:
commit abcff9e230bd00be91bdf0cef1da94f6e2ce709d
Author: Pavel Hrdina <phrdina>
Date: Wed Sep 6 09:19:36 2017 +0200
domain: use migrateToURI3() for tunneled migration
Try to verify this bug with new build:
virt-manager-1.4.3-1.el7.noarch
Steps as Description.
After 3. Right click guest and select migrate, select new host with dest ip, set mode as "Tunnelled", then click "Migrate"
Migration failed with error:
Unable to migrate guest: argument unsupported: migration URI is not supported by tunnelled migration
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 89, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/migrate.py", line 434, in _async_migrate
meter=meter)
File "/usr/share/virt-manager/virtManager/domain.py", line 1603, in migrate
self._backend.migrateToURI3(dest_uri, params, flags)
File "/usr/lib64/python2.7/site-packages/libvirt.py", line 1739, in migrateToURI3
if ret == -1: raise libvirtError ('virDomainMigrateToURI3() failed', dom=self)
libvirtError: argument unsupported: migration URI is not supported by tunnelled migration
So i move this bug from ON_QA to ASSIGNED, thanks.
Upstream commit:
commit 3b769643657f906dc2b53c568d7fe748155d9b2b
Author: Pavel Hrdina <phrdina>
Date: Tue Oct 3 12:24:39 2017 +0200
domain: don't add URI into params for tunneled migration
Try to verify this bug with new build:
virt-manager-1.4.3-2.el7.noarch
Steps:
Tunnelled migration environment setup:
a. Prepare 3 hosts and a nfs server (eg. 10.73.194.27:/vol/S3/libvirtmanual).
HostA: migration server
HostB: migration source
HostC: migration target
Then mount the nfs server on HostB and HostC, note the mount path should be same.
b.set the virt_use_nfs boolean and no need stop firewalld service on HostB and HostC
# setsebool -P virt_use_nfs 1
# service firewalld status
...
Active: active (running)
...
c. Add each other's ip and hostname in /etc/hosts to make they can ping each other by hostname successfully.
d. Create a new guest in HostB by import existing disk image, choose the shared image in the new added nfs storage .
e. Dispatch ssh public key of HostB to HostC.
Creating HostB public key pair
# ssh-keygen -t rsa
Copying the public key to HostC
# ssh-copy-id -i ~/.ssh/id_rsa.pub root@{target ip}
Steps:
1. Launch virt-manager on HostA.
# virt-manager
2. Add to remote connection with HostB and HostC
Click File->Add Connection, choose QEMU/KVM on Hypervisor, choose SSH on
Method, and write down the IP of HostB(HostC), then click Connect.
3. Right click guest on HostB connection and right click, then select migrate, select new host with HostC ip, set mode as "Tunnelled", then click "Migrate".
Result:
After a while of step3, tunnel migration through HostB to HostC finished successfully, after migration window closed, the migrated guest on HostB disappeared, and running on the HostC, it is as expected.
But @Pavel, I found another question, the description for Direct migration now is same with Tunnel migration, is it a new bug, please help have a look.
I will attach the screenshot for this, thanks.
Created attachment 1358486 [details]
description for direct migration
The description is not based on the selected mode, it's a tooltip for the mode in general, but I agree that it could be improved. Can you create a separata bug for that? Thanks. (In reply to Pavel Hrdina from comment #11) > The description is not based on the selected mode, it's a tooltip for the > mode in general, but I agree that it could be improved. Can you create a > separated bug for that? Thanks. Thanks for your reply, file a separated Bug 1517534, and since bug itself has been fixed, move this bug from ON_QA to VERIFIED. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2018:0726 |
Created attachment 1282899 [details] virt-manager debug log while dor migration Description of problem: Failed to do Tunnelled migration via virt-manager Version-Release number of selected component (if applicable): virt-manager-1.4.1-5.el7.noarch libvirt-3.2.0-6.el7.x86_64 libvirt-python-3.2.0-2.el7.x86_64 qemu-kvm-rhev-2.9.0-6.el7.x86_64 How reproducible: 100% Steps to Reproduce: Tunnelled migration environment setup: a. Prepare 2 hosts and prepare a nfs server (eg. 10.73.194.27:/vol/S3/libvirtmanual) which is mounted on both hosts,Note that the storage on the destination host should have the same path and same name as the source host b.setting the virt_use_nfs boolean and close the iptables on both sides # setsebool -P virt_use_nfs 1 # iptables -F c. Add each other's ip and hostname in /etc/hosts to make sure both the source and dest host can ping each other by hostname successfully. d. Create a new guest in local host by import existing disk image, choose the shared image in the new added nfs storage . e. Dispatch ssh public key of source host to target host. Creating your local public key pair # ssh-keygen -t rsa Copying the public key to remote host # ssh-copy-id -i ~/.ssh/id_rsa.pub root@{target ip} Steps: 1. Launch virt-manager # virt-manager 2. Click File->Add Connection, choose QEMU/KVM on Hypervisor, choose SSH on Method, and write down the hostname of target host, then click Connect 3. Right click guest and select migrate, select new host with dest ip, set mode as "Tunnelled", then click "Migrate" Actual results: Tunnelled migration failed with error: Unable to migrate guest: use virDomainMigrateToURI3 for peer-to-peer migration Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/asyncjob.py", line 88, in cb_wrapper callback(asyncjob, *args, **kwargs) File "/usr/share/virt-manager/virtManager/migrate.py", line 438, in _async_migrate meter=meter) File "/usr/share/virt-manager/virtManager/domain.py", line 1585, in migrate self._backend.migrate3(libvirt_destconn, params, flags) File "/usr/lib64/python2.7/site-packages/libvirt.py", line 1519, in migrate3 if ret is None:raise libvirtError('virDomainMigrate3() failed', dom=self) libvirtError: use virDomainMigrateToURI3 for peer-to-peer migration Expected results: Do tunnelled migration successfully. Additional info: 1. Do migration with virsh command with --p2p and --tunnelled option: # virsh migrate --live rhel6.9nfs qemu+ssh://10.73.130.49/system --verbose --p2p --tunnelled Migration: [100 %]