[Libguestfs] virt-builder resize error

Pino Toscano ptoscano at redhat.com
Tue Nov 21 15:44:05 UTC 2017


On Tuesday, 21 November 2017 15:36:02 CET David Kaylor wrote:
> On Tue, Nov 21, 2017 at 3:55 AM, Pino Toscano <ptoscano at redhat.com> wrote:
> 
> > Hi,
> >
> > On Monday, 20 November 2017 22:57:04 CET David Kaylor wrote:
> > > I was trying out virt-builder and noticed that in some directories I
> > > receive an error when the image is resized.
> > >
> > > For example, if I run the following command from my home directory it
> > works
> > > fine:
> > >
> > > virt-builder rhel-7.4 --size 10G --output test.img
> > >
> > > If I run the same command from /tmp or /vms (my default libvirt pool), I
> > > see the following in my verbose output:
> > >
> > > virt-resize '--verbose' '--format' 'raw' '--output-format' 'raw'
> > '--expand'
> > > '/dev/sda3' '--unknown-filesystems' 'error' 'test.img' 'test.img'
> > > command line: virt-resize --verbose --format raw --output-format raw
> > > --expand /dev/sda3 --unknown-filesystems error test.img test.img
> > > virt-resize: error: you cannot use the same disk image for input and
> > output
> > >
> > > Am I doing something wrong or is this possibly a bug? The host I am
> > running
> > > virt-builder on is Fedora 27.
> >
> > The only thing it comes into my mind is that there is already a file
> > called "test.img" in the directories where it fails.
> >
> > Can you please check that, and provide also a full log virt-builder
> > with -v -x?
> >
> > Thanks,
> > --
> > Pino Toscano
> 
> 
> Thanks, Pino. Attached is the requested log. A few other observations:
> 
> In most directories, I can run the command successfully whether a file of
> the same name is present or not.
> 
> Looking at the verbose output, it appears that a randomly-generated name in
> /var/tmp is used for the indisk. Example:
> 
> virt-resize --verbose --format raw --output-format raw --expand /dev/sda3
> --unknown-filesystems error /var/tmp/vbaf3053.img test.img
> 
> For directories where it fails, both the indisk and outdisk are the same:
> 
> virt-resize --verbose --format raw --output-format raw --expand /dev/sda3
> --unknown-filesystems error test.img test.img

Hmm... can you please paste the output of `findmnt --df`?  In addition
to that, do /tmp or /vms (mentioned above by you) have any special
mount point (or free space)?

What's the exact version of libguestfs? (`rpm -q libguestfs`)

-- 
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20171121/9359b950/attachment.sig>


More information about the Libguestfs mailing list