From: "Daniel P. Berrange" <berrange@redhat.com>
To: Puneet Bakshi <bakshi.puneet@gmail.com>
Cc: libvir-list@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [libvirt] Regarding guest-file-write
Date: Tue, 24 Jun 2014 13:57:48 +0100 [thread overview]
Message-ID: <20140624125748.GJ17163@redhat.com> (raw)
In-Reply-To: <CALBPQ30kTRjnHdAJ-i4FqkNfqKRpPdz0rJ7c5KTCC+S+-3kvYg@mail.gmail.com>
On Tue, Jun 24, 2014 at 06:20:16PM +0530, Puneet Bakshi wrote:
> Hi,
>
> >From host, I wrote 26 alphabets in guest file (/tmp/testqga) using
> guest-file-write guest agent command (logs pasted below). I faced 2 issues
> when doing that.
>
> 1a. It could wrote only 18bytes! Why could it not write all 26 characters?
> Are we supposed to track how much data is written and need to resend the
> remaining one?
>
> 1b. What is the limit of data, I can send in one guest-file-write command?
>
> 2. In the guest, file data seems to be different. Am I doing something
> wrong here?
Yes, the command does not take raw data, it takes base-64 encoded data.
So those 26 characters you specified were base64 decoded which gives
you 18 bytes of raw data.
The clue is in the variable name 'buf-b64' - a shorthand for base64:
> [root@sdsr720-14 ~]# virsh qemu-agent-command vm_04 '{"
> execute":"guest-file-write",
> "arguments":{"handle":1000,"buf-b64":"abcdefghijklmnopqrstuvwxyz"}}'
>
> {"return":{"count":18,"eof":false}}
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
next prev parent reply other threads:[~2014-06-24 12:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-24 12:50 [Qemu-devel] Regarding guest-file-write Puneet Bakshi
2014-06-24 12:57 ` Daniel P. Berrange [this message]
2014-06-24 13:10 ` [Qemu-devel] [libvirt] " Puneet Bakshi
2014-06-24 15:34 ` Eric Blake
2014-06-24 15:32 ` [Qemu-devel] " Eric Blake
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=20140624125748.GJ17163@redhat.com \
--to=berrange@redhat.com \
--cc=bakshi.puneet@gmail.com \
--cc=libvir-list@redhat.com \
--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 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.