| Summary: | Fail to migrate while the size of migrate-compcache less then 4096 | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | zhenfeng wang <zhwang> |
| Component: | qemu-kvm | Assignee: | Hai Huang <hhuang> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.0 | CC: | acathrow, ajia, dyuan, gsun, hhuang, jdenemar, juli, juzhang, michen, mzhan, qzhang, virt-maint, zpeng |
| Target Milestone: | rc | Keywords: | Reopened |
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | qemu-kvm-1.5.3-47.el7 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-06-13 10:12:24 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: | |
|
Description
zhenfeng wang
2013-10-09 09:14:38 UTC
Libvirt just calls migrate-set-cache-size with the value provided by a user and QEMU is doing any rounding on that value. It looks like it just doesn't do a good job when the requested size is lower than 4KiB. *** Bug 1006843 has been marked as a duplicate of this bug. *** *** This bug has been marked as a duplicate of bug 1006843 *** Fix included in qemu-kvm-1.5.3-47.el7 Reproduced the issue on qemu-kvm-1.5.3-46.el7.x86_64 and verified pass on qemu-kvm-1.5.3-48.el7.x86_64.
On the old version qemu-kvm-1.5.3-46.el7.x86_64:
1. Boot up a guest on source host.
(gdb) r -cpu SandyBridge -M pc -enable-kvm -m 2048 -smp 2,sockets=2,cores=1,threads=1 -name rhel6.4-64 -uuid 9a0e67ec-f286-d8e7-0548-0c1c9ec93009 -nodefconfig -nodefaults -monitor stdio -rtc base=utc,clock=host,driftfix=slew -no-kvm-pit-reinjection -no-shutdown -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x7 -drive file=/mnt/RHEL-Server-7.0-64-virtio.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,cache=none -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -drive if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev tap,id=hostnet0,vhost=on -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:d5:51:8a,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev socket,id=channel1,path=/tmp/helloworld1,server,nowait -device virtserialport,chardev=channel1,name=port1,bus=virtio-serial0.0,id=port1 -chardev socket,id=channel2,path=/tmp/helloworld2,server,nowait -device virtserialport,chardev=channel2,name=port2,bus=virtio-serial0.0,id=port2 -chardev spicevmc,id=charchannel0,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=3,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 -vnc :10 -vga std -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6 -qmp tcp:0:5555,server,nowait -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0
2. Boot the guest on destination host with "-incoming tcp:0:5800"
3. Enable xbzrle and set the cache size less than 4096, eg: 4095 byte. And then migrate guest to destination host.
{"QMP": {"version": {"qemu": {"micro": 3, "minor": 5, "major": 1}, "package": " (qemu-kvm-1.5.3-46.el7)"}, "capabilities": []}}
{"execute":"qmp_capabilities"}
{"return": {}}
{"execute":"migrate-set-capabilities","arguments":{"capabilities":[{"state": true, "capability": "xbzrle"}]}}
{"return": {}}
{"execute":"migrate-set-cache-size","arguments":{"value":4095}}
{"return": {}}
{"execute": "migrate","arguments":{"uri": "tcp:10.66.4.108:5800"}}
{"return": {}}
{"execute":"query-migrate"}
{"return": {"status": "failed"}}
4. Repeat step 1-3 but with 4096 bytes cache size, this time migration could be finished.
{"QMP": {"version": {"qemu": {"micro": 3, "minor": 5, "major": 1}, "package": " (qemu-kvm-1.5.3-46.el7)"}, "capabilities": []}}
{"execute":"qmp_capabilities"}
{"return": {}}
{"execute":"migrate-set-capabilities","arguments":{"capabilities":[{"state": true, "capability": "xbzrle"}]}}
{"return": {}}
{"execute":"migrate-set-cache-size","arguments":{"value":4096}}
{"return": {}}
{"execute": "migrate","arguments":{"uri": "tcp:10.66.4.108:5800"}}
{"return": {}}
{"execute":"query-migrate"}
{"return": {"expected-downtime": 30, "xbzrle-cache": {"bytes": 0, "cache-size": 4096, "pages": 0, "overflow": 0, "cache-miss": 0}, "status": "active", "setup-time": 2, "total-time": 5288, "ram": {"total": 4312489984, "remaining": 208711680, "mbps": 268.5668, "transferred": 177928098, "duplicate": 960651, "dirty-pages-rate": 0, "skipped": 0, "normal-bytes": 168951808, "normal": 41248}}}
{"timestamp": {"seconds": 1392797305, "microseconds": 828894}, "event": "STOP"}
{"execute":"query-migrate"}
{"return": {"xbzrle-cache": {"bytes": 0, "cache-size": 4096, "pages": 0, "overflow": 0, "cache-miss": 10}, "status": "completed", "setup-time": 2, "downtime": 72, "total-time": 10381, "ram": {"total": 4312489984, "remaining": 0, "mbps": 268.62512, "transferred": 346380624, "duplicate": 970592, "dirty-pages-rate": 0, "skipped": 0, "normal-bytes": 336986112, "normal": 82272}}}
================
Verified pass on qemu-kvm-1.5.3-48.el7.x86_64, cache size < 4096 bytes is not allowed to be set.
{"QMP": {"version": {"qemu": {"micro": 3, "minor": 5, "major": 1}, "package": " (qemu-kvm-1.5.3-48.el7)"}, "capabilities": []}}
{"execute":"qmp_capabilities"}
{"return": {}}
{"execute":"migrate-set-capabilities","arguments":{"capabilities":[{"state": true, "capability": "xbzrle"}]}}
{"return": {}}
{"execute":"migrate-set-cache-size","arguments":{"value":4095}}
{"error": {"class": "GenericError", "desc": "Parameter 'cache size' expects is smaller than page size"}}
Re-set cache size to larger than 4095 and re-migrate, succeed.
So this bug is fixed.
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. |