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 1449715

Summary: Offline migration should not fail with error "Migration may lead to data corruption if disks use cache != none"
Product: Red Hat Enterprise Linux 7 Reporter: Fangge Jin <fjin>
Component: libvirtAssignee: Pavel Hrdina <phrdina>
Status: CLOSED ERRATA QA Contact: Fangge Jin <fjin>
Severity: low Docs Contact:
Priority: low    
Version: 7.4CC: dyuan, phrdina, rbalakri, xuzhang, yafu, zpeng
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-3.7.0-1.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-10 10:43:32 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:
Embargoed:

Description Fangge Jin 2017-05-10 13:41:58 UTC
Description of problem:
Offline migration should not fail with error "Migration may lead to data corruption if disks use cache != none"

Version-Release number of selected component:
libvirt-3.2.0-4.virtcov.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Prepare a guest xml without cache=none:
...
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/nfs/fjin/rhel7.4-GUI.img'/>
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </disk>

2. Do offline migration,fail:
# virsh migrate rhel7.4 qemu+ssh://10.66.144.45/system --offline --persistent
error: Unsafe migration: Migration may lead to data corruption if disks use cache != none

3. Offline migration with --unsafe, succeed
# virsh migrate rhel7.4 qemu+ssh://10.66.144.45/system --offline --persistent --unsafe

Actual results:
As step2, offline migration failed with error.

Expected results:
Offline migration should succeed

Comment 1 Pavel Hrdina 2017-08-17 16:54:42 UTC
Upstream patch proposed:

https://www.redhat.com/archives/libvir-list/2017-August/msg00512.html

Comment 2 Pavel Hrdina 2017-08-18 12:50:36 UTC
Upstream commit:

commit abab46a29bd9ab8ef80f86619d97bf01ed4f4e7b
Author: Pavel Hrdina <phrdina>
Date:   Thu Aug 17 18:36:46 2017 +0200

    qemu: don't check whether offline migration is safe

v3.6.0-150-gabab46a29b

Comment 4 Fangge Jin 2017-10-24 04:46:55 UTC
Verify pass with libvirt-3.8.0-1.virtcov.el7.x86_64

Comment 8 errata-xmlrpc 2018-04-10 10:43:32 UTC
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/RHEA-2018:0704