[libvirt] can not connect hypervisor using libvirt-0.9.11 on windows

xuteng xuteng at szjhkx.com
Fri Jun 15 05:56:18 UTC 2012


Hi,ALL:
   I compiled the libvirt-0.9.11 source code with mingw on windows according to the website:
        https://github.com/photron/msys_setup
   Then I wrote a simple test case ,as below:
   
#include <stdio.h>
#include <stdlib.h>
#include "libvirt/libvirt.h"

int main(int argc,char **argv)
{
  virConnectPtr conn;
  conn = virConnectOpen("qemu+tcp://192.168.1.6/system");
  if (conn = NULL)
  { 
    fprintf(stderr,"Failed to open connection to qemu+tcp://192.168.1.6/system");
    return 1;
  }
  virConnectClose(conn);
  return 0;
}

 When linked to the dll just compiled , it came out with error :

NOTE: you should run 'diskperf -y' to enable the disk statistics
libvir: RPC error : Unable to set close-on-exec flag: No such file or directory
libvir: error : invalid connection pointer in virConnectClose

 When using gdb to debug the testcase , break the function virConnectOpen , then step ,the error info was:
Program received signal ?,Unknown signal.
0x7c92e4ff in ntdll!LdrAlternateResourcesEnabled ()
from C:\WINDOWS.0\system32\ntdll.dll

Any suggestion would be appreciated !

Best Regards!








xuteng via foxmail
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120615/229fec05/attachment-0001.htm>


More information about the libvir-list mailing list