From: John Snow <jsnow@redhat.com>
To: Craig Mull <cmull@us.ibm.com>
Cc: qemu-devel@nongnu.org, Qemu-block <qemu-block@nongnu.org>,
Leo Luan <leoluan@us.ibm.com>
Subject: Re: Qemu Dirty Bitmap backup to encrypted target
Date: Mon, 30 Sep 2019 20:24:30 -0400 [thread overview]
Message-ID: <facf5e37-18e0-7de5-09cf-a088f471d8ad@redhat.com> (raw)
In-Reply-To: <OFADB7E923.8BF08D6B-ON00258485.0069D537-00258485.006AC672@notes.na.collabserv.com>
On 9/30/19 3:26 PM, Craig Mull wrote:
> How can have QEMU backup write the output to an encrypted target?
>
> Blocks in the dirty bitmap are unencrypted, and as such when I write
> them with QEMU backup they are written to the target unencrypted.
>
> I've experimented with providing a json string as the target but with no
> luck.
>
>
> transaction='{ "execute": "transaction",
>
> "arguments": {
>
> "actions": [
>
> {"type": "block-dirty-bitmap-add",
>
> "data": {"node": "drive-virtio-disk0", "granularity": 2097152,
> "name": "mybitmap"} },
>
> {"type": "drive-backup",
>
> "data": {"device": "drive-virtio-disk0", "target":
> "json:{\"encrypt.format\": \"luks\", \"encrypt.key-secret\":
> \"virtio-disk0-luks-secret0\", \"driver\": \"qcow2\", \"file\":
> {\"driver\": \"file\", \"filename\": \"/tmp/target-encrypt-test.qcow2\"}}",
>
> "sync": "full", "format": "qcow2"} }
>
> ]
>
> }
>
> }'
>
>
>
> virsh -c qemu:///system qemu-monitor-command --pretty 28 $transaction
>
>
>
> {
>
> "id": "libvirt-45",
>
> "error": {
>
> "class": "GenericError",
>
> "desc": "Unknown protocol 'json'"
>
> }
>
> }
>
>
I'll be honest, I'm not very good at the json specifications and don't
really know when they're appropriate to use. At the basic level,
drive-backup expects a filename. Sometimes the filename can get fancy,
but... I stay away from that.
Try using qmp-blockdev-create to create the target node instead, and
then using blockdev-backup to backup to that target.
--js
next prev parent reply other threads:[~2019-10-01 0:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-30 19:26 Qemu Dirty Bitmap backup to encrypted target Craig Mull
2019-10-01 0:24 ` John Snow [this message]
2019-10-01 8:45 ` Kevin Wolf
2019-10-01 11:43 ` Peter Krempa
2019-10-02 11:35 ` Craig Mull
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=facf5e37-18e0-7de5-09cf-a088f471d8ad@redhat.com \
--to=jsnow@redhat.com \
--cc=cmull@us.ibm.com \
--cc=leoluan@us.ibm.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).