Active IQ Unified Manager Discussions

"Get-VMHostHba Object reference not set to an instance of an object." trying to acquire Vcenter

blando
8,425 Views

Hi All, 

 

Trying to acquire 2 Vcenters separately, and getting same error message for both : 

Get-VMHostHba

Object reference not set to an instance of an object.

 

WFA 3.1P1

Vcenter 5.5 latest update.

VMware powerCLI 5.5 installed on WFA server.

Increased timeout to 6000 seconds. however, operation fails after a lot less then that.

Using user with admin credentials on Vcenter. Also don't find any credential errors or permissions denied messages.

 

error messages in wfa_acquisition.log attached here.

 

From searching other posts here, It looks like problems with acquisitions of FC data, but it was supposed to be solved already, right?

 

Thank you for your kind help!

 

Blando

 

 

Yea, Let me know if you need separate discussion for this problem:

While trying to acquire OCUM 6.3 , I get this error message: "Table 'cm_storage.snapmirror_metrocluster' doesn't exist"

What does it mean?

 

Thanks!

 

1 ACCEPTED SOLUTION

coreywanless
8,415 Views

I obviously wasn't checking my environment well enough. I had this issue start on one of my vCenters.  I believe our VMWare team was doing hardware changes that made this start happening.

 

FOR NETAPP: Here is how you can fix it in the certified version. Line 315 is currently " $hbas = Get-VMHostHba -VMHost $globalVmhosts"  Append " -ErrorAction SilentlyContinue" to the end, and it will solve the issue. 

 

Blando: Until Netapp fixes the certified Datasource, you can do the following to get around it.

  1. From WFA go into the "Designer" tab
  2. Go into 'Data Source Types'
  3. Right click on the Vcenter Data Source Type, and choose clone.
  4. Modify the following Fields:
  5. -- Datasource Version: Append _modified, or something to change the name
  6. -- Scheme: Choose vc
  7. -- Script: Change line 315 to " $hbas = Get-VMHostHba -VMHost $globalVmhosts  -ErrorAction SilentlyContinue"  (This may be easier if you paste it out to some other editor like notepad, or notepad++)
  8. Save It.
  9. Go back into Data Sources under the Execution Tab.
  10. Delete your existing data source for VMWare.
  11. Create a new one with the new data source type.

View solution in original post

9 REPLIES 9

coreywanless
8,416 Views

I obviously wasn't checking my environment well enough. I had this issue start on one of my vCenters.  I believe our VMWare team was doing hardware changes that made this start happening.

 

FOR NETAPP: Here is how you can fix it in the certified version. Line 315 is currently " $hbas = Get-VMHostHba -VMHost $globalVmhosts"  Append " -ErrorAction SilentlyContinue" to the end, and it will solve the issue. 

 

Blando: Until Netapp fixes the certified Datasource, you can do the following to get around it.

  1. From WFA go into the "Designer" tab
  2. Go into 'Data Source Types'
  3. Right click on the Vcenter Data Source Type, and choose clone.
  4. Modify the following Fields:
  5. -- Datasource Version: Append _modified, or something to change the name
  6. -- Scheme: Choose vc
  7. -- Script: Change line 315 to " $hbas = Get-VMHostHba -VMHost $globalVmhosts  -ErrorAction SilentlyContinue"  (This may be easier if you paste it out to some other editor like notepad, or notepad++)
  8. Save It.
  9. Go back into Data Sources under the Execution Tab.
  10. Delete your existing data source for VMWare.
  11. Create a new one with the new data source type.

blando
8,387 Views

Thanks Corey ! It solved the Vcenter acquire issue.

 

Do you have an idea for the second problem, Or should I open new discussion?

 

While tryint to acquire OCUM 6.3, I get the error message: "Table 'cm_storage.snapmirror_metrocluster' doesn't exist"

What can Be done here?

 

Blando

 

sinhaa
8,382 Views

blando,

 

This -ErrorAction SilentlyContinue has got to pass your DataSource acquistion, but kindly verify if the WFA has actually obtained all the data that you wanted into the DB. Especially the Luns.

 

SilentlyContinue can be dangererous thing.

 

sinhaa

 

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

blando
8,377 Views

How do I actually check what was acquired?

I wanted it to successed so I can connect to Vcenter- for example in the "create NFS datastore" workflow.

 

Blando

 

sinhaa
8,375 Views

Take the attached txt file. Modify its extension to .ps1 for a powershell script.

 

In code the modify the below as per your settings 

==

 

$VCHostName = "1.2.3.4"
$VCUserName = "administrator"
$VCPassword = "mypass"
$VCPort = "443"

 

===

 

Execute it. It will fail as its similar to VC5.5 script given by WFA. I want to know the exception thrown. Kindly send them to me in email if you can: sinhaa at netapp dot com

 

How check the data?

Login to WFA DB using a mysql client User: wfa, password: Wfa123

 

You can see the vc scheme

 

sinhaa

 

 

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

sinhaa
8,330 Views

Response to the original post

==================

 

This is NOT a WFA error. The error is thrown by VMWare Powershell toolkit when a ESX Host dosn't have any HBAs and the cmdlet 

Get-VMHostHba

 

is executed for this particular ESX host.

 

This is a toolkit bug. If there were no HBAs on an ESX host, the cmdlet should have returned empty instead of throwing an Object Referance Error. This case is not handled gracefully in the Vmware PowerCLI toolkit. I'll check if this is fixed in the new VMware PowerCLI 6.0

 

Else I'll log a bug with VMware.

 

WFA code can only ignore this error as described by Corey.

 

sinhaa

 

 

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

coreywanless
8,367 Views

On the 6.3 acquisition issue, have you validated what version of OCUM you are running?  I don't believe in pre OCUM 6.3 they had the metro cluster tables.  If your OCUM install is anything other than 6.3, you will need to delete the datasource from your configs and re-add it with the proper version.

blando
8,345 Views

Hi.

Yea. It's OCUM 6.3 , for sure.

It was already running and acqired well, When I started with this WFS couple of weeks ago.

Even if try again to add this OCUM as data source, immediately I get this error message.

 

Blando

 

blando
8,342 Views

I will open new discussion, about the "Table 'cm_storage.snapmirror_metrocluster' doesn't exist" Not to confuse things around here.

Thank you!

Blando

 

Public