From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50036) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cbNkX-00056f-Lv for qemu-devel@nongnu.org; Wed, 08 Feb 2017 03:37:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cbNkW-0002uq-Co for qemu-devel@nongnu.org; Wed, 08 Feb 2017 03:37:13 -0500 References: <58986D54.8030002@huawei.com> <20170206123938.GM3029@redhat.com> From: Hailiang Zhang Message-ID: <589AD897.7090406@huawei.com> Date: Wed, 8 Feb 2017 16:36:39 +0800 MIME-Version: 1.0 In-Reply-To: <20170206123938.GM3029@redhat.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [libvirt] [Block Replication] Question about supporting COLO in libvirt List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: xuquan8@huawei.com, qemu-devel@nongnu.org, stefanha@gmail.com, libvir-list@redhat.com, kwolf@redhat.com, xiecl.fnst@cn.fujitsu.com, zhangchen.fnst@cn.fujitsu.com, qemu block , wencongyang2@huawei.com, "Dong, Eddie" , stefanha@redhat.com On 2017/2/6 20:39, Daniel P. Berrange wrote: > On Mon, Feb 06, 2017 at 08:34:28PM +0800, Hailiang Zhang wrote: >> Hi, >> I'm trying to implement supporting COLO in libvirt, >> But i found an annoying problem that libvirt does not >> support the command line option argument syntax we used >> for block replication in QEMU. >> >> That is libvirt does not support the bellow syntax for block: >> -drive driver=qcow2,file.filename=test:a.qcow2 >> -drive file=test.qcow2,\ >> backing.file.filename=/dev/fdset/1 >> >> It seems to be a new syntax that libvirt does not support >> thought it has been exist in QEMU for a time. >> I found some introductions from >> http://www.linux-kvm.org/images/3/34/Kvm-forum-2013-block-dev-configuration.pdf >> >> The command line we use for COLO is just like the above syntax, >> For example, for the shared disk in COLO, it is: >> -drive if=none,driver=qcow2,file.filename=/mnt/ramfs/hidden_disk.img,id=hidden_disk0,\ >> backing.driver=raw,backing.file.filename=1.raw \ >> -drive if=virtio,id=active-disk0,driver=replication,mode=secondary,\ >> file.driver=qcow2,top-id=active-disk0,\ >> file.file.filename=/mnt/ramfs/active_disk.img,\ >> file.backing=hidden_disk0,shared-disk=on >> >> For the none-shared disk in COLO, it is quite same with the shared-disk: >> -drive if=none,driver=raw,file.filename=1.raw,id=colo1 \ >> -drive if=xxx,id=topxxx,driver=replication,mode=secondary,top-id=topxxx\ >> file.file.filename=active_disk.qcow2,\ >> file.driver=qcow2,\ >> file.backing.file.filename=hidden_disk.qcow2,\ >> file.backing.driver=qcow2,\ >> file.backing.backing=colo1 >> >> So there seems to be two ways to solve this problem. >> >> One is to support this new option argument syntax in libvirt, >> but I'm not sure if it is difficult or not to implement it, >> and i don't know where to start either. > > Libvirt has to start supporting this new syntax. It is required for > many different use cases beyond just colo. For example, to be able > to explicitly given qemu details about a backing file format to > remove probing, or to be able to set LUKS passwords on backing files, > and more beside > Thanks for your quick reply, do you or other developers in libvirt have plan to implement it ? Thanks, Hailiang > Regards, > Daniel >