Re: How to detect if qemu supports discard?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Mar 09, 2014 at 03:23:25PM +0000, Richard W.M. Jones wrote:
> from src/qemu/qemu_command.c:
>
>     if (disk->discard) {
>         if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE_DISCARD)) {
>             virBufferAsprintf(&opt, ",discard=%s",
>                               virDomainDiskDiscardTypeToString(disk->discard));
>         } else {
>             virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
>                            _("discard is not supported by this QEMU binary"));
>             goto error;
>         }
>     }
>
> However there appears to be no way to tell programmatically if the
> qemu binary supports discard (ie. via libvirt).  Therefore libguestfs
> can never know when it is safe to use this option in the XML.
>

Many of these requests/issues are appearing lately.  Can we dump qemu
caps with normal capablities with e.g. "virsh capabilities --verbose"?
We have to keep the strings used consitent anyway since it's used in
migration data and so on.

Martin

> Rich.
>
> --
> Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
> libguestfs lets you edit virtual machines.  Supports shell scripting,
> bindings from many languages.  http://libguestfs.org
>
> --
> libvir-list mailing list
> libvir-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/libvir-list

Attachment: signature.asc
Description: Digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]