[fedora-virt] virt-viewer windows port

anuj rampal rampal.anuj at gmail.com
Wed Sep 30 15:32:59 UTC 2009


Hi,

> 11:35:01.672: debug : initialise_gnutls:1099 : loading CA file
> /usr/i686-pc-ming
> w32/sys-root/mingw/etc/pki/CA/cacert.pem
> 11:35:01.677: debug : initialise_gnutls:1112 : loading client cert and key
> from
> files /usr/i686-pc-mingw32/sys-root/mingw/etc/pki/libvirt/clientcert.pem
and
> /us
> r/i686-pc-mingw32/sys-root/mingw/etc/pki/libvirt/private/clientkey.pem
> 11:35:01.697: debug : do_open:1017 : driver 2 remote returned ERROR
On windows virt-viewer take these from certificates for
"Z:\usr\i686-pc-mingw32\sys-root\mingw\etc\pki" which i guess is hardcoded
in the code...(dont know y)
i tried "./configure --sysconfdir=C:\pki\"
but this didnot work...

the certificates that i user here have to be correct because.. these
certificates are the same when i connect from a different linux machine
there i dont get the ERROR message. but still nothing happens.

These are the results when i tried running virt-viewer using the following
URI:


1.
LIBVIRT_DEBUG=1 virt-viewer -c qemu://FC11-KVM/session 2

 result:
here i dont think there is an issue with the certificates:
what happens here is a small window pops up with the message "Conneting to
vnc server" thats it and then the message goes.

00:35:46.089: debug : virInitialize:279 : register drivers
00:35:46.090: debug : virRegisterDriver:776 : registering Test as driver 0
00:35:46.090: debug : virRegisterNetworkDriver:614 : registering Test as
network driver 0
00:35:46.090: debug : virRegisterInterfaceDriver:645 : registering Test as
interface driver 0
00:35:46.090: debug : virRegisterStorageDriver:676 : registering Test as
storage driver 0
00:35:46.090: debug : virRegisterDeviceMonitor:707 : registering Test as
device driver 0
00:35:46.090: debug : virRegisterSecretDriver:738 : registering Test as
secret driver 0
00:35:46.090: debug : virRegisterDriver:776 : registering OPENVZ as driver 1
00:35:46.091: debug : vboxRegister:101 : VBoxCGlueInit failed, using dummy
driver
00:35:46.091: debug : virRegisterDriver:776 : registering VBOX as driver 2
00:35:46.091: debug : virRegisterNetworkDriver:614 : registering VBOX as
network driver 1
00:35:46.092: debug : virRegisterStorageDriver:676 : registering VBOX as
storage driver 1
00:35:46.092: debug : virRegisterDriver:776 : registering ESX as driver 3
00:35:46.092: debug : virRegisterDriver:776 : registering remote as driver 4
00:35:46.092: debug : virRegisterNetworkDriver:614 : registering remote as
network driver 2
00:35:46.092: debug : virRegisterInterfaceDriver:645 : registering remote as
interface driver 1
00:35:46.092: debug : virRegisterStorageDriver:676 : registering remote as
storage driver 2
00:35:46.092: debug : virRegisterDeviceMonitor:707 : registering remote as
device driver 1
00:35:46.092: debug : virRegisterSecretDriver:738 : registering remote as
secret driver 1
00:35:46.093: debug : virConnectOpenAuth:1273 :
name=qemu://FC11-KVM/session, auth=0xbfce11c8, flags=1
00:35:46.093: debug : do_open:1042 : name "qemu://FC11-KVM/session" to URI
components:
  scheme qemu
  opaque (null)
  authority (null)
  server FC11-KVM
  user (null)
  port 0
  path /session
