Bug 1022393 - Disable live-storage-migration in virsh (migrate -b/-i in qemu) - libvirt support
Disable live-storage-migration in virsh (migrate -b/-i in qemu) - libvirt sup...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt (Show other bugs)
7.0
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Michal Privoznik
Virtualization Bugs
:
Depends On: 1022392
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-23 04:17 EDT by Ademar Reis
Modified: 2014-06-17 20:57 EDT (History)
15 users (show)

See Also:
Fixed In Version: libvirt-1.1.1-12.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1020495
Environment:
Last Closed: 2014-06-13 08:21:11 EDT
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)
Comment 3 Michal Privoznik 2013-11-07 04:44:17 EST
Just to make clear how is libvirt acting on migration with non-shared storage (just 'migration' hereafter). On migration request, the source checks for 'nbd-server-start' command (*) and advertises this fact to the destination libvirt. If the destination libvirt sees that the source knows NBD migration, it checks for the very same command, and adds all non-shared disks to the migration queue (via 'nbd-server-add'). If the command is not present, the old way of migration is assumed. The presence and successfulness of all nbd-server-* commands is then advertised back to the destination, which then just start 'drive-mirror' to all non-shared disks. Then, the source libvirt waits for storage migration to settle down after which the actual migration of RAM & internal state is started.

In case any of source or destination doesn't support 'nbd-server-start' the old way of migration is used.

So what we need here is:
1) disable 'blk' and 'inc' flags to 'migrate' command
2) hide/disable 'nbd-server-start' command

Doing just 1) (what is done here IIUC) is not enough for the reason mention above - if libvirt detects 'nbd-server-start' on both source and destination it won't even get to the 'blk' or 'inc' in migrate where an error would be thrown.

---
* - in fact, the command presence is checked on qemu startup and it's remembered. Moreover, if the command is presented all other nbd-server-* commands are assumed too. But their presence is not checked, though.
Comment 4 Michal Privoznik 2013-11-07 08:15:59 EST
Patch proposed upstream:

https://www.redhat.com/archives/libvir-list/2013-November/msg00239.html
Comment 7 zhe peng 2013-11-13 03:24:36 EST
verify with build:
qemu-kvm-1.5.3-19.el7.x86_64
libvirt-1.1.1-12.el7.x86_64

step:
1: create migration env.
2: pre-create img on target host.
3: migrate guest with --copy-storage-all(migrate -b)
# virsh migrate --live --copy-storage-all rhel qemu+ssh://10.66.100.118/system --verbose --unsafe
root@10.66.100.118's password: 
error: internal error: unable to execute QEMU command 'migrate': this feature or command is not currently supported

check libvirtd log :
....
2013-11-13 07:31:27.827+0000: 6512: debug : qemuMigrationDriveMirror:1190 : Destination doesn't support NBD server Falling back to previous implementation.
....
2013-11-13 07:31:27.841+0000: 6512: debug : qemuMonitorJSONCheckError:343 : unable to execute QEMU command {"execute":"migrate","arguments":{"detach":true,"blk":true,"inc":false,"uri":"fd:migrate"},"id":"libvirt-19"}: {"id":"libvirt-19","error":{"class":"GenericError","desc":"this feature or command is not currently supported"}}
....

4: migrate guest with --copy-storage-inc(migrate -i)
# virsh migrate --live --copy-storage-inc rhel qemu+ssh://10.66.100.118/system --verbose --unsafe
root@10.66.100.118's password: 
error: internal error: unable to execute QEMU command 'migrate': this feature or command is not currently supported

check libvirtd log:
....
2013-11-13 08:15:59.789+0000: 6513: debug : qemuMigrationDriveMirror:1190 : Destination doesn't support NBD server Falling back to previous implementation.
....
2013-11-13 08:15:59.804+0000: 6513: debug : qemuMonitorJSONCheckError:343 : unable to execute QEMU command {"execute":"migrate","arguments":{"detach":true,"blk":false,"inc":true,"uri":"fd:migrate"},"id":"libvirt-33"}: {"id":"libvirt-33","error":{"class":"GenericError","desc":"this feature or command is not currently supported"}}
....

move to verified.
Comment 10 Ludek Smid 2014-06-13 08:21:11 EDT
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.

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