[Libguestfs] failure to virt-sysprep (FC27?)

Emmanuel Kasper e.kasper at proxmox.com
Tue Dec 12 15:56:15 UTC 2017


On 12/12/2017 01:13 PM, Richard W.M. Jones wrote:
> On Thu, Nov 23, 2017 at 02:05:32PM +0000, Richard W.M. Jones wrote:
>> On Thu, Nov 23, 2017 at 03:00:45PM +0200, Yaniv Kaul wrote:
>>> On Thu, Nov 23, 2017 at 10:57 AM, Richard W.M. Jones <rjones at redhat.com>
>>> wrote:
>>>
>>>> On Tue, Nov 21, 2017 at 11:43:54PM +0200, Yaniv Kaul wrote:
>>>>> Since I upgrading to FC27, I *sometimes* fail to virt-sysprep.
>>>>> The debug messages:
>>>>> libguestfs: trace: set_verbose true
>>>>> libguestfs: trace: set_verbose = 0
>>>>> libguestfs: create: flags = 0, handle = 0x7f4600005dd0, program = python2
>>>>> libguestfs: trace: set_program "lago"
>>>>> libguestfs: trace: set_program = 0
>>>>> libguestfs: trace: add_drive_ro
>>>>> "/home/ykaul/ovirt-system-tests/deployment-basic-suite-
>>>> master/default/images/lago-basic-suite-master-host-0_root.qcow2"
>>>>> libguestfs: trace: add_drive
>>>>> "/home/ykaul/ovirt-system-tests/deployment-basic-suite-
>>>> master/default/images/lago-basic-suite-master-host-0_root.qcow2"
>>>>> "readonly:true"
>>>>> libguestfs: creating COW overlay to protect original drive content
>>>>> libguestfs: trace: disk_format
>>>>> "/home/ykaul/ovirt-system-tests/deployment-basic-suite-
>>>> master/default/images/lago-basic-suite-master-host-0_root.qcow2"
>>>>> libguestfs: command: run: qemu-img
>>>>> libguestfs: command: run: \ info
>>>>> libguestfs: command: run: \ --output json
>>>>> libguestfs: command: run: \ /dev/fd/7
>>>>> qemu-img: Could not open '/dev/fd/7': Failed to get shared "write" lock
>>>>> Is another process using the image?
>>
>> Looking at this a bit closer, I think this may be a bug in qemu.
>>
>> /dev/fd/7 is supposed to be the file descriptor of the image which we
>> have opened in libguestfs, see this code:
>>
>>   https://github.com/libguestfs/libguestfs/blob/06df910491c49360c0292c7153ba5e5cd09a4735/lib/info.c#L174-L191
>>
>> I wonder if qemu gets confused by this and thinks that the image is
>> open in two places?
>>
>> I can't reproduce this here however.  Having a nice short reproducer
>> might help.
> 
> This bug has now been reported by a Debian user:
> 
>   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=884110

Hi Rich

Have you tried the reproducer from the bug report ?
Using a Debian Testing system with  qemu-img 2.10.1 and libguestfs
1.36.11-1 packages I can reproduce it 100 %.








More information about the Libguestfs mailing list