[Libguestfs] Important virt-resize fix

Richard W.M. Jones rjones at redhat.com
Wed Jun 21 15:01:51 UTC 2017


[https://bugzilla.redhat.com/show_bug.cgi?id=1463714]

In this upstream commit:

  https://github.com/libguestfs/libguestfs/commit/8a2b0738d1b79f288b14fc35294567430d10b7ec

we accidentally dropped the ~readonly:true flag from the source disk
in virt-resize.

As a result if you run:

  virt-resize input output

then in some circumstances virt-resize may slightly change the input
disk.

One particular case is if the input disk contains any filesystems
which were not unmounted, then virt-resize would try to correct these
filesystems (replaying journals and so on).  virt-resize should not
touch the input disk so this is a data corruption problem.

This was noticed because virt-builder in some situations was
displaying an error that previously cached files had their SHA512
checksums changed when that should never occur.  This happened because
virt-resize was being run with the source file pointing at the cached
file, and virt-resize was changing this file.

This affects all versions of libguestfs since 1.35.21, so that
includes the current stable release (1.36.4), also RHEL 7.4.

The fix is:

  https://github.com/libguestfs/libguestfs/commit/1ca2a8b7ba41d7e4baf1aec5d65ace3b66f2dc37

You can test if your version of virt-resize is affected by following
the reproducer instructions here:

  https://bugzilla.redhat.com/show_bug.cgi?id=1463714#c2

We're going to release an update to 1.36 this week, and for RHEL 7.4
before 7.4 is shipped.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v




More information about the Libguestfs mailing list