qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [libvirt] Regarding guest-file-write


From: Daniel P. Berrange
Subject: Re: [Qemu-devel] [libvirt] Regarding guest-file-write
Date: Tue, 24 Jun 2014 13:57:48 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

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:

> address@hidden ~]# 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 :|



reply via email to

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