[Bug 658610] Re: Check whether images have write permissions

Michael Tokarev 658610 at bugs.launchpad.net
Fri Oct 26 08:07:02 UTC 2012


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={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=/bin/ls
 qemu: -drive file=/bin/ls,if=virtio: could not open disk image /bin/ls: Permission denied
 $ qemu -drive file=/bin/ls,readonly=on
 qemu: -drive file=/bin/ls,readonly=on: readonly not supported by this bus type
 $ qemu -drive file=/bin/ls,if=virtio,readonly=on
 (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 Ubuntu
Server Team, which is subscribed to qemu-kvm in Ubuntu.
https://bugs.launchpad.net/bugs/658610

Title:
  Check whether images have write permissions

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/658610/+subscriptions



More information about the Ubuntu-server-bugs mailing list