qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [Qemu-block] storing machine data in qcow images?


From: Eric Blake
Subject: Re: [Qemu-devel] [Qemu-block] storing machine data in qcow images?
Date: Tue, 5 Jun 2018 15:09:17 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0

On 06/05/2018 02:58 PM, Richard W.M. Jones wrote:
Binary blobs can always be base64 encoded for representation within
a valid JSON UTF-8 string (and we already have several QMP
interfaces that utilize base64 encoding to pass through what is
otherwise invalid UTF-8).  It does inflate things slightly compared
to a format that allows a raw length coupled with raw data, but that
is not necessarily a problem.

Of course how we represent them externally and/or while
using QMP / qemu-img to store and retrieve them is up for grabs.
Doesn't JSON allow binary to be encoded?  (Knowing how poorly
done JSON is, I wouldn't be surprised if not)

JSON itself does not have a binary primitive; to pass arbitrary data through JSON you have to first encode that data into something like base64 that can then be represented as a UTF-8 string. For reference, look at qapi/crypto.json and the definition of QCryptoSecretFormat.

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]