[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Regression opening read-only cdroms
From: |
Jamie Lokier |
Subject: |
Re: [Qemu-devel] Regression opening read-only cdroms |
Date: |
Tue, 16 Jun 2009 16:54:38 +0100 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Avi Kivity wrote:
> On 06/16/2009 05:33 PM, Jamie Lokier wrote:
> >Avi Kivity wrote:
> >
> >>qemu used to be quite happy opening read-only cdrom images, and I was
> >>quite happy feeding kvm-autotest a library of read-only iso images.
> >>
> >
> >1. While we're here, an _option_ to open an image read-only even when
> > you have write permission would be useful, for those occasions when
> > you want to boot from some valuable image and be certain you aren't
> > modifying it - without having to chmod back and forth in
> > Qemu-wrapper scripts, or copy the image first.
> >
>
> read-only disk images don't make much sense.
And yet "chmod 444 image; qemu ..." works.
If you're booting from a disk you don't need to write to, obviously.
Generally it'll need to be mounted read-only in the guest.
> Using -snapshot will generally ensure the image is not modified, while
> allowing the guest to write.
I never do that with _valuable_ images because:
- Valuable images are expensive/difficult/impossible to recreate.
But too large to copy about casually.
- I don't have that much faith in QEMU's correctness, having
already been bitten by a number it's bugs, or in the guest's
correctness if I were to rely on the guest doing read-only mount
instead of using -snapshot.
- It's too easy to accidentally write back the changes over the
the original image. Man page:
"the raw disk image you use is not written back. You can however
force the write back by pressing C-a s".
And I don't do it when booting a guest where I have _both_ a disk a do
want to write, and another valuable image that I don't want written,
because:
- How would I use -snapshot and then commit changes to the disk I
do want to write (either C-a s or "commit" in the monitor), but
never write changes to the disk I don't want written?
- "commit" has always been a bit ambiguous when applied to a
combination of -snapshot and a qcow2 delta image.
Finally, QEMU clearly does support read-only images, so it's always
struck me as odd that the only way to invoke this support is using
"chmod" outside QEMU. (Actually I use "chattr +i" as well. That's
how paranoid I am about difficult to recreate images).
-- Jamie
- Re: [Qemu-devel] Regression opening read-only cdroms, (continued)
- Re: [Qemu-devel] Regression opening read-only cdroms, Jamie Lokier, 2009/06/16
- Re: [Qemu-devel] Regression opening read-only cdroms, Anthony Liguori, 2009/06/16
- Re: [Qemu-devel] Regression opening read-only cdroms, Stefano Stabellini, 2009/06/16
- Re: [Qemu-devel] Regression opening read-only cdroms, Jamie Lokier, 2009/06/16
- Re: [Qemu-devel] Regression opening read-only cdroms, Avi Kivity, 2009/06/16
- Re: [Qemu-devel] Regression opening read-only cdroms, Jamie Lokier, 2009/06/16
- Re: [Qemu-devel] Regression opening read-only cdroms, Jamie Lokier, 2009/06/16
- Re: [Qemu-devel] Regression opening read-only cdroms, Gerd Hoffmann, 2009/06/16
- Re: [Qemu-devel] Regression opening read-only cdroms, Avi Kivity, 2009/06/17
Re: [Qemu-devel] Regression opening read-only cdroms, Avi Kivity, 2009/06/16
Re: [Qemu-devel] Regression opening read-only cdroms, Richard W.M. Jones, 2009/06/18
Re: [Qemu-devel] Regression opening read-only cdroms, Blue Swirl, 2009/06/16