00:35:46.094: debug : do_open:1052 : trying driver 0 (Test) ...
00:35:46.094: debug : do_open:1058 : driver 0 Test returned DECLINED
00:35:46.094: debug : do_open:1052 : trying driver 1 (OPENVZ) ...
00:35:46.094: debug : do_open:1058 : driver 1 OPENVZ returned DECLINED
00:35:46.094: debug : do_open:1052 : trying driver 2 (VBOX) ...
00:35:46.094: debug : do_open:1058 : driver 2 VBOX returned DECLINED
00:35:46.095: debug : do_open:1052 : trying driver 3 (ESX) ...
00:35:46.095: debug : do_open:1058 : driver 3 ESX returned DECLINED
00:35:46.095: debug : do_open:1052 : trying driver 4 (remote) ...
00:35:46.095: debug : doRemoteOpen:535 : proceeding with name =
qemu:///session
00:35:46.099: debug : initialise_gnutls:1101 : loading CA file
//etc/pki/CA/cacert.pem
00:35:46.107: debug : initialise_gnutls:1114 : loading client cert and key
from files //etc/pki/libvirt/clientcert.pem and
//etc/pki/libvirt/private/clientkey.pem
00:35:46.213: debug : remoteIO:7421 : Do proc=66 serial=0 length=28
wait=(nil)
00:35:46.213: debug : remoteIO:7483 : We have the buck 66 0xb7d2f008
0xb7d2f008
00:35:46.215: debug : remoteIODecodeMessageLength:7032 : Got length, now
need 64 total (60 more)
00:35:46.215: debug : remoteIOEventLoop:7347 : Giving up the buck 66
0xb7d2f008 (nil)
00:35:46.216: debug : remoteIO:7514 : All done with our call 66 (nil)
0xb7d2f008
00:35:46.216: debug : remoteIO:7421 : Do proc=1 serial=1 length=56
wait=(nil)
00:35:46.216: debug : remoteIO:7483 : We have the buck 1 0xa07f620 0xa07f620
00:35:46.217: debug : remoteIODecodeMessageLength:7032 : Got length, now
need 56 total (52 more)
00:35:46.217: debug : remoteIOEventLoop:7347 : Giving up the buck 1
0xa07f620 (nil)
00:35:46.218: debug : remoteIO:7514 : All done with our call 1 (nil)
0xa07f620
00:35:46.218: debug : doRemoteOpen:850 : Adding Handler for remote events
00:35:46.218: debug : doRemoteOpen:860 : Adding Timeout for remote event
queue flushing
00:35:46.218: debug : do_open:1058 : driver 4 remote returned SUCCESS
00:35:46.218: debug : do_open:1078 : network driver 0 Test returned DECLINED
00:35:46.218: debug : do_open:1078 : network driver 1 VBOX returned DECLINED
00:35:46.218: debug : do_open:1078 : network driver 2 remote returned
SUCCESS
00:35:46.218: debug : do_open:1097 : interface driver 0 Test returned
DECLINED
00:35:46.218: debug : do_open:1097 : interface driver 1 remote returned
SUCCESS
00:35:46.218: debug : do_open:1117 : storage driver 0 Test returned DECLINED
00:35:46.219: debug : do_open:1117 : storage driver 1 VBOX returned DECLINED
00:35:46.219: debug : do_open:1117 : storage driver 2 remote returned
SUCCESS
00:35:46.219: debug : do_open:1137 : node driver 0 Test returned DECLINED
00:35:46.219: debug : do_open:1137 : node driver 1 remote returned SUCCESS
00:35:46.219: debug : do_open:1164 : secret driver 0 Test returned DECLINED
00:35:46.219: debug : do_open:1164 : secret driver 1 remote returned SUCCESS
00:35:46.281: debug : virDomainLookupByID:1739 : conn=0xa051928, id=2
00:35:46.282: debug : remoteIO:7421 : Do proc=22 serial=2 length=32
wait=(nil)
00:35:46.282: debug : remoteIO:7483 : We have the buck 22 0xa17fa00
0xa17fa00
00:35:46.283: debug : remoteIODecodeMessageLength:7032 : Got length, now
need 92 total (88 more)
00:35:46.283: debug : remoteIOEventLoop:7347 : Giving up the buck 22
0xa17fa00 (nil)
00:35:46.284: debug : remoteIO:7514 : All done with our call 22 (nil)
0xa17fa00
00:35:46.284: debug : virGetDomain:343 : New hash entry 0xa17cfd8
00:35:46.284: debug : virDomainGetInfo:2732 : domain=0xa17cfd8,
info=0xbfce1140
00:35:46.285: debug : remoteIO:7421 : Do proc=16 serial=3 length=64
wait=(nil)
00:35:46.285: debug : remoteIO:7483 : We have the buck 16 0xa17fa00
0xa17fa00
00:35:46.287: debug : remoteIODecodeMessageLength:7032 : Got length, now
need 88 total (84 more)
00:35:46.287: debug : remoteIOEventLoop:7347 : Giving up the buck 16
0xa17fa00 (nil)
00:35:46.287: debug : remoteIO:7514 : All done with our call 16 (nil)
0xa17fa00
00:35:46.287: debug : virDomainGetXMLDesc:2780 : domain=0xa17cfd8, flags=0
00:35:46.287: debug : remoteIO:7421 : Do proc=14 serial=4 length=68
wait=(nil)
00:35:46.287: debug : remoteIO:7483 : We have the buck 14 0xa17fa00
0xa17fa00
00:35:46.290: debug : remoteIODecodeMessageLength:7032 : Got length, now
need 1296 total (1292 more)
00:35:46.290: debug : remoteIOEventLoop:7347 : Giving up the buck 14
0xa17fa00 (nil)
00:35:46.290: debug : remoteIO:7514 : All done with our call 14 (nil)
0xa17fa00
00:35:46.291: debug : virDomainGetName:2431 : domain=0xa17cfd8
00:35:46.291: debug : virDomainFree:1969 : domain=0xa17cfd8
00:35:46.291: debug : virUnrefDomain:420 : unref domain 0xa17cfd8 CloneWinXp
1
00:35:46.292: debug : virReleaseDomain:374 : release domain 0xa17cfd8
CloneWinXp
00:35:46.292: debug : virReleaseDomain:390 : unref connection 0xa051928 2
00:35:46.292: debug : virConnectDomainEventRegister:8637 : conn=0xa051928,
cb=0x804d1e0, opaque=0xa056468, freecb=(nil)
00:35:46.292: debug : remoteIO:7421 : Do proc=105 serial=5 length=28
wait=(nil)
00:35:46.292: debug : remoteIO:7483 : We have the buck 105 0xa1c0730
0xa1c0730
00:35:46.294: debug : remoteIODecodeMessageLength:7032 : Got length, now
need 60 total (56 more)
00:35:46.294: debug : remoteIOEventLoop:7347 : Giving up the buck 105
0xa1c0730 (nil)
00:35:46.294: debug : remoteIO:7514 : All done with our call 105 (nil)
0xa1c0730


 2.
