Received: from eggs.gnu.org ([208.118.235.92]:58139) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TRf5L-0001QY-FX for qemu-devel@nongnu.org; Fri, 26 Oct 2012 04:16:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TRf5D-0003QN-Nf for qemu-devel@nongnu.org; Fri, 26 Oct 2012 04:16:07 -0400 Received: from indium.canonical.com ([91.189.90.7]:39306) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TRf5D-0003QJ-IG for qemu-devel@nongnu.org; Fri, 26 Oct 2012 04:15:59 -0400 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1TRf5C-0003jb-NG for ; Fri, 26 Oct 2012 08:15:58 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id A352A2E8084 for ; Fri, 26 Oct 2012 08:15:58 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Fri, 26 Oct 2012 08:07:02 -0000 From: Michael Tokarev <658610@bugs.launchpad.net> Sender: bounces@canonical.com References: <20101011184404.6472.99688.malonedeb@wampee.canonical.com> Message-Id: <20121026080702.20514.50928.malone@wampee.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 658610] Re: Check whether images have write permissions Reply-To: Bug 658610 <658610@bugs.launchpad.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org by default images are expected to be open read-write. I'm against too much "intelligence" here, -- we may be running qemu as wrong user, or with wrong permissions of the image in question, and qemu should fail to start if the image can't be open using specified access flags (which is read-write by default). There's "readonly=3D{on|off}" attribute of a block device which can be used to control this behavour. And this is, in fact, exactly the behavour: $ qemu -drive file=3D/bin/ls qemu: -drive file=3D/bin/ls,if=3Dvirtio: could not open disk image /bin/ls= : Permission denied $ qemu -drive file=3D/bin/ls,readonly=3Don qemu: -drive file=3D/bin/ls,readonly=3Don: readonly not supported by this = bus type $ qemu -drive file=3D/bin/ls,if=3Dvirtio,readonly=3Don (works) (Running as non-root ofcourse) So I for one don't see what's the problem. -- = You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/658610 Title: Check whether images have write permissions Status in QEMU: Confirmed Status in =E2=80=9Cqemu-kvm=E2=80=9D package in Ubuntu: Confirmed Bug description: KVM/Qemu should check whether the disk images have write permissions in order to prevent users from getting weird IO errors in their VMs without understanding what's happening. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/658610/+subscriptions