Bug 999358 - do live migration with used VMDK format disk should fail with a friendly message prompt
do live migration with used VMDK format disk should fail with a friendly mess...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.5
Unspecified Unspecified
low Severity low
: rc
: ---
Assigned To: Fam Zheng
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-21 04:36 EDT by Sibiao Luo
Modified: 2013-11-21 02:11 EST (History)
13 users (show)

See Also:
Fixed In Version: qemu-kvm-0.12.1.2-2.409.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-21 02:11:40 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Sibiao Luo 2013-08-21 04:36:18 EDT
Description of problem:
do live migration with used VMDK format disk, it will hang in destination QEMU.
if the vmdk disk did not be used, it can complete migration successfully and the guest work well.

And i check the code that we should diable migration when VMDK images are used:
/* Disable migration when VMDK images are used */
             |    get_cluster_offset(BlockDriverState
error_set(&s->migration_blocker,

             |    get_whole_cluster(BlockDriverState *

QERR_BLOCK_FORMAT_FEATURE_NOT_SUPPORTED, 
                                                                                                                             
             |    vmdk_L2update(VmdkExtent *extent, Vm
"vmdk", bs->device_name, "live migration");
                                                                                                                                        
             |    vmdk_add_extent(BlockDriverState *bs
migrate_add_blocker(s->migration_blocker);

Version-Release number of selected component (if applicable):
host info:
2.6.32-412.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.397.el6.x86_64
guest info:
2.6.32-413.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.create a vmdk format data disk.
# qemu-img create -f vmdk vmdk-data-disk.vmdk 10G
2.boot guest with vmdk format disk in src and do some read from the vmdk disk.
e.g:...-drive file=/mnt/vmdk-data-disk.vmdk,if=none,id=drive-data-disk,format=vmdk,cache=none,werror=stop,rerror=stop,readonly=on -device virtio-blk-pci,bus=pci.0,addr=0x7,drive=drive-data-disk,id=data-disk
guest ]# while true; do dd if=/dev/vdb of=/dev/null bs=1M count=100; done
3.boot a dest with incoming mode.
<same-to-src-cli>-incoming tcp:0:5888,server,nowait
4.migration from src to dest and check it.
(qemu) migrate -d tcp:0:5888
(qemu) info migrate 
Migration status: active
total time: 4056 milliseconds
transferred ram: 116611 kbytes
remaining ram: 542516 kbytes
total ram: 2113920 kbytes
...
(qemu) info migrate 
Migration status: completed
total time: 17509 milliseconds
downtime: 61 milliseconds
transferred ram: 568835 kbytes
remaining ram: 44 kbytes
total ram: 2113920 kbytes
(qemu)

Actual results:
after step 4, it can complete migration in src, but the dest side qemu will hang, can't press anything in HMP monitor and the guest cann't work.

Expected results:
Disable migration when VMDK images are used, and do live migration with used VMDK format disk should fail with a friendly message prompt.

Additional info:
# /usr/libexec/qemu-kvm -M pc -S -cpu SandyBridge -enable-kvm -m 2048 -smp 2,sockets=2,cores=1,threads=1 -no-kvm-pit-reinjection -usb -device usb-tablet,id=input0 -name sluo -uuid 990ea161-6b67-47b2-b803-19fb01d30d30 -rtc base=localtime,clock=host,driftfix=slew -device virtio-serial-pci,id=virtio-serial0,max_ports=16,vectors=0,bus=pci.0,addr=0x3 -chardev socket,id=channel1,path=/tmp/helloworld1,server,nowait -device virtserialport,chardev=channel1,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port1 -chardev socket,id=channel2,path=/tmp/helloworld2,server,nowait -device virtserialport,chardev=channel2,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port2 -drive file=/mnt/VMwareWorkStation-RHEL-Server-6.5-64bit.qcow2,if=none,id=drive-virtio-disk,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop -device virtio-blk-pci,vectors=0,bus=pci.0,addr=0x4,scsi=off,drive=drive-virtio-disk,id=virtio-disk,bootindex=1 -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,id=virtio-net-pci0,mac=2C:41:38:B6:40:21,bus=pci.0,addr=0x5 -device virtio-balloon-pci,id=ballooning,bus=pci.0,addr=0x6 -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -drive file=/mnt/vmdk-data-disk.vmdk,if=none,id=drive-data-disk,format=vmdk,cache=none,werror=stop,rerror=stop,readonly=on -device virtio-blk-pci,bus=pci.0,addr=0x7,drive=drive-data-disk,id=data-disk -k en-us -boot menu=on -spice disable-ticketing,port=5931 -monitor stdio
Comment 1 Sibiao Luo 2013-08-21 04:42:44 EDT
(In reply to Sibiao Luo from comment #0)
> Description of problem:
> do live migration with used VMDK format disk, it will hang in destination
> QEMU.
> if the vmdk disk did not be used, it can complete migration successfully and
> the guest work well.
> 
> Actual results:
> after step 4, it can complete migration in src, but the dest side qemu will
> hang, can't press anything in HMP monitor and the guest cann't work.
> 
It can complete migration successfully sometimes indeed according my testing, and the guest work well. Anyway we have disabled migration when VMDK images are used, then do live migration with used VMDK format disk should fail with a friendly message prompt.

Best Regards,
sluo
Comment 2 Sibiao Luo 2013-08-21 22:25:03 EDT
BTW, also tried the rhel7.0 host with the same testing as comment #0 which did not hit this issue, it disable live migration with message prompt, like:

(qemu) migrate -d tcp:0:5888
migrate: Block format 'vmdk' used by device 'drive-data-disk' does not support feature 'live migration'

host info:
3.10.0-3.el7.x86_64
qemu-kvm-1.5.2-4.el7.x86_64

Best Regards,
sluo
Comment 9 Sibiao Luo 2013-10-07 23:20:48 EDT
Verify this issue on qemu-kvm-0.12.1.2-2.410.el6.x86_64 with the steps as comment#0.

host info:
# uname -r && rpm -q qemu-kvm
2.6.32-420.el6.x86_64
qemu-kvm-0.12.1.2-2.410.el6.x86_64

Steps:
the same to comment #0

Results:
fail to do migration with used vmdk disk correctly with prompt message that "Block format 'vmdk' used by device 'drive-data-disk' does not support feature 'live migration'".

e.g:...-drive file=/mnt/my-data-disk.vmdk,if=none,id=drive-data-disk,format=vmdk,cache=none,werror=stop,rerror=stop,readonly=on -device virtio-blk-pci,bus=pci.0,addr=0x7,drive=drive-data-disk,id=data-disk
(qemu) migrate -d tcp:0:5888
Block format 'vmdk' used by device 'drive-data-disk' does not support feature 'live migration'
(qemu) info migrate 
(qemu) info status 
VM status: running

Base on above, this issue has been fixe correctly, move to VERIFIED status, please correct me if any mistake.

Best Regards,
sluo
Comment 10 errata-xmlrpc 2013-11-21 02:11:40 EST
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.

http://rhn.redhat.com/errata/RHSA-2013-1553.html

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