From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34646) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXGSf-0001yl-Uu for qemu-devel@nongnu.org; Mon, 17 Jul 2017 20:34:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dXGSb-0005jd-UB for qemu-devel@nongnu.org; Mon, 17 Jul 2017 20:34:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41076) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dXGSb-0005jF-NJ for qemu-devel@nongnu.org; Mon, 17 Jul 2017 20:33:57 -0400 References: From: John Snow Message-ID: <1263c0a6-263f-0b3b-c84a-f882df33856b@redhat.com> Date: Mon, 17 Jul 2017 20:33:55 -0400 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Disable image locking for snapshot drive? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andrew Baumann , "qemu-devel@nongnu.org" Cc: "famz@redhat.com" On 07/17/2017 07:30 PM, Andrew Baumann via Qemu-devel wrote: > Hi all, > > I'm running a recent Linux build of qemu on Windows Subsystem for Linux (WSL) which doesn't appear to implement file locking: > > $ qemu-system-aarch64 ... -drive file=test.vhdx,if=none,id=hd0 -device virtio-blk-pci,drive=hd0 > qemu-system-aarch64: -drive file=test.vhdx,if=none,id=hd0: Failed to unlock byte 100 > qemu-system-aarch64: -drive file=test.vhdx,if=none,id=hd0: Failed to unlock byte 100 > qemu-system-aarch64: -drive file=test.vhdx,if=none,id=hd0: Failed to lock byte 100 > > That's no big deal; I can switch it off: > > $ qemu-system-aarch64 ... -drive file=test.vhdx,if=none,file.locking=off,id=hd0 ... > (all good) > > But how can I do the same for a snapshot drive? > > $ qemu-system-aarch64 ... -drive file=test.vhdx,if=none,file.locking=off,id=hd0 -snapshot ... > qemu-system-aarch64: -drive file=test.vhdx,if=none,file.locking=off,id=hd0: Failed to unlock byte 100 > qemu-system-aarch64: -drive file=test.vhdx,if=none,file.locking=off,id=hd0: Failed to unlock byte 100 > qemu-system-aarch64: -drive file=test.vhdx,if=none,file.locking=off,id=hd0: Could not create temporary overlay '/var/tmp/vl.o83dxn': Failed to lock byte 100 > > (I also tried the snapshot=on drive option with similar results.) > > Thanks, > Andrew > Looks like the shorthand "-snapshot" doesn't let you specify any further options, which is a bummer. You may need to do something a little more manual, and create your own temporary overlay, and launch QEMU pointing to that overlay instead. That sounds like a bit of a hassle. Can we compile locking support out of QEMU instead for this platform? Or is there a runtime option for disabling it globally?