From: Hailiang Zhang <zhang.zhanghailiang@huawei.com>
To: qemu-devel@nongnu.org, stefanha@gmail.com, libvir-list@redhat.com
Cc: xuquan8@huawei.com, qemu block <qemu-block@nongnu.org>,
stefanha@redhat.com, armbru@redhat.com, kwolf@redhat.com,
wencongyang2@huawei.com, "Dong, Eddie" <eddie.dong@intel.com>,
xiecl.fnst@cn.fujitsu.com, zhangchen.fnst@cn.fujitsu.com
Subject: [Qemu-devel] [Block Replication] Question about supporting COLO in libvirt
Date: Mon, 6 Feb 2017 20:34:28 +0800 [thread overview]
Message-ID: <58986D54.8030002@huawei.com> (raw)
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.
Another way is to convert these command line options in QEMU totally,
I mean hidden the descriptions of 'active_disk' and 'hidden_disk' disks.
Create/add them dynamicly by qmp commands while users want to make VM goes
into COLO state. That's just like to support live image clone in QEMU.
Any ideas ?
Thanks,
Hailiang
next reply other threads:[~2017-02-06 12:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-06 12:34 Hailiang Zhang [this message]
2017-02-06 12:39 ` [Qemu-devel] [libvirt] [Block Replication] Question about supporting COLO in libvirt Daniel P. Berrange
2017-02-08 8:36 ` Hailiang Zhang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=58986D54.8030002@huawei.com \
--to=zhang.zhanghailiang@huawei.com \
--cc=armbru@redhat.com \
--cc=eddie.dong@intel.com \
--cc=kwolf@redhat.com \
--cc=libvir-list@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
--cc=stefanha@redhat.com \
--cc=wencongyang2@huawei.com \
--cc=xiecl.fnst@cn.fujitsu.com \
--cc=xuquan8@huawei.com \
--cc=zhangchen.fnst@cn.fujitsu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.