Subscribe

Re: Datasource Script for VMware vCenter 6.0 running into error

When will the updated version make it to the Automation store?

I just checked and it still lists the old broken one.

 

regards, Niels

Re: Datasource Script for VMware vCenter 6.0 running into error

Niels,

 

Its been delayed due to unavoidable circumstances, but now its been posted. The new 1.1.0 version is available here

 

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,

 

The DAR file you posted with your name on it was working for me really well in our test environment.  However, when I went to deploy to production it started throwing the same error again "You cannot call a method on a null-valued expression."  I then tried the new Vcenter 6.0 datasource DAR from the automation store and it throws that same error for both our prod and test vcenter servers.  The version you had released on this forum works for me in test but not in prod.

 

Do you have any suggestions for me?

 

Thanks,

Matt.

Re: Datasource Script for VMware vCenter 6.0 running into error

[ Edited ]

 

Hi Matt,

     

      Your inconvinience is regretted. It would have been easier if you had reported you error the first time you posted on this thread. VMware acquistion is an extremely wild beast. Everytime I think, I've tamed it, it starts to run lose at some end.

 

The powershell error message is extremely generic, but your scenario is different from what it was initially reported on this original post fron niels.

 

Alright, lets use the code provided the at WFA Automation store. I assure you I'll get this one working both at your test and production env.

 

You need to do the following:

 

  1. With the Data Source type imported from Automation Store  on your Test env. Run your acqustion. I'm sure you have done it already.  Let it fail with the same error. For now, I'll not try something on your production env.
  2. Go to WFA -> Administration -> Log Viewer. You'll see a file named <your_vcenter_server_host>.log . I would need that file.
  3. Let's keep WFA aside to debug this. Attaching here is a code, you need to modify a bit in the beginning as per your Vcenter settings

 

$VcHost = "10.20.30.40"
$User = "administrator"
$Password = "pass"
$port = "443"

 

Save it after changing the extension to .ps1 . Or you may even copy the content as run it from a powershell ISE.

 

5. From a powershell console on your WFA server, execute it. I think it will fail as before with same error "You cannot call a method on a null-valued expression.". Send me the entire output in some text file.

 

6. You may raise a NetApp customer support case. This could speed things up as we can schedule a webex to resolve this.

 

My email is : sinhaa at netapp dot com

 

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,

 

It turns out this issue was due to my mistake.  Looking at the datasource code this morning I realized that I had downloaded the wrong version of the vcenter 6.0 DAR it was still the 1.0 release.  When I imported the 1.1 release everything started working in prod and test.

 

Thanks for your help.  I’m very impressed with the level of support on the community site.  We have big plans for WFA at our company.

 

Thanks,

Matt.

Re: Datasource Script for VMware vCenter 6.0 running into error

Thanks Matt for your positive feedback.

Also would like to thank Abhishek for his efforts in helping you all.

Re: Datasource Script for VMware vCenter 6.0 running into error

Hi Sinhaa,

 

I was wondering if you are able to capture snapshots on individual VMs that had been taken through virtual center in this VCenter 6.0 datasource?  This would allow me to quickly show the VM snapshots sitting out in our environment with an easy way to remove them right from the WFA portal page.

Re: Datasource Script for VMware vCenter 6.0 running into error

Matt,

 

The purpose of having a Datasource is mainly to allow resource selection that allows planning and which can serve a larger group of requirements. We need to identify what are our resources. I'll try to explain here. In the VC DataSource we are getting information like Datacenters, Hosts are our resources on which we can create other resources  like VMs, clones, Cluster, Datastores etc.

 

Some resources are not going to be used for a larger set of requirements. Individual VM snaphost are such a resource. If I get VM snapshots, its not not going to be too useful for many tasks. So pulling them everytime into WFA db will not serve a lot of purpose.

 

Now for your requirement:

 

If you get snapshots of a particular VM, how would you pick which snapshots to be deleted? Based on Date? Name? Size? Make your choice. You can create a command which do the following:

 

1. Select the VM

2. Get its snapshots using Powercli cmdlets

3. Delete the snapshot you picked. One or many.

 

sinhaa

 

 

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