qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Guido Günther" <agx@sigxcpu.org>
To: "Daniel P. Berrange" <berrange@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Add guest-get-hostname to retrieve the guests current hostname
Date: Fri, 24 Aug 2012 17:31:49 +0200	[thread overview]
Message-ID: <20120824153149.GA12023@bogon.sigxcpu.org> (raw)
In-Reply-To: <20120822083202.GB22908@redhat.com>

On Wed, Aug 22, 2012 at 09:32:02AM +0100, Daniel P. Berrange wrote:
> On Wed, Aug 22, 2012 at 10:04:33AM +0200, Guido Günther wrote:
> > On Tue, Aug 21, 2012 at 07:31:17PM +0100, Daniel P. Berrange wrote:
> > > On Tue, Aug 21, 2012 at 01:57:54PM +0200, Guido Günther wrote:
> > [..snip..]
> > > 
> > > Why no impl ?  Winsock has the gethostname() API too
> > > 
> > > $ grep gethostname /usr/i686-w64-mingw32/sys-root/mingw/include/*.h
> > > /usr/i686-w64-mingw32/sys-root/mingw/include/winsock2.h:  WINSOCK_API_LINKAGE int WSAAPI gethostname(char *name,int namelen);
> > 
> > This was mostly due to the lack of a test system. Are there any pointers
> > on how to cross compile qemu-qa for Windows?
> 
> Assuming you have the Mingw64 toolchain installed, then compilation is just
> a case of passing the --cross-prefix arg to configure. eg on Fedora 17 I
> would do:
> 
>   ./configure --target-list=x86_64-softmmu --cross-prefix=i686-w64-mingw32-
> 
> which causes it to use  i686-w64-mingw32-gcc as the compiler

That helped! I had to additionally install

mingw32-pkg-config mingw32-zlib mingw32-glib2

to cross build qemu-ga. Howver running this on a win7-pro evaluation
version I get:

.\qemu-ga

<timestamp>: critical: error opening path
<timestamp>: critical: error opening channel
<timestamp>: critical: failed to create guest agent channel
<timestamp>: critical: failed to initialize guest agent channel

qemu-ga is current git while the host is qemu-kvm 1.1.0. The virtio
serial driver is installed in the guest but running the test program
gives errors as well:

.\VIOSER-TEST
Running in non blocking mode.
Cannot find vioserial device \\?\.\{<uuid>}#vioserialport#... , error 5

Libvirt creates the guest agent channel via:

  <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/win7-32.agent'/>
      <target type='virtio' name='org.qemu.guest_agent.0'/>
      <alias name='channel0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
  </channel>

While the same works well with linux guests. Any ideas what I'm missing
on the Windows side?
Cheers,
 -- Guido

> 
> 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	other threads:[~2012-08-24 15:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-21 11:57 [Qemu-devel] [PATCH] Add guest-get-hostname to retrieve the guests current hostname Guido Günther
2012-08-21 18:31 ` Daniel P. Berrange
2012-08-22  8:04   ` Guido Günther
2012-08-22  8:32     ` Daniel P. Berrange
2012-08-24 15:31       ` Guido Günther [this message]
2012-08-21 19:16 ` Eric Blake
2012-08-23 12:48 ` Luiz Capitulino
2012-08-23 14:08   ` 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=20120824153149.GA12023@bogon.sigxcpu.org \
    --to=agx@sigxcpu.org \
    --cc=berrange@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).