qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] Add guest-get-hostname to retrieve the guests c


From: Guido Günther
Subject: Re: [Qemu-devel] [PATCH] Add guest-get-hostname to retrieve the guests current hostname
Date: Fri, 24 Aug 2012 17:31:49 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

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 via email to

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