From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: Sharing disks between two kvm guests Date: Fri, 20 Jun 2008 21:28:47 +0300 Message-ID: <485BF6DF.5030903@qumranet.com> References: <485B70E4.5030904@gmail.com> <485B8EAB.606@gmx.net> <485BA15D.3080309@gmail.com> <90eb1dc70806200707k4e08c4d7s41708fc9f84c2a3c@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: carlopmart , kvm@vger.kernel.org To: Javier Guerra Return-path: Received: from il.qumranet.com ([212.179.150.194]:23467 "EHLO il.qumranet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753022AbYFTS2s (ORCPT ); Fri, 20 Jun 2008 14:28:48 -0400 In-Reply-To: <90eb1dc70806200707k4e08c4d7s41708fc9f84c2a3c@mail.gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: Javier Guerra wrote: > i tried this looong ago and didn't really work because there was some > userspace cache on each QEMU instance. but the -drive option has a > 'cache=off' setting that should be enough. > > in theory (i haven't tested, but Avi 'blessed' it): > - create a new image with qemu-img > - add it to the command line using -drive file=xxx,cache=off on both > KVM instances > - use a cluster filesystem! > This won't work with qcow images as metadata and allocation is not synchronized. Use raw images. cache=off is not strictly required, since the Linux pagecache will maintain coherency. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.