<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 21, 2017 at 10:44 AM, Pino Toscano <span dir="ltr"><<a href="mailto:ptoscano@redhat.com" target="_blank">ptoscano@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail-HOEnZb"><div class="gmail-h5">On Tuesday, 21 November 2017 15:36:02 CET David Kaylor wrote:<br>
> On Tue, Nov 21, 2017 at 3:55 AM, Pino Toscano <<a href="mailto:ptoscano@redhat.com">ptoscano@redhat.com</a>> wrote:<br>
><br>
> > Hi,<br>
> ><br>
> > On Monday, 20 November 2017 22:57:04 CET David Kaylor wrote:<br>
> > > I was trying out virt-builder and noticed that in some directories I<br>
> > > receive an error when the image is resized.<br>
> > ><br>
> > > For example, if I run the following command from my home directory it<br>
> > works<br>
> > > fine:<br>
> > ><br>
> > > virt-builder rhel-7.4 --size 10G --output test.img<br>
> > ><br>
> > > If I run the same command from /tmp or /vms (my default libvirt pool), I<br>
> > > see the following in my verbose output:<br>
> > ><br>
> > > virt-resize '--verbose' '--format' 'raw' '--output-format' 'raw'<br>
> > '--expand'<br>
> > > '/dev/sda3' '--unknown-filesystems' 'error' 'test.img' 'test.img'<br>
> > > command line: virt-resize --verbose --format raw --output-format raw<br>
> > > --expand /dev/sda3 --unknown-filesystems error test.img test.img<br>
> > > virt-resize: error: you cannot use the same disk image for input and<br>
> > output<br>
> > ><br>
> > > Am I doing something wrong or is this possibly a bug? The host I am<br>
> > running<br>
> > > virt-builder on is Fedora 27.<br>
> ><br>
> > The only thing it comes into my mind is that there is already a file<br>
> > called "test.img" in the directories where it fails.<br>
> ><br>
> > Can you please check that, and provide also a full log virt-builder<br>
> > with -v -x?<br>
> ><br>
> > Thanks,<br>
> > --<br>
> > Pino Toscano<br>
><br>
><br>
> Thanks, Pino. Attached is the requested log. A few other observations:<br>
><br>
> In most directories, I can run the command successfully whether a file of<br>
> the same name is present or not.<br>
><br>
> Looking at the verbose output, it appears that a randomly-generated name in<br>
> /var/tmp is used for the indisk. Example:<br>
><br>
> virt-resize --verbose --format raw --output-format raw --expand /dev/sda3<br>
> --unknown-filesystems error /var/tmp/vbaf3053.img test.img<br>
><br>
> For directories where it fails, both the indisk and outdisk are the same:<br>
><br>
> virt-resize --verbose --format raw --output-format raw --expand /dev/sda3<br>
> --unknown-filesystems error test.img test.img<br>
<br>
</div></div>Hmm... can you please paste the output of `findmnt --df`? In addition<br>
to that, do /tmp or /vms (mentioned above by you) have any special<br>
mount point (or free space)?<br>
<br>
What's the exact version of libguestfs? (`rpm -q libguestfs`)<br>
<span class="gmail-HOEnZb"><font color="#888888"><br>
--<br>
Pino Toscano</font></span></blockquote></div><br><div class="gmail_extra">There is nothing special about the mounts and there is enough free space on both. Here is the requested output:</div><div class="gmail_extra"><br></div><div class="gmail_extra">$ findmnt --df</div><div class="gmail_extra">SOURCE FSTYPE SIZE USED AVAIL USE% TARGET</div><div class="gmail_extra">devtmpfs devtmpfs 15.4G 0 15.4G 0% /dev</div><div class="gmail_extra">tmpfs tmpfs 15.4G 267.7M 15.1G 2% /dev/shm</div><div class="gmail_extra">tmpfs tmpfs 15.4G 2.2M 15.4G 0% /run</div><div class="gmail_extra">tmpfs tmpfs 15.4G 0 15.4G 0% /sys/fs/cgroup</div><div class="gmail_extra">/dev/mapper/fedora-root ext4 452.2G 45.4G 383.8G 10% /</div><div class="gmail_extra">selinuxfs selinuxfs 0 0 0 - /sys/fs/selinux</div><div class="gmail_extra">tmpfs tmpfs 15.4G 3.3M 15.4G 0% /tmp</div><div class="gmail_extra">/dev/nvme0n1p1 ext4 975.9M 196.6M 712.1M 20% /boot</div><div class="gmail_extra">/dev/mapper/luks-c4229932-74e7-4cdf-a8e9-e814004cc4c2 ext4 468.5G 291.1G 153.5G 62% /vms</div><div class="gmail_extra">tmpfs tmpfs 3.1G 16K 3.1G 0% /run/user/42</div><div class="gmail_extra">tmpfs tmpfs 3.1G 80K 3.1G 0% /run/user/24951</div><div class="gmail_extra">gvfsd-fuse fuse.gvfsd-fuse 0 0 0 - /run/user/24951/gvfs</div><div class="gmail_extra"><br></div><div class="gmail_extra">$ rpm -q libguestfs</div><div class="gmail_extra">libguestfs-1.37.31-1.fc27.x86_64</div><div><br></div><div>Thanks,</div><div>David</div>
</div></div>