Bug 517548

Summary: virt-manager migration failure - destination URI, not hostname, should be passed to vm.prepare()
Product: [Fedora] Fedora Reporter: Jan Dvorak <jdvorak>
Component: virt-managerAssignee: Daniel Berrangé <berrange>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: high    
Version: 11CC: berrange, crobinso, hbrock, jdvorak, markmc, virt-maint
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: 2009-10-07 12:28:06 UTC Type: ---
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: 480594    

Description Jan Dvorak 2009-08-14 15:09:46 UTC
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en; rv:1.9.0.12) Gecko/20080528 Epiphany/2.22 (Debian/2.26.1-1)

virt-manager prevents migration of KVM guest over SSH connection with following error:

Error migrating domain: invalid argument in only tcp URIs are supported for KVM migrations

This is wrong, because I can successfully migrate manually with:

  virsh migrate --live guest qemu+ssh://host2/system

Reproducible: Always

Steps to Reproduce:
1. fire up virt-manager on a host with the guest
2. define connection to a second host using SSH
3. attempt migration of guest to the second host
Actual Results:  
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/engine.py", line 556, in migrate_domain
    vm.migrate(destconn)
  File "/usr/share/virt-manager/virtManager/domain.py", line 1357, in migrate
    self.vm.migrate(self.connection.vmm, flags, None, dictcon.get_short_hostname(), 0)
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 378, in migrate
    if ret is None:raise libvirtError('virDomainMigrate() failed', dom=self)
libvirtError: invalid argument in only tcp URIs are supported for KVM migrations

Expected Results:  
Successfull migration of the guest.

Comment 1 Mark McLoughlin 2009-08-18 13:07:33 UTC
What versions of virt-manager, libvirt and qemu-system-86 is this?

Could you include ~/.virt-manager/virt-manager.log? Also, /var/log/libvirt/qemu/$guest.log from both the source and destination hosts?

The error message is coming from the libvirt qemu driver, and it refers not to the qemu+ssh:// URI but the optional <migrateuri> which you're not passing to virsh

It looks to me like virt-manager is passing the destination hostname (i.e. not a URI) as this parameter which is totally bogus

Comment 2 Jan Dvorak 2009-08-19 10:42:03 UTC
libvirt-0.6.2-14.fc11.x86_64
virt-manager-0.7.0-5.fc11.x86_64
qemu-system-x86-0.10.5-3.fc11.x86_64
qemu-kvm-0.10.5-3.fc11.x86_64

libvirt.log contains the usual stuff + only the backtrace above, $guest.log is empty (except for the qemu-kvm... command)

It's very reproducible, you may want to try it yourself.

Comment 3 Cole Robinson 2009-08-31 14:53:06 UTC
We were invoking the migrate command incorrectly in virt-manager 0.7.0. We should just copy the migrate routine out of domain.py in current upstream and backport it to F11.

Comment 4 Fedora Update System 2009-09-18 15:44:55 UTC
virt-manager-0.7.0-6.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/virt-manager-0.7.0-6.fc11?_csrf_token=8d215225cd9b1943cd947603a037c8db9ad28548

Comment 5 Fedora Update System 2009-09-24 05:17:38 UTC
virt-manager-0.7.0-6.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update virt-manager'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-9871

Comment 6 Cole Robinson 2009-10-07 12:28:06 UTC
This should be fixed by virt-manager-0.7.0-7.fc11 now in stable. Closing.