All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [Block Replication] Question about supporting COLO in libvirt
@ 2017-02-06 12:34 Hailiang Zhang
  2017-02-06 12:39 ` [Qemu-devel] [libvirt] " Daniel P. Berrange
  0 siblings, 1 reply; 3+ messages in thread
From: Hailiang Zhang @ 2017-02-06 12:34 UTC (permalink / raw)
  To: qemu-devel, stefanha, libvir-list
  Cc: xuquan8, qemu block, stefanha, armbru, kwolf, wencongyang2, Dong,
	Eddie, xiecl.fnst, zhangchen.fnst

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [libvirt] [Block Replication] Question about supporting COLO in libvirt
  2017-02-06 12:34 [Qemu-devel] [Block Replication] Question about supporting COLO in libvirt Hailiang Zhang
@ 2017-02-06 12:39 ` Daniel P. Berrange
  2017-02-08  8:36   ` Hailiang Zhang
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel P. Berrange @ 2017-02-06 12:39 UTC (permalink / raw)
  To: Hailiang Zhang
  Cc: qemu-devel, stefanha, libvir-list, kwolf, xuquan8, xiecl.fnst,
	zhangchen.fnst, qemu block, wencongyang2, Dong, Eddie, stefanha

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

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [libvirt] [Block Replication] Question about supporting COLO in libvirt
  2017-02-06 12:39 ` [Qemu-devel] [libvirt] " Daniel P. Berrange
@ 2017-02-08  8:36   ` Hailiang Zhang
  0 siblings, 0 replies; 3+ messages in thread
From: Hailiang Zhang @ 2017-02-08  8:36 UTC (permalink / raw)
  To: Daniel P. Berrange
  Cc: xuquan8, qemu-devel, stefanha, libvir-list, kwolf, xiecl.fnst,
	zhangchen.fnst, qemu block, wencongyang2, Dong, Eddie, stefanha

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
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-02-08  8:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-06 12:34 [Qemu-devel] [Block Replication] Question about supporting COLO in libvirt Hailiang Zhang
2017-02-06 12:39 ` [Qemu-devel] [libvirt] " Daniel P. Berrange
2017-02-08  8:36   ` Hailiang Zhang

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.