- From: Jesse Campbell <
>
- To:
- Subject: [chef] Re: RE: Re: RE: Knife-vSphere plugin (windows)
- Date: Mon, 10 Sep 2012 11:34:15 -0400
looks like a bug in BaseVsphereCommand.rb
I have changed the relevant section to this:
option :vsphere_host,
:long => "--vshost HOST",
:description => "The vsphere host"
You can update your own for now until a new rubygem is created.
What other changes did you need to make to run on windows?
-Jesse
On Mon, Sep 10, 2012 at 11:28 AM, Van Fossan,Randy
<
>
wrote:
>
Hi Jesse,
>
>
The following does not work, I get the error "can't convert true into
>
String"
>
>
# knife vsphere -u myaccount -p mypassword --vshost myhost.fqdn -d
>
"mydatacenter" --vsinsecure vm list
>
# ERROR: TypeError: can't convert true into String
>
>
If I change my knife.rb to include "knife[:vsphere_host] =
>
"myhost.fqdn" " and then run the following, it works.
>
# knife vsphere -u myaccount -p mypassword -d "mydatacenter"
>
--vsinsecure vm list
>
>
I need to be able to specify the --vshost as we have many Virtual Center
>
Servers.
>
>
I looked at the code here:
>
https://github.com/ezrapagel/knife-vsphere/blob/master/lib/chef/knife/Ba
>
seVsphereCommand.rb
>
>
Randy
>
>
-----Original Message-----
>
From: Jesse Campbell
>
[mailto:
>
Sent: Saturday, September 08, 2012 10:55 AM
>
To:
>
>
Subject: [chef] Re: RE: Knife-vSphere plugin (windows)
>
>
What have you had work vs. not work?
>
I'm pretty sure I tested both of those options back when I coded them,
>
but it was many months ago, and I currently only test on mac os...
>
but documentation around the "option" specifications is sparse or
>
nonexistent, so some pieces may have been missed.
>
>
however, what variable is missing in what you posted? the first option
>
sets config[:vsphere_dc], the second option sets config[:vsphere_host]
>
>
-jesse
>
>
>
On Wed, Sep 5, 2012 at 2:30 PM, Van Fossan,Randy
>
<
>
>
wrote:
>
> Well, I spoke too soon. I thought I tried the --vshost correctly
>
but, I still had the entry in my knife.rb file for the vsphere_host.
>
Looking at the source for knife-vsphere; specifically, the
>
BaseVsphereCommand.rb file, it shows the --vshost but it doesn't look
>
like it is coded correctly.?.?.?
>
>
>
> If you look at the vsphere_dc section versus the vsphere_host section,
>
it looks like a variable is missing.?.?.?
>
>
>
> option :vsphere_dc,
>
> :short => "-d DATACENTER",
>
> :long => "--vsdc DATACENTER",
>
> :description => "The Datacenter for vsphere"
>
>
>
> option :vsphere_host,
>
> :long => "--vshost",
>
> :description => "The vsphere host"
>
>
>
> Anyone concur?
>
>
>
> Randy
>
>
>
> -----Original Message-----
>
> From: Van Fossan,Randy
>
> Sent: Wednesday, September 05, 2012 2:12 PM
>
> To:
>
> '
'
>
> Subject: RE: Knife-vSphere plugin (windows)
>
>
>
> After looking at the source, I see you can specify the Datacenter and
>
vSphere host. I tried it "-d" and --vshost options and they do work.
>
>
>
> -----Original Message-----
>
> From: Van Fossan,Randy
>
> Sent: Wednesday, September 05, 2012 1:59 PM
>
> To:
>
> '
'
>
> Subject: Knife-vSphere plugin (windows)
>
>
>
> All,
>
>
>
> I am having some success with the knife-vsphere (0.2.3) plugin in
>
windows. We have the Chef 0.10.12 Omnibus package for Windows installed
>
and we then installed the knife-vsphere plugin. The plugin seems to
>
work ok in windows after I did a little gem cleanup.. My question is,
>
is there a way to pass the vsphere_dc and vspere_host via the command
>
line? I have tried setting windows environment variables as follows
>
and it isn't working.
>
>
>
> vsphere_host="mvcenter.fqdn"
>
> vshrere_dc="mydatacenter"
>
>
>
> We have many Data Centers on multiple Virtual Center servers.
>
>
>
> We need to run knife-vsphere on a windows chef management console due
>
to using VMware Orchestrator and PowerCLI as a wrapper around the "knife
>
vsphere" command.
>
>
>
> Any suggestions?
>
>
>
> Thanks
>
> Randy
>
>
Archive powered by MHonArc 2.6.16.