From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MGcw2-0005ij-5W for qemu-devel@nongnu.org; Tue, 16 Jun 2009 13:59:02 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MGcvx-0005gU-K1 for qemu-devel@nongnu.org; Tue, 16 Jun 2009 13:59:01 -0400 Received: from [199.232.76.173] (port=58664 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MGcvx-0005gN-Ef for qemu-devel@nongnu.org; Tue, 16 Jun 2009 13:58:57 -0400 Received: from mx2.redhat.com ([66.187.237.31]:56948) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MGcvw-0002t6-MT for qemu-devel@nongnu.org; Tue, 16 Jun 2009 13:58:57 -0400 Message-ID: <4A37DD59.1000402@redhat.com> Date: Tue, 16 Jun 2009 20:58:49 +0300 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] Regression opening read-only cdroms References: <4A37896C.8050208@redhat.com> <20090616143259.GA29040@shareable.org> <4A37B756.6090008@redhat.com> <20090616155438.GL29040@shareable.org> <4A37C58C.3000003@redhat.com> <20090616175112.GB11893@shareable.org> In-Reply-To: <20090616175112.GB11893@shareable.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jamie Lokier Cc: Christoph Hellwig , qemu-devel On 06/16/2009 08:51 PM, Jamie Lokier wrote: > Avi Kivity wrote: > >> On 06/16/2009 06:54 PM, Jamie Lokier wrote: >> >>> 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. >>> >>> >> It will eventually fail. Open the ext3 log, update atime, or >> something. The guest expects the disk to be writeable. >> > > No. Obviously if you _want_ to run a guest with the disk mounted > writable, you'll use snapshot=on instead because that's what it's for. > > Otherwise, a read-only disk should works fine using virtio/SCSI/USB, > as the guest will mount it read-only, as those interfaces all have a > read-only media flag which Linux guests (at least) look at. > > Which is the desired behaviour. > > I didn't consider a read-only media flag. I retract my remarks, -drive ...,readonly then makes sense for those interfaces. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.