From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53652) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wv6Hg-00023E-Mt for qemu-devel@nongnu.org; Thu, 12 Jun 2014 10:47:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wv6Hf-00038X-NX for qemu-devel@nongnu.org; Thu, 12 Jun 2014 10:47:20 -0400 Received: from mail-qc0-x231.google.com ([2607:f8b0:400d:c01::231]:43764) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wv6Hf-00038Q-Iq for qemu-devel@nongnu.org; Thu, 12 Jun 2014 10:47:19 -0400 Received: by mail-qc0-f177.google.com with SMTP id i17so2033831qcy.22 for ; Thu, 12 Jun 2014 07:47:19 -0700 (PDT) MIME-Version: 1.0 Date: Thu, 12 Jun 2014 20:17:18 +0530 Message-ID: From: Puneet Bakshi Content-Type: multipart/alternative; boundary=001a113a806e3fe43804fba4a338 Subject: [Qemu-devel] [QEMU guest agent] How to transfer file from host to guest and do some operation on that List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --001a113a806e3fe43804fba4a338 Content-Type: text/plain; charset=UTF-8 Adding subject. On Thu, Jun 12, 2014 at 8:15 PM, Puneet Bakshi wrote: > Hi, > > I want to be able to install RPM packages (available in host system at > some path) to the online guest VM and want this facility to be available as > a tool. > > I am thinking of having a gemu guest agent (qemu-ga) running inside guest > VM. I did not find any available command ("virsh qemu-agent-command > ...") which can do the same. > > I am planning to implement a command in qemu guest agent, which I can > invoke from virsh like below. > > "virsh qemu-agent-command vm_01 \ > '{"execute":"guest-rpm- > install", \ > "arguments":{"path":"/usr/local/bin/ABC.rpm"}} > > I am able to pass arguments from host to guest VM but how am I supposed to > pass the whole RPM image from host to guest (which the guest agent can > receive and install)? > > Basically, I want to know how can we do following in QEMU environment. > > 1. take some bulky file from host to guest > 2. perform some operation on that file > 3. get the result of that operation. > > Regards, > ~Puneet > --001a113a806e3fe43804fba4a338 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Adding subject.


=
On Thu, Jun 12, 2014 at 8:15 PM, Puneet Bakshi <= span dir=3D"ltr"><bakshi.puneet@gmail.com> wrote:
Hi,

I want to be able to install RPM packages = (available in host=20 system at some path) to the online guest VM and want this facility to be=20 available as a tool.

I am thinking of having a gemu guest agent (qemu-ga) running inside=20 guest VM. I did not find any available command ("virsh=20 qemu-agent-command <guest_vm> ...") which can do the same.
I am planning to implement a command in qemu guest agent, which I can inv= oke from virsh like below.

=C2=A0=C2=A0=C2=A0 "virsh qemu-agent-command vm_01=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 '{"execute":"guest-rpm-
install",= =C2=A0=C2=A0=C2=A0=C2=A0 \
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 "arguments":{"path":"/usr/local/bin/ABC.= rpm"}}
=C2=A0=C2=A0=C2=A0=C2=A0
I am able to pass arguments from host to guest= VM but how am I=20 supposed to pass the whole RPM image from host to guest (which the guest agent can receive and install)?

Basically, I want to kno= w how can we do following in QEMU environment.

=C2=A0=C2=A0=C2=A0 1.= take some bulky file from host to guest
=C2=A0=C2=A0=C2=A0 2. perf= orm some operation on that file
=C2=A0=C2=A0=C2=A0 3. get the resu= lt of that operation.

Regards,
~Puneet

--001a113a806e3fe43804fba4a338-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52698) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WvQM7-0000WS-43 for qemu-devel@nongnu.org; Fri, 13 Jun 2014 08:13:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WvQM0-0006hE-86 for qemu-devel@nongnu.org; Fri, 13 Jun 2014 08:13:15 -0400 Received: from smtp.codeaurora.org ([198.145.11.231]:54178) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WvQM0-0006h5-2V for qemu-devel@nongnu.org; Fri, 13 Jun 2014 08:13:08 -0400 Message-ID: <539AEAD0.80808@codeaurora.org> Date: Fri, 13 Jun 2014 08:13:04 -0400 From: Christopher Covington MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [QEMU guest agent] How to transfer file from host to guest and do some operation on that List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Puneet Bakshi Cc: qemu-devel@nongnu.org On 06/12/2014 10:47 AM, Puneet Bakshi wrote: > Adding subject. > > > On Thu, Jun 12, 2014 at 8:15 PM, Puneet Bakshi > wrote: > > Hi, > > I want to be able to install RPM packages (available in host system at > some path) to the online guest VM and want this facility to be available > as a tool. > > I am thinking of having a gemu guest agent (qemu-ga) running inside guest > VM. I did not find any available command ("virsh qemu-agent-command > ...") which can do the same. > > I am planning to implement a command in qemu guest agent, which I can > invoke from virsh like below. > > "virsh qemu-agent-command vm_01 \ > '{"execute":"guest-rpm- > install", \ > "arguments":{"path":"/usr/local/bin/ABC.rpm"}} > > I am able to pass arguments from host to guest VM but how am I supposed to > pass the whole RPM image from host to guest (which the guest agent can > receive and install)? > > Basically, I want to know how can we do following in QEMU environment. > > 1. take some bulky file from host to guest > 2. perform some operation on that file > 3. get the result of that operation. I like the VirtIO-9P passthrough filesystem for accessing host files from the guest. http://www.linux-kvm.org/page/9p_virtio (On ARM I've also used Angel semihosting, but you have to rip out some security checks to get it to work from userspace.) Christopher -- Employee of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation.