Red Hat Bugzilla – Bug 1495474
Fail to quit source qemu when do live migration after mirroring guest to NBD server [rhel-7.4.z]
Last modified: 2018-06-29 07:28:01 EDT
This bug has been copied from bug #1482478 and has been proposed to be backported to 7.4 z-stream (EUS).
Moving to POST. https://post-office.corp.redhat.com/archives/rhvirt-patches/2017-September/msg00758.html
Fix included in qemu-kvm-rhev-2.9.0-16.el7_4.9
Bug is verified pass for qemu-kvm-rhev-2.9.0-16.el7_4.9 Steps for verification: 1. boot guest on src #!/bin/bash /usr/libexec/qemu-kvm \ -name guest=test-virt \ -machine pc,usb=off,vmport=off,dump-guest-core=off \ -cpu SandyBridge \ -m 2G \ -smp 4,sockets=4,cores=1,threads=1 \ -boot strict=on \ -drive file=/home/test/nbd01/test.qcow2,if=none,cache=none,snapshot=off,format=qcow2,id=img0 \ -device virtio-blk-pci,bus=pci.0,addr=0x7,drive=img0,id=virtio-disk0,bootindex=1 \ -netdev tap,id=hostnet0,vhost=on \ -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:12:b3:20:61,bus=pci.0,addr=0x3 \ -device VGA \ -usbdevice tablet \ -vnc :1 \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x8 \ -monitor stdio \ -qmp tcp:0:4444,server,nowait 2. create dest mirror image # qemu-img create -f qcow2 mirror1.qcow2 20G 3. start dest guest and setup as NBD server #!/bin/bash /usr/libexec/qemu-kvm \ -name guest=test-virt \ -machine pc,accel=kvm,usb=off,vmport=off,dump-guest-core=off \ -cpu SandyBridge \ -m 2G \ -smp 4,sockets=4,cores=1,threads=1 \ -boot strict=on \ -drive file=/home/test/nbd01/mirror1.qcow2,if=none,cache=none,snapshot=off,format=qcow2,id=img0 \ -device virtio-blk-pci,bus=pci.0,addr=0x7,drive=img0,id=virtio-disk0,bootindex=1 \ -netdev tap,id=hostnet0,vhost=on \ -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:12:b3:20:61,bus=pci.0,addr=0x3 \ -device VGA \ -usbdevice tablet \ -vnc :3 \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x8 \ -monitor stdio \ -qmp tcp:0:5555,server,nowait \ -incoming tcp:0:6666 { "execute": "qmp_capabilities" } { "execute": "nbd-server-start", "arguments": { "addr": { "type": "inet", "data": { "host": "127.0.0.1", "port": "9999" } } } } { "execute": "nbd-server-add", "arguments": { "device": "img0", "writable": true } } 4. invoke drive-mirror on src to dest { "execute": "qmp_capabilities" } { "execute": "drive-mirror", "arguments": { "device": "img0", "target": "nbd://127.0.0.1:9999/img0", "sync": "full", "format": "raw", "mode": "existing" } } 5. reopen src to mirror when block mirror is ready {"execute": "block-job-complete", "arguments": { "device": "img0"} } 6. invoke migration on src (qemu) migrate -d tcp:0:6666 7. invoke nbd-server-stop when migration completes, and cont to start guest on dest { "execute" : "nbd-server-stop", "arguments" : {} } (qemu) cont After, the guest could run on dest. Both src and dest qemu could quit normally.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2017:3369