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 1482737 - virt-resize failed to expand swap partition for RHEL5.11 guest image with "parsing UUID failed"
Summary: virt-resize failed to expand swap partition for RHEL5.11 guest image with "pa...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 1472272
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-18 02:02 UTC by Xianghua Chen
Modified: 2018-04-10 09:19 UTC (History)
6 users (show)

Fixed In Version: libguestfs-1.36.5-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-10 09:18:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
log.virt-resize_expand_swap.rhel5.11 (133.26 KB, text/plain)
2017-08-18 02:02 UTC, Xianghua Chen
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0677 0 None None None 2018-04-10 09:19:53 UTC

Description Xianghua Chen 2017-08-18 02:02:01 UTC
Created attachment 1314986 [details]
log.virt-resize_expand_swap.rhel5.11

Description of problem:
virt-resize failed to expand swap partition for RHEL5.11 guest image with "parsing UUID failed".
Please refer to the attachment for detailed log.


Version-Release number of selected component (if applicable):
libguestfs-1.36.3-6.el7_4.2.x86_64

How reproducible:
100%


Steps:

1. Prepare a RHEL5.11 guest image: RHEL-Server-5.11-64-hvm.raw
2. Check the swap partition:
# virt-filesystems -a RHEL-Server-5.11-64-hvm.raw -lh --extra
Name                      Type        VFS   Label  Size  Parent
/dev/sda1                 filesystem  ext3  /boot  102M  -
/dev/VolGroup00/LogVol00  filesystem  ext3  -      5.9G  -
/dev/VolGroup00/LogVol01  filesystem  swap  -      2.0G  -
3. Create a image for test:
# qemu-img create libguestfs_virt-resize_test.img 22474836480
4. Expand the swap partition:
# virt-resize --expand /dev/sda2 --LV-expand /dev/VolGroup00/LogVol01 RHEL-Server-5.11-64-hvm.raw libguestfs_virt-resize_test.img[   0.0] Examining RHEL-Server-5.11-64-hvm.raw
**********

Summary of changes:

/dev/sda1: This partition will be left alone.

/dev/sda2: This partition will be resized from 7.9G to 8.8G.  The LVM PV on 
/dev/sda2 will be expanded using the 'pvresize' method.

/dev/VolGroup00/LogVol01: This logical volume will be expanded to maximum 
size.  The swap on /dev/VolGroup00/LogVol01 will be expanded using the 
'mkswap' method.

**********
[   3.4] Setting up initial partition table on libguestfs_virt-resize_test.img
[   3.6] Copying /dev/sda1
[   4.0] Copying /dev/sda2
 100% ⟦▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒⟧ 00:00
[  87.1] Expanding /dev/sda2 using the 'pvresize' method
[  87.1] Expanding /dev/VolGroup00/LogVol01 using the 'mkswap' method
virt-resize: error: libguestfs error: mkswap: /dev/VolGroup00/LogVol01: 
mkswap: error: parsing UUID failed

If reporting bugs, run virt-resize with debugging enabled and include the 
complete output:

  virt-resize -v -x [...]



Actual results:
Failed to expand the swap partition.

Expected results:
The swap partition should be expanded successfully.

Additional info:
This command passed on RHEL4.8/RHEL6.9/RHEL7.3.

Comment 3 Pino Toscano 2017-08-18 08:57:08 UTC
Patch posted:
https://www.redhat.com/archives/libguestfs/2017-August/msg00106.html

Comment 4 Pino Toscano 2017-08-18 14:58:15 UTC
Fixed upstream with
https://github.com/libguestfs/libguestfs/commit/6befd1464d9939b9c15373b19296e796bea3d8d5
which is in libguestfs >= 1.37.22.

Comment 9 YongkuiGuo 2017-09-29 07:10:02 UTC
Verified with the package:
libguestfs-1.36.6-2.el7.x86_64


Steps:

1. Prepare a RHEL5.11 guest image: RHEL-Server-5.11-64-hvm.raw

2. Check the swap partition:
# virt-filesystems -a RHEL-Server-5.11-64-hvm.raw -lh --extra
Name                      Type        VFS   Label  Size  Parent
/dev/sda1                 filesystem  ext3  /boot  102M  -
/dev/VolGroup00/LogVol00  filesystem  ext3  -      5.9G  -
/dev/VolGroup00/LogVol01  filesystem  swap  -      2.0G  -

3. Create a image for test:
# qemu-img create libguestfs_virt-resize_test.img 22474836480

4. Expand the swap partition:
# virt-resize --expand /dev/sda2 --LV-expand /dev/VolGroup00/LogVol01 RHEL-Server-5.11-64-hvm.raw libguestfs_virt-resize_test.img
--------------------------------------------------------
[   0.0] Examining RHEL-Server-5.11-64-hvm.raw
**********

Summary of changes:

/dev/sda1: This partition will be left alone.

/dev/sda2: This partition will be resized from 7.9G to 20.8G.  The LVM PV 
on /dev/sda2 will be expanded using the 'pvresize' method.

/dev/VolGroup00/LogVol01: This logical volume will be expanded to maximum 
size.  The swap on /dev/VolGroup00/LogVol01 will be expanded using the 
'mkswap' method.

**********
[   4.7] Setting up initial partition table on libguestfs_virt-resize_test.img
[   5.1] Copying /dev/sda1
[   5.4] Copying /dev/sda2
 100% ⟦▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒⟧ 00:00
[  49.4] Expanding /dev/sda2 using the 'pvresize' method
[  49.4] Expanding /dev/VolGroup00/LogVol01 using the 'mkswap' method
virt-resize: warning: UUID in swap partition /dev/VolGroup00/LogVol01 
changed from ‘’ to ‘9f11776b-d783-4c3f-a717-726c27552cfd’

Resize operation completed with no errors.  Before deleting the old disk, 
carefully check that the resized disk boots and works correctly.
--------------------------------------------------------

The swap partition can be expanded successfully with the new libguestfs version. So verified this bug.

Comment 12 errata-xmlrpc 2018-04-10 09:18:10 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/RHBA-2018:0677


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