Bug 589989
| Summary: | RFE: support for seemless SPICE migration | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Daniel Berrangé <berrange> | ||||
| Component: | libvirt | Assignee: | Daniel Veillard <veillard> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Virtualization Bugs <virt-bugs> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | low | ||||||
| Version: | 6.0 | CC: | ajia, clalance, eblake, jialiu, llim, mkenneth, veillard, weizhan, xen-maint | ||||
| Target Milestone: | rc | Keywords: | FutureFeature | ||||
| Target Release: | --- | ||||||
| Hardware: | All | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | libvirt-0.8.1-2.el6 | Doc Type: | Enhancement | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | |||||||
| : | 620748 730753 (view as bug list) | Environment: | |||||
| Last Closed: | 2010-11-10 21:05:25 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: | 620748, 730753 | ||||||
| Attachments: |
|
||||||
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux major release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Major release. This request is not yet committed for inclusion. libvirt-0.8.1-2.el6 has been built in RHEL-6-candidate with the patch Daniel FYI the v1 patch for this RFE was found to contain a bug in PEER2PEER migration as per https://bugzilla.redhat.com/show_bug.cgi?id=591551 I test with the following steps:
1. #iptables -F
#setenforce 0
and connect the remote connection 10.66.93.195 and set nfs on both side
2. define spice.xml like this
<domain type='kvm'>
<name>spice</name>
<uuid>6bd72aef-3661-8400-ab2c-c15c935cdd85</uuid>
<memory>524288</memory>
<currentMemory>524288</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='x86_64' machine='rhel6.0.0'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='raw' cache='none'/>
<source file='/var/lib/libvirt/images/netfs/RHEL55-i386.img'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' unit='0'/>
</disk>
<controller type='ide' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<interface type='network'>
<mac address='52:54:00:aa:da:4e'/>
<source network='default'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</interface>
<serial type='pty'>
<target port='0'/>
</serial>
<console type='pty'>
<target port='0'/>
</console>
<input type='mouse' bus='ps2'/>
<graphics type='spice' port='5900' tlsPort='5901' autoport='yes' keymap='en-us'/>
<sound model='ac97'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</sound>
<video>
<model type='cirrus' vram='9216' heads='1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</video>
</devices>
</domain>
3. #virsh define spice.xml
4. #virsh start spice
5. #/usr/libexec/spicec -h 127.0.0.1 -p 5900
6. #virsh migrate --live test-mig qemu+ssh://10.66.93.195/system
an error occured when doing migration: the spicec is stoped and the domain spice is destoried
pop-up information:
Unable to migrate guest:
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/migrate.py", line 457, in _async_migrate
vm.migrate(dstconn, migrate_uri, rate, live, secure)
File "/usr/share/virt-manager/virtManager/domain.py", line 1387, in migrate
self._backend.migrate(destconn.vmm, flags, newname, interface, rate)
File "/usr/lib64/python2.6/site-packages/libvirt.py", line 511, in migrate
if ret is None:raise libvirtError('virDomainMigrate() failed', dom=self)
libvirtError: cannot send monitor command '{"execute":"query-migrate"}': Connection reset by peer
on /var/log/messages
Jul 22 21:08:01 dhcp-66-92-126 abrt[3955]: saved core dump of pid 3512 (/usr/libexec/qemu-kvm) to /var/spool/abrt/ccpp-1279804074-3512.new/coredump (625086464 bytes)
Jul 22 21:08:01 dhcp-66-92-126 abrtd: Directory 'ccpp-1279804074-3512' creation detected
Jul 22 21:08:01 dhcp-66-92-126 abrtd: Size of '/var/spool/abrt' >= 1000 MB, deleting 'ccpp-1279803344-18292'
Jul 22 21:08:01 dhcp-66-92-126 libvirtd: 21:08:01.286: error : qemuMonitorJSONCommandWithFd:242 : cannot send monitor command '{"execute":"query-migrate"}': Connection reset by peer
Jul 22 21:08:01 dhcp-66-92-126 avahi-daemon[1633]: Withdrawing address record for fe80::94dc:7aff:fe17:9fbc on vnet0.
Jul 22 21:08:01 dhcp-66-92-126 kernel: virbr0: port 1(vnet0) entering disabled state
Jul 22 21:08:01 dhcp-66-92-126 kernel: device vnet0 left promiscuous mode
Jul 22 21:08:01 dhcp-66-92-126 kernel: virbr0: port 1(vnet0) entering disabled state
Jul 22 21:08:01 dhcp-66-92-126 abrtd: New crash /var/spool/abrt/ccpp-1279804074-3512, processing
on /var/log/libvirt/qemu/spice.log
spice_server_migrate_start:
handle_dev_input: stop
qemu-kvm: migration.c:295: migrate_fd_cleanup: Assertion `s->state != 2' failed.
Please provide the libvirt guest XML and the /var/log/libvirt/qemu/$GUEST.log file. QEMU crashing doesn't sound like it'll be a bug in libvirt's seemless SPICE migration though. Created attachment 433694 [details]
spice migration
when migration, it occured . Look at the warning.
The MaxCrashReportSize in my system is 1000
following the comment 7 [root@dhcp-66-92-126 images]# rpm -qa libvirt libvirt-0.8.1-15.el6.x86_64 [root@dhcp-66-92-126 images]# uname -r 2.6.32-44.2.el6.x86_64 [root@dhcp-66-92-126 images]# rpm -qa qemu-kvm qemu-kvm-0.12.1.2-2.97.el6.x86_64 [root@dhcp-66-92-126 images]# rpm -qa spice-client spice-client-0.4.2-15.el6.x86_64 Since this looks like a bug in qemu, I'm going to clone this over to qemu and set this back to ON_QA (but note that we may not be able to VERIFY it before we figure out the qemu problem). Chris Lalancette I test it again with steps of comment 7 and after migration, the spice client disconnected with WARN: [root@dhcp-66-92-126 images]# /usr/libexec/spicec -h 127.0.0.1 -p 5902 WARN : [12952:12954] RedChannel::run: cannot resolve host address dhcp-93-195.nay.redhat.com This does not look like a problem with libvirt impl of SPICE migration. The warning message shows you have a missing configuration with spicec being unable to resolve the hostname. But I have already connected before migration an no problem. After migration, it stopped That problem should be reported against the spice client, not libvirt. Verified this defect with libvirt-0.8.1-23.el6.x86_64, and PASSED. libvirt-0.8.1-23.el6.x86_64 qemu-kvm-0.12.1.2-2.109.el6.x86_64 kernel-2.6.32-63.el6.x86_64 spice-client-0.4.2-18.el6.x86_64 1. Define a domain with spice graphic. ... <graphics type='spice' port='5900' tlsPort='5901' autoport='yes' keymap='en-us'/> ... 2. Edit the following line in /etc/libvirt/qemu.conf: from: # spice_listen = "0.0.0.0" to spice_listen = "0.0.0.0" 3. Restart libvirtd service 4. Start the domain on source host (10.66.93.84) # virsh start spice 5. Use spice client to connect the domain on source host. # /usr/libexec/spicec -h 10.66.93.84 -p 5900 6. Migrate the domain to destination host (10.66.92.185) # virsh migrate --live spice qemu+ssh://10.66.92.185/system 7. Check the spice client on the source host during migration. Found that the spice client remains connected & active throughout migration & after completion. So this bug is fixed. BTW, about the warning in comment 13: # /usr/libexec/spicec -h 127.0.0.1 -p 5902 WARN : [12952:12954] RedChannel::run: cannot resolve host address dhcp-93-195.nay.redhat.com It is because the destination host name - dhcp-93-195.nay.redhat.com, can not be resolved. I guess need add a entry in /etc/hosts on source host, such as: 10.66.93.195 dhcp-93-195.nay.redhat.com Red Hat Enterprise Linux 6.0 is now available and should resolve the problem described in this bug report. This report is therefore being closed with a resolution of CURRENTRELEASE. You may reopen this bug report if the solution does not work for you. |
Description of problem: SPICE supports seemless reconnect of clients after migration of a guest. This is done by issing the following command on the src QEMU before migration starts __com.redhat_spice_migrate_info hostname port tls-port cert-subject libvirt needs to support this feature. Version-Release number of selected component (if applicable): libvirt-0.8.1 How reproducible: Always Steps to Reproduce: 1. Launch a guest using SPICE graphics, eg <graphics type='spice' port='5900' tlsPort='5901' autoport='yes' keymap='en-us'/> 2. Connect using spicec client app 3. Trigger migration fo the guest to another host Actual results: The spice client disconnects after migration Expected results: The spice client remains connected & active throughout migration & after completion Additional info: