Bug 818797

Summary: Cannot execute tunnelled migration from remote connection to local connection.
Product: [Community] Virtualization Tools Reporter: Geyang Kong <gkong>
Component: virt-managerAssignee: Cole Robinson <crobinso>
Status: CLOSED INSUFFICIENT_DATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: acathrow, berrange, crobinso, cwei, dallan, jwu, mjenner, mzhan, zpeng
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-01 23:05:43 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:
Attachments:
Description Flags
virt-manager-debuginfo none

Description Geyang Kong 2012-05-04 02:50:44 UTC
Description of problem:
  Cannot execute tunnelled migration from local connection to local connection.

Version-Release number of selected component (if applicable):
virt-manager-0.9.0-14.el6.x86_64
libvirt-0.9.10-16.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Prepare 2 hosts and prepare a nfs which is mounted on both hosts, and setting the virt_use_nfs boolean on both sides
   # setsebool -P virt_use_nfs 1
   and close the iptable on both sides
   # iptables -F
2. 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}
3. repeat step 2 but copy public key from target host to source host.
4. Launch virt-manager, make sure you have $remote-ip(QEMU) and localhost(QEMU) connections.
5. Make sure there is a guest on remote host, right click it and select migrate.
6. Check Tunnel migration through libvirt's daemon then click Migrate.
Actual results:
1. After step 6, migrate failed, error like below
------------------------------------------------------------------------------------------------
Unable to migrate guest: operation failed: Failed to connect to remote libvirt URI qemu+ssh://root.com/system

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 44, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/migrate.py", line 556, in _async_migrate
    vm.migrate(dstconn, migrate_uri, rate, live, secure, meter=meter)
  File "/usr/share/virt-manager/virtManager/domain.py", line 1147, in migrate
    self._backend.migrate(destconn.vmm, flags, newname, interface, rate)
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 892, in migrate
    if ret is None:raise libvirtError('virDomainMigrate() failed', dom=self)
libvirtError: operation failed: Failed to connect to remote libvirt URI qemu+ssh://root.com/system

-------------------------------------------------------------------------------------------------

Expected results:
1. Tunnelled migrate successfully.

Additional info:
1. If I connect to local host through ssh, tunnelled migrate will be OK

Comment 1 Geyang Kong 2012-05-04 02:51:20 UTC
Created attachment 582011 [details]
virt-manager-debuginfo

Comment 3 Cole Robinson 2014-02-01 23:05:43 UTC
Reporters account is closed, and anyways this seems like it was a libvirt bug. If anyone is affected, please try and see if virsh also reproduces, and file a new bug.