Bug 1265078 - virt-builder resize of ubuntu-14.04 fails
Summary: virt-builder resize of ubuntu-14.04 fails
Keywords:
Status: CLOSED DUPLICATE of bug 1248115
Alias: None
Product: Fedora
Classification: Fedora
Component: libguestfs
Version: 22
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-22 05:36 UTC by maarten
Modified: 2015-09-22 07:59 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-09-22 07:59:04 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Output of virt-builder -v -x ubuntu-14.04 --size 20G (83.82 KB, text/plain)
2015-09-22 05:36 UTC, maarten
no flags Details

Description maarten 2015-09-22 05:36:22 UTC
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 07:59:04 UTC
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.