Re: [Pyvix-discuss] Question on Getting Started Pyvix
Status: Beta
Brought to you by:
woodsplitter
|
From: Eric B. <eri...@gm...> - 2007-08-06 16:22:47
|
It looks like VMWare released a newer version of the VIX api which appears
to be included in version 6 of workstation. I wouldn't be surprised if this
had something to do with it. Perhaps we should see whats in the changelog
between versions.
Eric
On 8/2/07, Johan Jeffery <joh...@us...> wrote:
>
> No. Unfortunately, I have not been able to get very far. I had to modify
> the
> findVixDir() in _support.py to find the vix.dll to be the following (and I
> sure there are better, more pythonic ways of doing this -- I am open to
> any
> suggestions):
>
> def findVixDir():
> if PLATFORM_IS_WINDOWS:
> import _winreg
> r = _winreg.ConnectRegistry(None, _winreg.HKEY_LOCAL_MACHINE)
> try:
> serverInstKey = _winreg.OpenKey(r,
> r'SOFTWARE\VMware, Inc.\VMware VIX'
> )
> try:
> serverInstDir = _winreg.QueryValueEx(
> serverInstKey, 'InstallPath'
> )[0]
> finally:
> _winreg.CloseKey(serverInstKey)
>
> serverKey = _winreg.OpenKey(r,
> r'SOFTWARE\VMware, Inc.'
> )
> try:
> serverType = _winreg.QueryValueEx(
> serverKey, 'Core'
> )[0]
> finally:
> _winreg.CloseKey(serverKey)
> finally:
> r.Close()
>
> vixDir = os.path.join(serverInstDir, os.pardir, 'VMware VIX')
> if vixDir.endswith(os.sep):
> vixDir = vixDir[:-len(os.sep)]
> vixDir = os.path.normpath(vixDir)
>
> vixDlls = []
> for root, dirs, files in os.walk(vixDir):
> for name in files:
> if name.lower().endswith('x.dll') :
> vixDlls.append(root[len(vixDir)+1:])
> if serverType == 'VMware Workstation':
> for dll in vixDlls:
> if dll[0] =='w':
> vixDir = os.path.join(vixDir, dll)
> else:
> for dll in vixDlls:
> if dll[0] =='s':
> vixDir = os.path.join(vixDir, dll)
>
> return vixDir
>
> Once I made this change so that it finds the vix.dll, it all goes into
> la-la
> land when you try to establish a connection to the host with:
>
> h = Host()
>
> It never returns.
>
> - Johan
>
>
> ------ Original Message ------
> Received: Tue, 31 Jul 2007 04:55:59 PM MDT
> From: "Eric Buehl" <eri...@gm...>
> To: "Johan Jeffery" <joh...@us...>Cc:
> pyv...@li...
> Subject: Re: [Pyvix-discuss] Question on Getting Started Pyvix
>
> > Hey Johan,
> >
> > Are you able to use pyvix otherwise? Is it only the test scripts that
> don't
> > function? If so, I wouldn't worry about it -- as far as I know, these
> tests
> > are only there to demonstrate the broken API provided by VMWare. I
> haven't
> > tried with a more recent version of VMWare server, but hopefully some of
> > these things have been fixed.
> >
> > Eric
> >
> >
> > On 7/23/07, Johan Jeffery <joh...@us...> wrote:
> > >
> > > In downloading and trying pyvix, I'm getting stuck. After installing
> > > pyvix, I
> > > tried the tests. The tests crash because it can't find a site-config.
> In
> > > looking at _support.py, it is trying to load pyvix_test_site_config.
> What
> > > is
> > > this and what should there be in it? Or where do I get one or how can
> I
> > > create
> > > one?
> > >
> > > I'm stuck without it.
> > >
> > > Thanks!
> > >
> > > - Johan
> > >
> > >
> > >
> > >
> -------------------------------------------------------------------------
> > > This SF.net email is sponsored by: Splunk Inc.
> > > Still grepping through log files to find problems? Stop.
> > > Now Search log events and configuration files using AJAX and a
> browser.
> > > Download your FREE copy of Splunk now >> http://get.splunk.com/
> > > _______________________________________________
> > > Pyvix-discuss mailing list
> > > Pyv...@li...
> > > https://lists.sourceforge.net/lists/listinfo/pyvix-discuss
> > >
> >
>
>
>
>
|