LIBVIRT_DEBUG=1 virt-viewer -c qemu+tcp://FC11-KVM/session 2

result:
same thing happens here. the window pops up and goes.

00:34:48.829: debug : virInitialize:279 : register drivers
00:34:48.830: debug : virRegisterDriver:776 : registering Test as driver 0
00:34:48.830: debug : virRegisterNetworkDriver:614 : registering Test as
network driver 0
00:34:48.830: debug : virRegisterInterfaceDriver:645 : registering Test as
interface driver 0
00:34:48.830: debug : virRegisterStorageDriver:676 : registering Test as
storage driver 0
00:34:48.830: debug : virRegisterDeviceMonitor:707 : registering Test as
device driver 0
00:34:48.830: debug : virRegisterSecretDriver:738 : registering Test as
secret driver 0
00:34:48.830: debug : virRegisterDriver:776 : registering OPENVZ as driver 1
00:34:48.830: debug : vboxRegister:101 : VBoxCGlueInit failed, using dummy
driver
00:34:48.830: debug : virRegisterDriver:776 : registering VBOX as driver 2
00:34:48.830: debug : virRegisterNetworkDriver:614 : registering VBOX as
network driver 1
00:34:48.830: debug : virRegisterStorageDriver:676 : registering VBOX as
storage driver 1
00:34:48.830: debug : virRegisterDriver:776 : registering ESX as driver 3
00:34:48.831: debug : virRegisterDriver:776 : registering remote as driver 4
00:34:48.831: debug : virRegisterNetworkDriver:614 : registering remote as
network driver 2
00:34:48.831: debug : virRegisterInterfaceDriver:645 : registering remote as
interface driver 1
00:34:48.831: debug : virRegisterStorageDriver:676 : registering remote as
storage driver 2
00:34:48.831: debug : virRegisterDeviceMonitor:707 : registering remote as
device driver 1
00:34:48.831: debug : virRegisterSecretDriver:738 : registering remote as
secret driver 1
00:34:48.831: debug : virConnectOpenAuth:1273 :
name=qemu+tcp://FC11-KVM/session, auth=0xbfc34918, flags=1
00:34:48.831: debug : do_open:1042 : name "qemu+tcp://FC11-KVM/session" to
URI components:
  scheme qemu+tcp
  opaque (null)
  authority (null)
  server FC11-KVM
  user (null)
  port 0
  path /session
