<div dir="ltr"><div class="gmail_quote">On 21 September 2012 21:30, Daniel P. Berrange <span dir="ltr"><<a href="mailto:berrange@redhat.com" target="_blank">berrange@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im">On Fri, Sep 21, 2012 at 09:22:24PM +1000, Amos Shapira wrote:<br>
> Hello,<br>
><br>
> Is it possible to share a single host's Logical Volume among multiple local<br>
> KVM guests which mount it read-only?<br>
><br>
> I'm asking this because I have an idea to run multiple idential KVM guests<br>
> (they all have exactly the same software installed on them), booting them<br>
> from a shared local Logical Volume read-only root file system, or<br>
> alternatively let them share the bulk of the software (/usr, /opt, /lib)<br>
> from a common KVM host Logical volume.<br>
><br>
> Is this possible? All my searches so far failed to turn up anything like<br>
> this.<br>
<br>
</div>From the libvirt POV, there's nothing much todo except add <readonly/><br>
inside the <disk> element. This will ensure QEMU only gets given read<br>
permission on the disk backend. The important thing is to then make sure<br>
your guests actually mount the filesystem with the readonly flag.<br>
<div class="im"><br>
> Would it be possible using qcow2 instead of raw LV? If so - would it be<br>
> worth the performance hit of switching from LV to qcow2?<br>
<br>
</div>The type of backend storage doesn't really affect things if the<br>
disk is fully readonly.<br></blockquote><div><br>Thanks very much! That's very helpful to know.<br><br>Is this something that someone has already done before (booting multiple KVM guests from shared read-only root file system) or am I on my own with this?<br>

<br>Cheers,<br><br>--Amos<br>
</div></div></div>