Bug 1249587 - "migrate --copy-storage-inc" doesn't handle the image backing file
"migrate --copy-storage-inc" doesn't handle the image backing file
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt (Show other bugs)
7.2
x86_64 Linux
unspecified Severity medium
: rc
: ---
Assigned To: Peter Krempa
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-03 07:00 EDT by Fangge Jin
Modified: 2015-11-19 01:49 EST (History)
4 users (show)

See Also:
Fixed In Version: libvirt-1.2.17-4.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-19 01:49:54 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 Fangge Jin 2015-08-03 07:00:01 EDT
Description:
The guest image has a backing file on shared nfs server. (Don't pre-create image on target host.) After migration with --copy-storage-inc, the backing file info is missing on target host. And the guest restart failed with following error:
Booting from Hard Disk...
Boot failed: not a bootable disk
No bootable device


Version:
libvirt-1.2.17-3.el7.x86_64
qemu-kvm-rhev-2.3.0-13.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
0.Prepare two hosts: source(RHEL7.2) and target(RHEL7.2)

1.Prepare an image with a guest installed with qcow2 type and put it in shared nfs.

2.Create an image based on the above image on source host:

# qemu-img create /var/lib/libvirt/images/mig2inc.qcow2 -f qcow2 -b /90121/fjin/r71-3.qcow2
Formatting '/var/lib/libvirt/images/mig2inc.qcow2', fmt=qcow2 size=9663676416 backing_file='/90121/fjin/r71-3.qcow2' encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16

# qemu-img info /var/lib/libvirt/images/mig2inc.qcow2
image: /var/lib/libvirt/images/mig2inc.qcow2
file format: qcow2
virtual size: 9.0G (9663676416 bytes)
disk size: 21M
cluster_size: 65536
backing file: /90121/fjin/r71-3.qcow2
Format specific information:
    compat: 1.1
    lazy refcounts: false
    refcount bits: 16
    corrupt: false

3.Start a guest with image "/var/lib/libvirt/images/mig2inc.qcow2" on source host.
# virsh start mig2
Domain mig2 started

4.Migrate the guest to target host(Note: don't pre-create storage on target):
# virsh migrate --verbose --live --persistent mig2 qemu+ssh://10.66.6.6/system --copy-storage-inc
Migration: [100 %]


5.Check the image info of the guest on target host:

# qemu-img info /var/lib/libvirt/images/mig2inc.qcow2
image: /var/lib/libvirt/images/mig2inc.qcow2
file format: qcow2
virtual size: 9.0G (9663676416 bytes)
disk size: 22M
cluster_size: 65536
Format specific information:
    compat: 0.10
    refcount bits: 16

Compared with the image info on source host, to find that backing file info is missing.

6.Destroy the guest and restart on target host:
# virsh destroy mig2
Domain mig2 destroyed

# virsh start mig2
Domain mig2 started

Guest start failed with the following error:

Booting from Hard Disk...
Boot failed: not a bootable disk
No bootable device

Actual results:
As step 5~6.

Expected results:
The "backing file" info can be preserved after migration.

Additional info:
"copy-storage-all" doesn't have such issue.
Comment 2 Fangge Jin 2015-08-04 02:47:14 EDT
The previous additional info is not accurate, "copy-storage-all" also doesn't have backing info after migration, but the guest can restart and work well on target:
# qemu-img info /var/lib/libvirt/images/test.qcow2
image: /var/lib/libvirt/images/test.qcow2
file format: qcow2
virtual size: 9.0G (9663676416 bytes)
disk size: 9.0G
cluster_size: 65536
Format specific information:
    compat: 0.10
    refcount bits: 16
Comment 5 zhe peng 2015-09-06 04:20:19 EDT
I can reproduce this .
verify bug with libvirt build:
libvirt-1.2.17-7.el7.x86_64

1: step same with bug's description.
2: # virsh migrate --verbose --live --persistent rhel7 qemu+ssh://$target_ip/system --copy-storage-inc
error: Operation not supported: pre-creation of storage targets for incremental storage migration is not supported

move to verified.
Comment 7 errata-xmlrpc 2015-11-19 01:49:54 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.

https://rhn.redhat.com/errata/RHBA-2015-2202.html

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