Bug 980131

Summary: RFE: add optional [--clienturi] [<clienturi>] option to the migrate command
Product: Red Hat Enterprise Linux 7 Reporter: Jiri Denemark <jdenemar>
Component: libvirtAssignee: Jiri Denemark <jdenemar>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 7.0CC: acathrow, berrange, bsarathy, cwei, dallan, djasa, dyuan, jdenemar, marcandre.lureau, michal.skrivanek, mzhan, weizhan, ydu, zpeng
Target Milestone: rcKeywords: FutureFeature, Rebase
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-1.1.0-1.el7 Doc Type: Rebase: Bug Fixes and Enhancements
Doc Text:
Story Points: ---
Clone Of: 883936 Environment:
Last Closed: 2014-06-13 12:08:33 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: 883936    
Bug Blocks: 896690, 788977, 883504, 920719, 974510, 1061570    

Description Jiri Denemark 2013-07-01 13:30:27 UTC
+++ This bug was initially created as a clone of Bug #883936 +++

Description of problem:
currently, two uris can be given to libvirt as migrate command options: dst libvirt uri ("desturi") and where qemu listens for incoming migration (migrateuri). This is not sufficient in more complex topologies (with proxies involved) where host name/ip/port/sport as seen by libvirt may not match the one seen by the client.

remote-viewer already uses spice:// uris but the code handling them resides in spice-gtk library and uses glib functions heavily: http://cgit.freedesktop.org/spice/spice-gtk/tree/gtk/spice-session.c?id=fcbbc248a8f885f9a9a6e7c47d7aae0c1ab3cd1b#n245

Version-Release number of selected component (if applicable):
libvirt-0.10.2-10.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. misconfigure hostname on destination host (in /etc/sysconfig/hostname; reboot)
2. connect to the libvirt VM from any other host than destination host
3. migrate the VM using virsh migrate command with an option to give client correct dst host address
  
Actual results:
address can not be given, client fails to connect to dst host

Expected results:
address can be given, client connects to dst host and client console survives migration.

Additional info:
Virt "Display address override" feature depends on this RFE: http://wiki.ovirt.org/Features/Display_Address_Override

--- Additional comment from Jiri Denemark on 2013-06-18 14:14:09 UTC ---

I just sent the patches implementing the requested functionality upstream for a review (https://www.redhat.com/archives/libvir-list/2013-June/msg00695.html).

Comment 1 Jiri Denemark 2013-07-01 13:33:23 UTC
Implemented upstream as of v1.1.0-rc1-9-gd2664da:

commit d2664daf1b2c4bf091e7890ea0a7d9131598b7eb
Author: Jiri Denemark <jdenemar>
Date:   Tue Jun 18 12:17:18 2013 +0200

    qemu: Implement support for VIR_MIGRATE_PARAM_GRAPHICS_URI

Comment 4 zhe peng 2013-07-03 12:08:47 UTC
Verify with build:
libvirt-1.1.0-1.el7.x86_64

step:
1: prepare migration env.
2: use virt-viewer to open guest console.
3: on source machine run:
## virsh migrate --live spice qemu+ssh://intel-q9550-4-2.englab.nay.redhat.com/system --graphicsuri spice://intel-q9550-4-2.englab.nay.redhat.com:5900 --verbose --unsafe

migration worked well. spice client keep connection.

4: check man virsh help page.
  graphicsuri have an issue,
   migrate [--live] [--offline] [--direct] [--p2p [--tunnelled]] [--persistent] [--undefinesource] [--suspend] [--copy-storage-all]
       [--copy-storage-inc] [--change-protection] [--unsafe] [--verbose] [--compressed] [--abort-on-error] domain desturi [migrateuri]
       [graphicsuri] [dname] [--timeout seconds] [--xml file]

   should be [--graphicsuri graphicsuri]
 i will open a doc bug to track this.

Comment 5 Jiri Denemark 2013-07-04 14:44:48 UTC
When you used graphicsuri positionally, virsh took it as migrateuri as that is the first argument after desturi. You need to be explicit and use -graphicsuri URI or specify a migrateuri.

Comment 6 Ludek Smid 2014-06-13 12:08:33 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.