<div dir="auto"><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Nov 23, 2017 4:19 PM, "Yaniv Kaul" <<a href="mailto:ykaul@redhat.com">ykaul@redhat.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><div class="elided-text">On Thu, Nov 23, 2017 at 4:05 PM, Richard W.M. Jones <span dir="ltr"><<a href="mailto:rjones@redhat.com" target="_blank">rjones@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="m_2586675484023465663gmail-HOEnZb"><div class="m_2586675484023465663gmail-h5">On Thu, Nov 23, 2017 at 03:00:45PM +0200, Yaniv Kaul wrote:<br>
> On Thu, Nov 23, 2017 at 10:57 AM, Richard W.M. Jones <<a href="mailto:rjones@redhat.com" target="_blank">rjones@redhat.com</a>><br>
> wrote:<br>
><br>
> > On Tue, Nov 21, 2017 at 11:43:54PM +0200, Yaniv Kaul wrote:<br>
> > > Since I upgrading to FC27, I *sometimes* fail to virt-sysprep.<br>
> > > The debug messages:<br>
> > > libguestfs: trace: set_verbose true<br>
> > > libguestfs: trace: set_verbose = 0<br>
> > > libguestfs: create: flags = 0, handle = 0x7f4600005dd0, program = python2<br>
> > > libguestfs: trace: set_program "lago"<br>
> > > libguestfs: trace: set_program = 0<br>
> > > libguestfs: trace: add_drive_ro<br>
> > > "/home/ykaul/ovirt-system-test<wbr>s/deployment-basic-suite-<br>
> > master/default/images/lago-bas<wbr>ic-suite-master-host-0_root.<wbr>qcow2"<br>
> > > libguestfs: trace: add_drive<br>
> > > "/home/ykaul/ovirt-system-test<wbr>s/deployment-basic-suite-<br>
> > master/default/images/lago-bas<wbr>ic-suite-master-host-0_root.<wbr>qcow2"<br>
> > > "readonly:true"<br>
> > > libguestfs: creating COW overlay to protect original drive content<br>
> > > libguestfs: trace: disk_format<br>
> > > "/home/ykaul/ovirt-system-test<wbr>s/deployment-basic-suite-<br>
> > master/default/images/lago-bas<wbr>ic-suite-master-host-0_root.<wbr>qcow2"<br>
> > > libguestfs: command: run: qemu-img<br>
> > > libguestfs: command: run: \ info<br>
> > > libguestfs: command: run: \ --output json<br>
> > > libguestfs: command: run: \ /dev/fd/7<br>
> > > qemu-img: Could not open '/dev/fd/7': Failed to get shared "write" lock<br>
> > > Is another process using the image?<br>
<br>
</div></div>Looking at this a bit closer, I think this may be a bug in qemu.<br>
<br>
/dev/fd/7 is supposed to be the file descriptor of the image which we<br>
have opened in libguestfs, see this code:<br>
<br>
  <a href="https://github.com/libguestfs/libguestfs/blob/06df910491c49360c0292c7153ba5e5cd09a4735/lib/info.c#L174-L191" rel="noreferrer" target="_blank">https://github.com/libguestfs/<wbr>libguestfs/blob/06df910491c493<wbr>60c0292c7153ba5e5cd09a4735/<wbr>lib/info.c#L174-L191</a><br>
<br>
I wonder if qemu gets confused by this and thinks that the image is<br>
open in two places?<br>
<br>
I can't reproduce this here however.  Having a nice short reproducer<br>
might help.<br></blockquote><div><br></div></div><div>It's not reliably reproduced on my setup either.</div><div>I run Lago (<a href="http://lago.readthedocs.io/en/latest/" target="_blank">http://lago.readthedocs.io/<wbr>en/latest/</a>) which is virt-sysprep'ing several VMs (using direct backend, but they were brought up via libvirt - is that an issue?).</div><div>I don't recall seeing it before upgrading to FC27...</div></div></div></div></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">I've never seen it happen with libvirt as the backend btw. I think Lago's default is direct though. </div><div dir="auto">Y. </div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><font color="#888888"><div>Y.</div></font><div class="quoted-text"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Rich.<br>
<span class="m_2586675484023465663gmail-"><br>
--<br>
Richard Jones, Virtualization Group, Red Hat <a href="http://people.redhat.com/~rjones" rel="noreferrer" target="_blank">http://people.redhat.com/~rjon<wbr>es</a><br>
Read my programming and virtualization blog: <a href="http://rwmj.wordpress.com" rel="noreferrer" target="_blank">http://rwmj.wordpress.com</a><br>
</span>Fedora Windows cross-compiler. Compile Windows programs, test, and<br>
build Windows installers. Over 100 libraries supported.<br>
<a href="http://fedoraproject.org/wiki/MinGW" rel="noreferrer" target="_blank">http://fedoraproject.org/wiki/<wbr>MinGW</a><br>
</blockquote></div></div><br></div></div>
</blockquote></div><br></div></div></div>