From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:38878) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QpDfv-00072p-OD for qemu-devel@nongnu.org; Fri, 05 Aug 2011 02:14:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QpDfu-0005Yk-Iz for qemu-devel@nongnu.org; Fri, 05 Aug 2011 02:14:27 -0400 Received: from mail-yw0-f45.google.com ([209.85.213.45]:59915) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QpDfu-0005Yg-DJ for qemu-devel@nongnu.org; Fri, 05 Aug 2011 02:14:26 -0400 Received: by ywb3 with SMTP id 3so1758327ywb.4 for ; Thu, 04 Aug 2011 23:14:26 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: Date: Fri, 5 Aug 2011 08:14:25 +0200 Message-ID: From: =?ISO-8859-1?Q?Fr=E9d=E9ric_Dreier?= Content-Type: multipart/alternative; boundary=000e0cd7061862a92404a9bc0213 Subject: Re: [Qemu-devel] read-only IDE drives in qemu List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: qemu-devel@nongnu.org --000e0cd7061862a92404a9bc0213 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi, Now I understand why read-only IDE support was dropped. I will investigate if I could use read-only virtio disks for my purpose. Thank you for your response and for the hints, Best regards, Frederic Le 4 ao=FBt 2011 20:20, Markus Armbruster a =E9crit : > Fr=E9d=E9ric Dreier writes: > > > Hi, > > > > We are updating some machines in our server farm to Ubuntu natty (KVM / > > Opennebula cluster). Since then we used to have some VM with shared > > read-only IDE disks to mirror software repositories through several > isolated > > networks (one-way data diode). > > > > The updated qemu does not allow it. It failed to start the VM with a > 'Can't > > use a read-only drive' error. After checking in the qemu git, it seems > that > > this has been forbidden by this commit > > '7aa9c811ca0761918a0252d0f923a80224953fa6' : > > > > ----------------------------- > > Author: Markus Armbruster 2010-06-28 19:10:36 > > Committer: Kevin Wolf 2010-07-06 17:05:50 > > Parent: c4d74df726cb3791d9f1661b58067df5608b627e (ide: Make > ide_init_drive() > > return success) > > Child: dce9e92834cc4f962e547cae46b73ca559d05b0c (ide: Reject invalid C= HS > > geometry) > > Branches: master, remotes/origin/master, remotes/origin/stable-0.13, > > remotes/origin/stable-0.14, remotes/origin/stable-0.15 > > Follows: v0.12.0-rc0 > > Precedes: v0.13.0-rc0 > > > > ide: Reject readonly drives unless CD-ROM > > > > drive_init() doesn't permit option readonly for if=3Dide, but that'= s > > worthless: we get it via if=3Dnone and -device. > > > > Signed-off-by: Markus Armbruster > > Signed-off-by: Kevin Wolf > > ----------------------------- > > > > I do not understand the comment, if there is a workaround or if it > something > > to avoid. > > > > May you help me to understand it? > > Real IDE disks can't do read-only. > > -drive if=3Dide rejects readonly unless you also supply media=3Dcdrom, wh= ich > turns the drive into a CD-ROM. > > When -drive if=3Dnone got added, we inadvertedly created a loophole: the > reject covered only if=3Dide, not if=3Dnone when used for a -device > ide-drive. The commit you quoted fixed that. > > Can you use an IDE CD-ROM instead? Or virtio-blk-pci? > --000e0cd7061862a92404a9bc0213 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi,

Now I understand why read-only IDE support was dropped. I will i= nvestigate if I could use read-only virtio disks for my purpose.

Tha= nk you for your response and for the hints,

Best regards,

Frederic



Le 4 ao=FBt 2011 20:20, = Markus Armbruster <armbru@redhat.com> a =E9crit :
Fr=E9d=E9ric Dreier <frederic.dreier@gmail.com> writes:

> Hi,
>
> We are updating some machines in our server farm to Ubuntu natty (KVM = /
> Opennebula cluster). Since then we used to have some VM with shared > read-only IDE disks to mirror software repositories through several is= olated
> networks (one-way data diode).
>
> The updated qemu does not allow it. It failed to start the VM with a &= #39;Can't
> use a read-only drive' error. After checking in the qemu git, it s= eems that
> this has been forbidden by this commit
> '7aa9c811ca0761918a0252d0f923a80224953fa6' :
>
> -----------------------------
> Author: Markus Armbruster <arm= bru@redhat.com> =A02010-06-28 19:10:36
> Committer: Kevin Wolf <kwolf@re= dhat.com> =A02010-07-06 17:05:50
> Parent: c4d74df726cb3791d9f1661b58067df5608b627e (ide: Make ide_init_d= rive()
> return success)
> Child: =A0dce9e92834cc4f962e547cae46b73ca559d05b0c (ide: Reject invali= d CHS
> geometry)
> Branches: master, remotes/origin/master, remotes/origin/stable-0.13, > remotes/origin/stable-0.14, remotes/origin/stable-0.15
> Follows: v0.12.0-rc0
> Precedes: v0.13.0-rc0
>
> =A0 =A0 ide: Reject readonly drives unless CD-ROM
>
> =A0 =A0 drive_init() doesn't permit option readonly for if=3Dide, = but that's
> =A0 =A0 worthless: we get it via if=3Dnone and -device.
>
> =A0 =A0 Signed-off-by: Markus Armbruster <armbru@redhat.com>
> =A0 =A0 Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> -----------------------------
>
> I do not understand the comment, if there is a workaround or if it som= ething
> to avoid.
>
> May you help me to understand it?

Real IDE disks can't do read-only.

-drive if=3Dide rejects readonly unless you also supply media=3Dcdrom, whic= h
turns the drive into a CD-ROM.

When -drive if=3Dnone got added, we inadvertedly created a loophole: the reject covered only if=3Dide, not if=3Dnone when used for a -device
ide-drive. =A0The commit you quoted fixed that.

Can you use an IDE CD-ROM instead? =A0Or virtio-blk-pci?

--000e0cd7061862a92404a9bc0213--