qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Michael Roth <mdroth@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: ghammer@redhat.com, aliguori@us.ibm.com
Subject: [Qemu-devel] qemu-ga: add support for Windows
Date: Mon, 23 Jan 2012 08:21:38 -0600	[thread overview]
Message-ID: <1327328505-31106-1-git-send-email-mdroth@linux.vnet.ibm.com> (raw)

These patches apply/work on top of:
[PATCH] qemu-ga: Add schema documentation for types
[PATCH] qemu-ga: add guest-set-support-level command
[PATCH] main-loop: Fix SetEvent() on uninitialized handle on win32
[PATCH] main-loop: For tools, initialize timers as part of qemu_init_main_loop()

And can also be obtained from:
git://github.com/mdroth/qemu.git qga-win32-v1

These patches add support for Windows to the QEMU guest agent. With these
patches the following guest agent commands are supported on Windows:

guest-ping
guest-info
guest-sync
guest-shutdown

The guest-file* commands can essentially be enabled for Windows as-is, but since
mingw does not honor the O_NONBLOCK flag, they'll need to be reworked if we're
to retain the current non-blocking behavior.

The rest of the commands are currently stubbed out for Windows (qemu-ga will
return an "unsupported" error), but it should be easy to implement these going
forward with basic Windows support/infrastructure in place.

The build was tested using Fedora 15 with a MinGW cross-build target via:

    configure --enable-guest-agent --cross-prefix=i686-pc-mingw32-
    make qemu-ga.exe

The executable was tested using Windows XP SP3, and partially tested using
Windows Server 2008 and Windows 7 (no I/O for the latter 2, having issues with
virtio-win drivers atm). GLib 2.28+ for Windows is required. You can install
qemu-ga as a start-on-boot service by running:

    ./qemu-ga --service install

And start/stop manually via:

    net start qemu-ga
    net stop qemu-ga

Many thanks to Gal Hammer for contributing the service integration and shutdown
code.

 Makefile.objs              |    8 +-
 configure                  |    2 +-
 qemu-ga.c                  |  413 ++++++++++++++-----------------
 qga/channel-posix.c        |  246 ++++++++++++++++++
 qga/channel-win32.c        |  337 +++++++++++++++++++++++++
 qga/channel.h              |   33 +++
 qga/commands-posix.c       |  528 ++++++++++++++++++++++++++++++++++++++
 qga/commands-win32.c       |  130 ++++++++++
 qga/commands.c             |   86 +++++++
 qga/guest-agent-commands.c |  598 --------------------------------------------
 qga/guest-agent-core.h     |    3 +-
 qga/service-win32.c        |  114 +++++++++
 qga/service-win32.h        |   30 +++
 14 files changed, 1698 insertions(+), 832 deletions(-)

             reply	other threads:[~2012-01-23 14:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-23 14:21 Michael Roth [this message]
2012-01-23 14:21 ` [Qemu-devel] [PATCH 1/7] qemu-ga: move channel/transport functionality into wrapper class Michael Roth
2012-01-23 20:24   ` Anthony Liguori
2012-01-23 20:39     ` Anthony Liguori
2012-01-23 20:56     ` Michael Roth
2012-01-23 14:21 ` [Qemu-devel] [PATCH 2/7] qemu-ga: separate out common commands from posix-specific ones Michael Roth
2012-01-23 14:21 ` [Qemu-devel] [PATCH 3/7] qemu-ga: rename guest-agent-commands.c -> commands-posix.c Michael Roth
2012-01-23 14:21 ` [Qemu-devel] [PATCH 4/7] qemu-ga: fixes for win32 build of qemu-ga Michael Roth
2012-01-23 14:21 ` [Qemu-devel] [PATCH 5/7] qemu-ga: add initial win32 support Michael Roth
2012-01-23 14:21 ` [Qemu-devel] [PATCH 6/7] qemu-ga: add Windows service integration Michael Roth
2012-01-23 14:21 ` [Qemu-devel] [PATCH 7/7] qemu-ga: add win32 guest-shutdown command Michael Roth

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=1327328505-31106-1-git-send-email-mdroth@linux.vnet.ibm.com \
    --to=mdroth@linux.vnet.ibm.com \
    --cc=aliguori@us.ibm.com \
    --cc=ghammer@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 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).