RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1320904 - RFE: Implement migration support with client fd
Summary: RFE: Implement migration support with client fd
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: spice-gtk
Version: 8.1
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: 8.1
Assignee: Default Assignee for SPICE Bugs
QA Contact: SPICE QE bug list
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-24 09:47 UTC by Fangge Jin
Modified: 2019-11-25 08:08 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-25 08:08:06 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
libvirtd log on both host and virt-viewer log (965.69 KB, application/x-gzip)
2016-03-24 09:47 UTC, Fangge Jin
no flags Details
Debug log of virt-viewer (37.45 KB, text/plain)
2016-07-01 05:50 UTC, Fangge Jin
no flags Details

Description Fangge Jin 2016-03-24 09:47:53 UTC
Created attachment 1139880 [details]
libvirtd log on both host and virt-viewer log

Description of problem:
Spice migration can't finish when running virt-viewer on a host other than the source host.

Version-Release number of selected component (if applicable):
libvirt-1.3.2-1.el7.x86_64
qemu-kvm-rhev-2.5.0-3.el7.x86_64
spice-gtk3-0.26-7.el7.x86_64
spice-gtk-python-0.26-7.el7.x86_64
spice-server-0.12.4-15.el7.x86_64
spice-gtk-0.26-7.el7.x86_64
spice-vdagent-0.14.0-10.el7.x86_64
spice-server-devel-0.12.4-15.el7.x86_64
spice-protocol-0.12.6-2.el7.noarch
spice-glib-0.26-7.el7.x86_64
virt-viewer-2.0-7.el7.x86_64

How reproducible:
90%

Steps to Reproduce:
0.
On host 10.66.6.200, start a guest with spice graphic
# virsh start rhel7.2

# virsh dumpxml rhel7.2
    <graphics type='spice' port='5900' autoport='yes' listen='0.0.0.0'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>

1. 
On host 10.66.7.0:
# ssh-keygen
# ssh-copy-id 10.66.6.200
# ssh-copy-id 10.66.83.38
# virt-viewer -c qemu+ssh://10.66.6.200/system rhel7.2 --debug --spice-debug

2.
# virsh migrate rhel7.2 qemu+ssh://intel-q9550-4-2.englab.nay.redhat.com/system --live --verboseMigration: [100 %]

The memory has been migrated completely, but after a long time(more than 10mins), spice migration still doesn't finish, virsh command can't exit.


3. On target host
# virsh list
 Id    Name                           State
----------------------------------------------------
 7     rhel7.2                        running

4. On source host
# virsh list
 Id    Name                           State
----------------------------------------------------
 30    rhel7.2                        paused


5.On host 10.66.7.0, check socket connection, virt-viewer still connects to source host:
# netstat -tunap|grep ssh       
tcp        0      0 10.66.7.0:44457         10.66.6.200:22          ESTABLISHED 9183/ssh                      
tcp        0      0 10.66.7.0:44453         10.66.6.200:22          ESTABLISHED 9179/ssh            
tcp        0      0 10.66.7.0:44454         10.66.6.200:22          ESTABLISHED 9181/ssh            
tcp        0      0 10.66.7.0:44456         10.66.6.200:22          ESTABLISHED 9182/ssh            
tcp        0      0 10.66.7.0:44455         10.66.6.200:22          ESTABLISHED 9180/ssh            
tcp        0      0 10.66.7.0:44452         10.66.6.200:22          ESTABLISHED 9178/ssh            
tcp        0      0 10.66.7.0:44451         10.66.6.200:22          ESTABLISHED 9177/ssh    


6.Close virt-viewer connection, "virsh migrate" still doesn't exit.


Actual results:
Spice migration can' finish

Expected results:
Spice migration can finish

Additional info:
1. If run virt-viewer on source host(# virt-viewer rhel7.2), there is no such issue.
2. Run remote-viewer on host 10.66.7.0,there is no such issue.
3. If graphic type is vnc, "virsh migrate" can exit, but when I click inside the virt-viewer graphic, virt-viewer exits immediately.

Comment 2 Pavel Grunt 2016-06-30 15:09:56 UTC
Hi, is anything going on in the guest (like playing video) ?

May I ask you to retest it - there was a rebase of spice-gtk which contained migration related fixes (the latest version of spice-gtk is spice-gtk-0.31-3.el7).

Thanks

Comment 3 Fangge Jin 2016-07-01 05:49:17 UTC
I test again on the latest build, the behaviour is that virt-viwer process (launched by "virt-viewer -c qemu+ssh://<ip>/system <domain>") exits after migration.

Versions:
libvirt-1.3.5-1.el7.x86_64
spice-server-0.12.4-17.el7.x86_64
spice-protocol-0.12.11-1.el7.noarch
spice-gtk3-0.31-3.el7.x86_64
spice-gtk-0.31-3.el7.x86_64
spice-glib-0.31-3.el7.x86_64
virt-viewer-2.0-9.el7.x86_64

Steps:
1.Start guest with spice graphic and connect to guest via virt-viewer on another host:
# virt-viewer -c qemu+ssh://10.73.196.163/system rhel7 --debug --spice-debug

2.Do migration:
# virsh migrate rhel7 qemu+ssh://hp-dl385g7-05.lab.eng.pek2.redhat.com/system --live --verbose
Migration:[100%]

3.Check virt-viewer, it exits. The whole debug log is in the attached.

Additional info:
1) remote-viewer has no such problem
2) virt-viewer with option --direct has no such problem

Comment 4 Fangge Jin 2016-07-01 05:50:00 UTC
Created attachment 1174811 [details]
Debug log of virt-viewer

Comment 5 Pavel Grunt 2016-07-01 07:15:55 UTC
Thank you!

As stated in the logs:
(virt-viewer:12071): GSpice-WARNING **: migration with client provided fd is not supported yet

That is the reason why remote-viewer works (it doesn't connect to fd, but to the port)

(In reply to JinFangge from comment #3)
> I test again on the latest build, the behaviour is that virt-viwer process
> (launched by "virt-viewer -c qemu+ssh://<ip>/system <domain>") exits after
> migration.
> 
> Versions:
> libvirt-1.3.5-1.el7.x86_64
> spice-server-0.12.4-17.el7.x86_64
> spice-protocol-0.12.11-1.el7.noarch
> spice-gtk3-0.31-3.el7.x86_64
> spice-gtk-0.31-3.el7.x86_64
> spice-glib-0.31-3.el7.x86_64
> virt-viewer-2.0-9.el7.x86_64
> 
> Steps:
> 1.Start guest with spice graphic and connect to guest via virt-viewer on
> another host:
> # virt-viewer -c qemu+ssh://10.73.196.163/system rhel7 --debug --spice-debug

please, avoid running virt-viewer under the root superuser if possible

> 
> 2.Do migration:
> # virsh migrate rhel7
> qemu+ssh://hp-dl385g7-05.lab.eng.pek2.redhat.com/system --live --verbose
> Migration:[100%]
> 
> 3.Check virt-viewer, it exits. The whole debug log is in the attached.
> 
> Additional info:
> 1) remote-viewer has no such problem
> 2) virt-viewer with option --direct has no such problem

Do they work as expected according to the comment 1 - `remote-viewer` / `virt-viewer --direct` running on another host ?

Comment 6 Fangge Jin 2016-07-01 07:27:34 UTC
(In reply to Pavel Grunt from comment #5)
> Thank you!
> 
> As stated in the logs:
> (virt-viewer:12071): GSpice-WARNING **: migration with client provided fd is
> not supported yet
> 
> That is the reason why remote-viewer works (it doesn't connect to fd, but to
> the port)
> 
> (In reply to JinFangge from comment #3)
> > I test again on the latest build, the behaviour is that virt-viwer process
> > (launched by "virt-viewer -c qemu+ssh://<ip>/system <domain>") exits after
> > migration.
> > 
> > Versions:
> > libvirt-1.3.5-1.el7.x86_64
> > spice-server-0.12.4-17.el7.x86_64
> > spice-protocol-0.12.11-1.el7.noarch
> > spice-gtk3-0.31-3.el7.x86_64
> > spice-gtk-0.31-3.el7.x86_64
> > spice-glib-0.31-3.el7.x86_64
> > virt-viewer-2.0-9.el7.x86_64
> > 
> > Steps:
> > 1.Start guest with spice graphic and connect to guest via virt-viewer on
> > another host:
> > # virt-viewer -c qemu+ssh://10.73.196.163/system rhel7 --debug --spice-debug
> 
> please, avoid running virt-viewer under the root superuser if possible
Why ?
> 
> > 
> > 2.Do migration:
> > # virsh migrate rhel7
> > qemu+ssh://hp-dl385g7-05.lab.eng.pek2.redhat.com/system --live --verbose
> > Migration:[100%]
> > 
> > 3.Check virt-viewer, it exits. The whole debug log is in the attached.
> > 
> > Additional info:
> > 1) remote-viewer has no such problem
> > 2) virt-viewer with option --direct has no such problem
> 
> Do they work as expected according to the comment 1 - `remote-viewer` /
> `virt-viewer --direct` running on another host ?

Yes, `remote-viewer` / `virt-viewer --direct` running on another host work as expected: spice migration finishes successfully.

Comment 7 Pavel Grunt 2016-07-01 08:05:12 UTC
(In reply to JinFangge from comment #6)
> (In reply to Pavel Grunt from comment #5)
....
> > > 
> > > Steps:
> > > 1.Start guest with spice graphic and connect to guest via virt-viewer on
> > > another host:
> > > # virt-viewer -c qemu+ssh://10.73.196.163/system rhel7 --debug --spice-debug
> > 
> > please, avoid running virt-viewer under the root superuser if possible
> Why ?
It is not related to this bug, but I believe it is not a common usage and it is graphical application, we had issues (not working audio, strange resizes of the window...) because it was run under the root.

"$ virt-viewer -c qemu+ssh://10.73.196.163/system rhel7" should work without issues. 
> > 
> > > 
...
> > > 
> > > Additional info:
> > > 1) remote-viewer has no such problem
> > > 2) virt-viewer with option --direct has no such problem
> > 
> > Do they work as expected according to the comment 1 - `remote-viewer` /
> > `virt-viewer --direct` running on another host ?
> 
> Yes, `remote-viewer` / `virt-viewer --direct` running on another host work
> as expected: spice migration finishes successfully.

Thanks, so this bug is about implementing a new feature to support migration with client fd
  
Considering that there is a way to connect after the migration / keep connected during the migration, I move the bug to 7.4

Comment 8 Martin Tessun 2019-11-25 08:08:06 UTC
The workaround is to reopen the SPICE connection after the migration finishes. It cannot easily survive, as it connects to the host anyways. As such closing this RFE.


Note You need to log in before you can comment on or make changes to this bug.