Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 517724 (RHEVmigration)

Summary: RFE: migration enhancements
Product: Red Hat Enterprise Linux 6 Reporter: Dor Laor <dlaor>
Component: libvirtAssignee: Daniel Berrangé <berrange>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 6.0CC: berrange, hbrock, jjarvis, liko, llim, nzhang, pbonzini, syeghiay, tburke, veillard, xen-maint, yimwang, yoyzhang
Target Milestone: rcKeywords: FutureFeature, Tracking
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-0.8.0-1.el6 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
: 536943 (view as bug list) Environment:
Last Closed: 2010-11-10 21:05:19 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: 515278, 561934, 561935    
Bug Blocks:    

Description Dor Laor 2009-08-16 11:36:43 UTC
These are several migration enhancements:

1. Expose migration status so higher level management will track its progress using a gui bar.
2. Allow to set migration bandwidth
3. Allow to change the maximum migration downtime in order to accelerate migration.
4. Allow the user to stop the VM so the live migration will turn into non-live in order to make it happen instantly

Comment 2 RHEL Program Management 2009-08-17 07:54:40 UTC
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.

Comment 3 Daniel Berrangé 2009-08-17 09:40:26 UTC
FYI, item 2 is already available in the libvirt migration API & implemented for QEMU. Its the last 'resource' parameter in virDomainMigrate()


What sort of metrics do you want exposed for migration status ? I can think of

 - total data size bytes
 - transferred bytes
 - remaining bytes
 - actual elapsed time
 - estimated remaining time
 - percentage completion

Anything else ?

Comment 4 Paolo Bonzini 2009-08-17 10:47:26 UTC
Adding blocked-by 503367 since it is a subset of (4).

Comment 5 Dor Laor 2009-08-17 11:08:40 UTC
(In reply to comment #3)
> FYI, item 2 is already available in the libvirt migration API & implemented for
> QEMU. Its the last 'resource' parameter in virDomainMigrate()
> 
> 
> What sort of metrics do you want exposed for migration status ? I can think of
> 
>  - total data size bytes
>  - transferred bytes
>  - remaining bytes
>  - actual elapsed time
>  - estimated remaining time
>  - percentage completion
> 
> Anything else ?  

The current upstream shows the following:
 * Migration status: Active or completed
 * transferred ram : x kbytes
 * remaining ram: z bytes
 * total ram: y bytes
  << does the above change? probably redundant (maybe different with 
     ballooning) >>

I'm not sure/can't tell about the need for percentage or time. 
With the above data along with the time it takes you can calculate the convergence rate and do the actions below:
 
Actions:
 * Migrate_set_speed (bandwidth number)
 * Migrate_set_downtime
 * Optional stop the VM so migration will be done offline and 'cont' it at the 
   destination.

Comment 6 Daniel Veillard 2009-10-08 12:48:10 UTC
Hum that part has not been addressed upstream yet (the migration APIs are
still consolidating after the perr-to-peer and secure migration additions)
and it's not sure such metrics will always be extractable in all cases.
Right now this looks a bit late, I hope this will make 6.0 GA at least
for the KVM migration under libvirt control, but this is at risk since
no API has been proposed yet.

Daniel

Comment 9 Chris Lalancette 2010-04-14 15:01:53 UTC
I believe this all went in as part of 0.8.0.  In any case Dan Berrange did all of the work for it, so I'll assign it over to him and he can set it to MODIFIED or not as appropriate.

Chris Lalancette

Comment 10 Daniel Berrangé 2010-04-14 15:10:40 UTC
Yes, this is all available now.

Comment 12 wangyimiao 2010-06-28 07:33:53 UTC
Hi,
Test with 'libvirt-0.8.1-10.el6.x86_64'

Description of problem:

1.Item 2 is unavailable.Have not found argument 'migrate_set_speed' in the virsh help doc and it invalid when we use it in the migrate command.

Test Steps for Item 2:

1). via virsh command to migrate 

# virsh migrate --live cdrom_test  qemu+tcp://10.66.70.82/system  migrate_set_speed 4095m
error: invalid argument in only tcp URIs are supported for KVM/QEMU migrations

2).And via virt-manager to migrate the VM to other host(Migrate->advanced options->Bandwith) 

Detail error:
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 1388, 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: internal error unable to execute QEMU command 'migrate_set_speed': Invalid parameter type, expected: number

issue:
  1).Item 2 is unavailable.Details refer to the test steps.


2.Item 4 is unavailable,no argument for migrate shutdown VM to other host in virsh help doc and can not migrate the shudown vm to other.


Test Steps for Item 4:

1).# iptables -F

2).# setenforce 0

3)virsh migrate cdrom_test qemu+tcp://10.66.70.82/system
error: internal error Process exited while reading console log output: char device redirected to /dev/pts/1
qemu: could not open disk image /var/lib/libvirt/migrate/cdrom_test.img: Permission denied

issue:
  1).Item 4 is unavailable,no argument for migrate shutdown VM to other host in virsh help doc and can not migrate the shudown vm to other.Details please refer to the test steps.

Comment 14 Daniel Berrangé 2010-08-17 09:10:48 UTC
> # virsh migrate --live cdrom_test  qemu+tcp://10.66.70.82/system 
> migrate_set_speed 4095m
> error: invalid argument in only tcp URIs are supported for KVM/QEMU migrations

This is not supported syntax. The control of migration speed is not exposed in virsh at all - it is only available at the C API.

> 2.Item 4 is unavailable,no argument for migrate shutdown VM to other host in
> virsh help doc and can not migrate the shudown vm to other.

Migration of shutdown VM is not supported, nor required for this BZ.

Comment 17 Nan Zhang 2010-09-10 05:31:26 UTC
Verified with libvirt-0.8.1-27.el6.x86_64 & qemu-kvm-0.12.1.2-2.113.el6.x86_64.

Item 2:
Using virt-manager to migrate the VM to another host(Migrate -> Advanced
options -> Bandwith)

Item 3:
Source:
# virsh migrate --live rhel6 qemu+ssh://10.66.65.186/system

# virsh dominfo rhel6
Id:             -
Name:           rhel6
UUID:           92abbc4c-23fc-49e4-fb04-f4f195324d67
OS Type:        hvm
State:          shut off
CPU(s):         1
Max memory:     524288 kB
Used memory:    524288 kB
Persistent:     yes
Autostart:      disable
Security model: selinux
Security DOI:   0

Target:
# virsh migrate-setmaxdowntime rhel6 --downtime 10000

# virsh list
 Id Name                 State
----------------------------------

Comment 18 releng-rhel@redhat.com 2010-11-10 21:05:19 UTC
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.