00:34:48.831: debug : do_open:1052 : trying driver 0 (Test) ...
00:34:48.831: debug : do_open:1058 : driver 0 Test returned DECLINED
00:34:48.831: debug : do_open:1052 : trying driver 1 (OPENVZ) ...
00:34:48.831: debug : do_open:1058 : driver 1 OPENVZ returned DECLINED
00:34:48.831: debug : do_open:1052 : trying driver 2 (VBOX) ...
00:34:48.831: debug : do_open:1058 : driver 2 VBOX returned DECLINED
00:34:48.831: debug : do_open:1052 : trying driver 3 (ESX) ...
00:34:48.831: debug : do_open:1058 : driver 3 ESX returned DECLINED
00:34:48.831: debug : do_open:1052 : trying driver 4 (remote) ...
00:34:48.831: debug : doRemoteOpen:535 : proceeding with name =
qemu:///session
00:34:48.835: debug : remoteIO:7421 : Do proc=66 serial=0 length=28
wait=(nil)
00:34:48.835: debug : remoteIO:7483 : We have the buck 66 0xb7c81008
0xb7c81008
00:34:48.838: debug : remoteIODecodeMessageLength:7032 : Got length, now
need 64 total (60 more)
00:34:48.838: debug : remoteIOEventLoop:7347 : Giving up the buck 66
0xb7c81008 (nil)
00:34:48.838: debug : remoteIO:7514 : All done with our call 66 (nil)
0xb7c81008
00:34:48.838: debug : remoteIO:7421 : Do proc=1 serial=1 length=56
wait=(nil)
00:34:48.839: debug : remoteIO:7483 : We have the buck 1 0x894e658 0x894e658
00:34:48.839: debug : remoteIODecodeMessageLength:7032 : Got length, now
need 56 total (52 more)
00:34:48.839: debug : remoteIOEventLoop:7347 : Giving up the buck 1
0x894e658 (nil)
00:34:48.839: debug : remoteIO:7514 : All done with our call 1 (nil)
0x894e658
00:34:48.839: debug : doRemoteOpen:850 : Adding Handler for remote events
00:34:48.839: debug : doRemoteOpen:860 : Adding Timeout for remote event
queue flushing
00:34:48.839: debug : do_open:1058 : driver 4 remote returned SUCCESS
00:34:48.839: debug : do_open:1078 : network driver 0 Test returned DECLINED
00:34:48.839: debug : do_open:1078 : network driver 1 VBOX returned DECLINED
00:34:48.839: debug : do_open:1078 : network driver 2 remote returned
SUCCESS
00:34:48.839: debug : do_open:1097 : interface driver 0 Test returned
DECLINED
00:34:48.839: debug : do_open:1097 : interface driver 1 remote returned
SUCCESS
00:34:48.839: debug : do_open:1117 : storage driver 0 Test returned DECLINED
00:34:48.839: debug : do_open:1117 : storage driver 1 VBOX returned DECLINED
00:34:48.839: debug : do_open:1117 : storage driver 2 remote returned
SUCCESS
00:34:48.839: debug : do_open:1137 : node driver 0 Test returned DECLINED
00:34:48.839: debug : do_open:1137 : node driver 1 remote returned SUCCESS
00:34:48.840: debug : do_open:1164 : secret driver 0 Test returned DECLINED
00:34:48.840: debug : do_open:1164 : secret driver 1 remote returned SUCCESS
00:34:48.907: debug : virDomainLookupByID:1739 : conn=0x8944928, id=2
00:34:48.907: debug : remoteIO:7421 : Do proc=22 serial=2 length=32
wait=(nil)
00:34:48.907: debug : remoteIO:7483 : We have the buck 22 0x8a50a00
0x8a50a00
00:34:48.908: debug : remoteIODecodeMessageLength:7032 : Got length, now
need 92 total (88 more)
00:34:48.909: debug : remoteIOEventLoop:7347 : Giving up the buck 22
0x8a50a00 (nil)
00:34:48.909: debug : remoteIO:7514 : All done with our call 22 (nil)
0x8a50a00
00:34:48.909: debug : virGetDomain:343 : New hash entry 0x8a4f3b0
00:34:48.909: debug : virDomainGetInfo:2732 : domain=0x8a4f3b0,
info=0xbfc34890
00:34:48.910: debug : remoteIO:7421 : Do proc=16 serial=3 length=64
wait=(nil)
00:34:48.910: debug : remoteIO:7483 : We have the buck 16 0x8a50a00
0x8a50a00
00:34:48.912: debug : remoteIODecodeMessageLength:7032 : Got length, now
need 88 total (84 more)
00:34:48.912: debug : remoteIOEventLoop:7347 : Giving up the buck 16
0x8a50a00 (nil)
00:34:48.912: debug : remoteIO:7514 : All done with our call 16 (nil)
0x8a50a00
00:34:48.912: debug : virDomainGetXMLDesc:2780 : domain=0x8a4f3b0, flags=0
00:34:48.912: debug : remoteIO:7421 : Do proc=14 serial=4 length=68
wait=(nil)
00:34:48.912: debug : remoteIO:7483 : We have the buck 14 0x8a50a00
0x8a50a00
00:34:48.914: debug : remoteIODecodeMessageLength:7032 : Got length, now
need 1296 total (1292 more)
00:34:48.914: debug : remoteIOEventLoop:7347 : Giving up the buck 14
0x8a50a00 (nil)
00:34:48.914: debug : remoteIO:7514 : All done with our call 14 (nil)
0x8a50a00
00:34:48.915: debug : virDomainGetName:2431 : domain=0x8a4f3b0
00:34:48.915: debug : virDomainFree:1969 : domain=0x8a4f3b0
00:34:48.915: debug : virUnrefDomain:420 : unref domain 0x8a4f3b0 CloneWinXp
1
00:34:48.915: debug : virReleaseDomain:374 : release domain 0x8a4f3b0
CloneWinXp
00:34:48.915: debug : virReleaseDomain:390 : unref connection 0x8944928 2
00:34:48.915: debug : virConnectDomainEventRegister:8637 : conn=0x8944928,
cb=0x804d1e0, opaque=0x8949468, freecb=(nil)
00:34:48.915: debug : remoteIO:7421 : Do proc=105 serial=5 length=28
wait=(nil)
00:34:48.915: debug : remoteIO:7483 : We have the buck 105 0x8a53850
0x8a53850
00:34:48.916: debug : remoteIODecodeMessageLength:7032 : Got length, now
need 60 total (56 more)
00:34:48.916: debug : remoteIOEventLoop:7347 : Giving up the buck 105
0x8a53850 (nil)
00:34:48.916: debug : remoteIO:7514 : All done with our call 105 (nil)
0x8a53850


