Subscribe

Datasource Script for VMware vCenter 6.0 running into error

Hi,

 

I just downloaded and installed the "Datasource Script for VMware vCenter 6.0" from the Storage Automation Store.

I setup a new datasource and the credentials seem to be fine as well, but at some point during aquisition the script fails with the following message:

 

"You cannot call a method on a null-valued expression."

 

This looks like some code in the script tries to use some still uninitialized variable.

 

Can anybody please help to debug?

 

Thanks and regards, Niels

 

Re: Datasource Script for VMware vCenter 6.0 running into error

Niels,

 

     Your inconvenience is regretted. Now to get to the real cause of this failure, I'll keep this conversation via email and then post conclusion etc. here for everyone.

 

sinhaa

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

Re: Datasource Script for VMware vCenter 6.0 running into error

We hit this exact same error.  Could you please post the solution when found.

 

Thanks,

Matt.


sinhaa wrote:

Niels,

 

     Your inconvenience is regretted. Now to get to the real cause of this failure, I'll keep this conversation via email and then post conclusion etc. here for everyone.

 

sinhaa


 

Re: Datasource Script for VMware vCenter 6.0 running into error

Matt,

    Your inconvinience is regretted. The cause of the error has been identified and fixed. We are currently doing internal testing.

 

A new updated version of this pack will be available very soon.

 

I hope you can wait till then.

 

warm regards,

sinhaa

 

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

Re: Datasource Script for VMware vCenter 6.0 running into error

[ Edited ]

Hi Matt and all,

 

I have fixed this code and you can try it on your setup.

 

Min WFA version needed to import dar: WFA3.1P1

 

Also added the code in txt format, which can be used for creating a new Data Source type on any WFA version.

 

I've also added the Logging for Script Based Datasources

Now if you need  to log something or trace the code execution, all you need to do it edit the code and all lines like below

 

#Info

$logg.Info("this is an info message")

 

You can see the execution logs using the "Log Viewer"

 

Import the .dar file attached here. It will add a DataSource type names "VMware vCenter 6.0 Abhishek Sinha"

 

Create a new Data Source for this and provide the needed credentials.

 

NOTE: I would suggest to keep Timeout(sec) large like 2400 seconds. VMware cmdlets at times can be very slow to return results.  

 

VC60_DS.png

 

 

Let me know how this worked for you.

 

warm regards,

sinhaa

 

 

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

Re: Datasource Script for VMware vCenter 6.0 running into error

Hi sinhaa,

 

ESXi6 is not on the Interoperability Matrix yet as a supported hypervisor for WFA. Any idea when that configuration will be added?

 

Kind regards,

Marco Teeuwen

Re: Datasource Script for VMware vCenter 6.0 running into error

Hi Marco,

 

How do you plan to manage your ESXi 6.0 hypervisor? Directly or using a cerntralized management unit like VMWare vCenter. 

 

I've not seen the support matrix but let me try to explain you. See there are 2 things with WFA. 

 

1. Acquiring environment information for advanced and intelligent resource selection.

2.  Active management using a programatic interface like API, CLI, cmdlet etc.

 

Point (1) is not mandatory for using WFA with any system (like Vmware ESXi). Yes, it gives big advantage, but you can still use WFA for manageing your stuff without it. Even without resource selection, WFA being a great automation framework will work great for you.

 

The attached Data Source acquistion script for VMWare vCenter6.0 provides for Point (1). It gets the needed information about the environment by connecting to central management system like vCenter which manages multiple ESXi hypervisors. So if you are managing your ESXi 6.0 Hypervisor using a vCenter, then you have point (1) done for you. For point(2), WFA doesn't have a huge array of built-in commands, but you can create them on your own using VMware Power CLI cmdlets. So its not exactly that ESXi is NOT supported.

 

If you do not use VMware vCenter, and manage your ESXi directly, then also you can write a Data Source Acquistion script which gets information from an ESXi Hypervisor. Its not there in WFA as of now.

 

If you can wait some time, I'm writing one which I plan to post on Community for everyone's use.

 

warm regards,

sinhaa

 

 

 

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

Re: Datasource Script for VMware vCenter 6.0 running into error

Hi Sinhaa,

 

I’m not talking about managing the ESX environment with WFA, but about the guest/hypervisor combination where WFA is installed on. The attached IMT export only shows ESXi 5.0, 5.1 and 5.5 in the hypervisor column. I assume it’s no problem running WFA on a Windows guest on ESXi 6, but I would like to see that combination added to the Interoperability Matrix so I can tell my customer it’s supported.

 

Kind regards,

Marco

Re: Datasource Script for VMware vCenter 6.0 running into error

Ahh okay.. Maybe your queston wasn't exactly inline with the ongoing thread.

 

Anyway, the next WFA release will add this ESXi version perhaps.

 

sinhaa

 

 

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

Re: Datasource Script for VMware vCenter 6.0 running into error

Hi Marco

 

I will take care of adding it in IMT.

I will add vCenter 6.0 as supported

 

But there will be a Note also added saying that "This is not supported out of the box. Customers have to download this pack from store and work with 3.1P1"

 

Regards

Sharaf