Bug 1265078 - virt-builder resize of ubuntu-14.04 fails
virt-builder resize of ubuntu-14.04 fails
Status: CLOSED DUPLICATE of bug 1248115
Product: Fedora
Classification: Fedora
Component: libguestfs (Show other bugs)
22
x86_64 Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Richard W.M. Jones
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-22 01:36 EDT by maarten
Modified: 2015-09-22 03:59 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-09-22 03:59:04 EDT
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)
Output of virt-builder -v -x ubuntu-14.04 --size 20G (83.82 KB, text/plain)
2015-09-22 01:36 EDT, maarten
no flags Details

  None (edit)
Description maarten 2015-09-22 01:36:22 EDT
Created attachment 1075641 [details]
Output of virt-builder -v -x ubuntu-14.04 --size 20G

Description of problem:
When resizing a new guest Ubuntu-14 guest VM,
the builder fails due to a sfdisk error.
"Extended partition already exists.
sfdisk: /dev/sdb: partition 2: failed to set partition type"

Version-Release number of selected component (if applicable):
1.30.0

How reproducible:
100%

Steps to Reproduce:
$ virt-builder ubuntu-14.04 --size 20G

Actual results:
[   1.2] Downloading: http://libguestfs.org/download/builder/ubuntu-14.04.xz
[   1.7] Planning how to build this image
[   1.7] Uncompressing
[   6.7] Resizing (using virt-resize) to expand the disk to 20.0G
virt-resize: error: libguestfs error: part_set_mbr_id: sfdisk --part-type: 
Extended partition already exists.
sfdisk: /dev/sdb: partition 2: failed to set partition type

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

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

Expected results:
Same behavior as Fedora 22:
$ virt-builder fedora-22 --size 20G
[   1.2] Downloading: http://libguestfs.org/download/builder/fedora-22.xz
[   1.8] Planning how to build this image
[   1.8] Uncompressing
[   8.1] Resizing (using virt-resize) to expand the disk to 20.0G
[  20.4] Opening the new disk
[  32.1] Setting a random seed
[  32.1] Setting passwords
virt-builder: Setting random password of root to sEIz4Vaf2WykUvQN
[  33.1] Finishing off
                   Output file: fedora-22.img
                   Output size: 20.0G
                 Output format: raw
            Total usable space: 5.4G
                    Free space: 4.6G (86%)

Additional info:
Output of
virt-builder -v -x ubuntu-14.04 --size 20G
attached.
Comment 1 Richard W.M. Jones 2015-09-22 03:59:04 EDT
This is a bug in sfdisk.  See the reproducer here:

https://bugzilla.redhat.com/show_bug.cgi?id=1248115#c5
https://bugzilla.redhat.com/show_bug.cgi?id=1248115#c6

You need to add sfdisk commit df15fb3d053716d03055df755911d66814054b4b
to your host copy of sfdisk to fix it.

If your host is Debian/Ubuntu then see also:
https://bugzilla.redhat.com/show_bug.cgi?id=1222231

*** This bug has been marked as a duplicate of bug 1248115 ***

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