When i tried these same commands on the same machine where the libvirtd is
running:

it works fine. with
qemu+tcp:///session 2

qemu:///session 2

i also tried to debug the virt-viewer-0.2.0 code.

the only thing that i could find out was that in src/main.c in function int
main(.....)

line 97 : gtk_main();

after reaching this line

1. On the same machine the code hangs and the vnc display is shown and i can
view my guest machine.

2. On the remote machine it doesnot stops here and comes out with the
message on the popup saying connecting to vnc server.


------------------------

On windows im still facing the problem with certificates because the same
certificates works on remote linux machine.

but using "qemu+tcp://FC11-KVM/session 2"... atlease a new window pops up
which does not respond...

Do we have to do any configuration on libvirtd to make virt-viewer to work
over tcp and tls because it works fine from a remote linux machine over ssh.

------------------------

has any1 have got any success running virt-viewer on windows...??

Regards
Anuj

On Fri, Sep 25, 2009 at 5:32 PM, Richard W.M. Jones <rjones at redhat.com>wrote:

> On Fri, Sep 25, 2009 at 11:57:35AM +0530, anuj rampal wrote:
> > Then i tried on my windows machine
> >
> > URI that i used:
> > virt-viewer.exe -c qemu://FC11-KVM/session 2
> >
> > and this is the result that i got:
> [...]
> > 11:35:01.672: debug : initialise_gnutls:1099 : loading CA file
> > /usr/i686-pc-ming
> > w32/sys-root/mingw/etc/pki/CA/cacert.pem
> > 11:35:01.677: debug : initialise_gnutls:1112 : loading client cert and
> key
> > from
> > files /usr/i686-pc-mingw32/sys-root/mingw/etc/pki/libvirt/clientcert.pem
> and
> > /us
> > r/i686-pc-mingw32/sys-root/mingw/etc/pki/libvirt/private/clientkey.pem
> > 11:35:01.697: debug : do_open:1017 : driver 2 remote returned ERROR
> > 11:35:01.698: debug : virUnrefConnect:232 : unref connection 0263B068 1
> > 11:35:01.700: debug : virReleaseConnect:191 : release connection 0263B068
> > unable to connect to libvirt qemu://FC11-KVM/session
>
> So the problem is that as you can see from reading the messages, it
> can't load the client key file (from
> /usr/i686-pc-mingw32/sys-root/mingw/etc/pki/libvirt/private/clientkey.pem).
>
> This path is compiled into libvirt, so the only way to change it is to
> recompile libvirt with sysconfdir set to a more suitable path:
>
>  ./configure --sysconfdir=/etc
>
> for example (and create /etc/pki ... on Windows).
>
> > tried with different URI on windows:
> > virt-viewer.exe -c qemu+tcp://FC11-KVM/session 2
> [...]
>
> This worked, obviously because it's not using GnuTLS for encryption.
>
> Rich.
>
> --
> Richard Jones, Emerging Technologies, Red Hat
> http://et.redhat.com/~rjones
> libguestfs lets you edit virtual machines.  Supports shell scripting,
> bindings from many languages.  http://et.redhat.com/~rjones/libguestfs/
> See what it can do: http://et.redhat.com/~rjones/libguestfs/recipes.html
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/fedora-virt/attachments/20090930/a3f33987/attachment.htm>


More information about the Fedora-virt mailing list