AsBuiltReport / AsBuiltReport.DellEMC.VxRail

Repository for AsBuiltReport Dell EMC VxRail module
MIT License
17 stars 1 forks source link

Pass in parameter VxRail Manager hostname because several VxRail clusters can be managed by the same vcenter #5

Open douvryf opened 2 years ago

douvryf commented 2 years ago

Is your feature request related to a problem? Please describe. The report collect only information about one VxRail Manager.

Describe the solution you'd like Pass VxRail Manager hostname as parameter

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

CodeJACKz commented 2 years ago

Any details of how to use this enhancement or has this made it into the script yet? Awesome project BTW!

tpcarman commented 2 years ago

Can you try something for me?

What is the output when you run this? Obscure any information if you need to, however I want to see if you get more than one result returned.

$VIServer = "<Your vCenter Server IP/FQDN>"
$Credential = Get-Credential
$vCenter = Connect-VIServer $VIServer -Credential $Credential
$si = Get-View ServiceInstance -Server $vCenter
$extMgr = Get-View -Id $si.Content.ExtensionManager -Server $vCenter
$VxRailMgr = $extMgr.ExtensionList | Where-Object { $_.Key -eq 'com.vmware.vxrail' }
$VxRailMgr.Server
CodeJACKz commented 2 years ago

Hey Tim, output below:

Url : https://x.x.x.x/download/vxrail-plugin Description : VMware.Vim.Description Company : VMware Inc. Type : HTTPS AdminEmail : {noreply@vmware.com} ServerThumbprint : 21:67:9B:09:74:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

CodeJACKz commented 2 years ago

If it helps at all, there is a VxRail Manager IP address listed as a "Custom Attribute" on each cluster. Im no help with how to do this (sorry) but if there was a way to list this "VxRail-IP" custom attribute for all clusters connected to that vCenter, you would identify what clusters are actually VxRail and then run the report against only these cluster names. Probably way over simplified it :-)

CodeJACKz commented 2 years ago

Seems someone got there before me: https://www.dell.com/community/VxRail-Education/Question-from-Class-How-do-I-know-if-it-s-a-quot-VxRail-quot/td-p/8193452

tpcarman commented 2 years ago

Give v0.4.0 a try. You will need to download and install it from GitHub. If you find it works, then I will publish it to the PowerShell Gallery.

CodeJACKz commented 2 years ago

Failing each time at this same point:


New-AsBuiltReport : Message: EsxCLI.CLIFault.summary; InnerText: unknown module ''EsxCLI.CLIFault.summary At line:1 char:1


I've copied the Invoke public file into the 0.3.0 directory and its running now without error so I guess the issue is in another script in private.

tpcarman commented 2 years ago

FYI, I've moved the latest v0.4.0 commit to a new branch and updated the links in the comment above.

Could you add the -Verbose parameter to the command and share a screenshot of where it is failing?

Also, perhaps try and disable the Appliance InfoLevel by setting it to 0 in the report JSON configuration. Then run the report to see if it completes.

    "InfoLevel": {
        "_comment_": "0 = Disabled, 1 = Enabled / Summary, 2 = Detailed",
        "Cluster": 1,
        "Appliance": 0,
        "Support": 1,
        "Network": 1
    },
CodeJACKz commented 2 years ago

Nah, setting Appliance to 0 didnt help. I got sucked in though and found the problem. Get-AbrVxRailHostComponent.ps1 Line 33 $HbaDevice = $esxcli.hardware.pci.list.invoke() | Where-object {$_.modulename -eq 'lsi_msgpt3'}

The eq should be match :-)

This works: $HbaDevice = $esxcli.hardware.pci.list.invoke() | Where-object {$_.modulename -match 'lsi_msgpt3'}

Thanks so much for the help and all the work in developing this!

tpcarman commented 2 years ago

So it was I who broke it!! :P

Glad to see you managed to find the issue. I've reverted my change.

So this now works OK for multiple VxRail clusters?

CodeJACKz commented 2 years ago

FYI for the newer 15G P and E VxRail nodes, the vmnic0 and 1 are taken up by two onboard 1G copper NICs. So the first interface used by VxRail is vmnic2. So this works to get correct driver version for me: $NicDevice = $esxcli.hardware.pci.list.invoke() | Where-Object {$_.VMkernelName -eq 'vmnic2'}

Not really ideal now that VxRails will all be different. Whoever decided to put them copper NICs in these new nodes should be shot :-)

CodeJACKz commented 2 years ago

So this now works OK for multiple VxRail clusters?

Yes, works great. It doesnt really answer the original question but i prefer it this way. Having an option to choose a single cluster name would be nice but this works great for me. Thanks

tpcarman commented 2 years ago

It doesnt really answer the original question but i prefer it this way. Having an option to choose a single cluster name would be nice but this works great for me. Thanks

Let me keep looking into that. I've got an idea but I haven't tested it out yet. It is something I have been looking to do for the VMware vSphere report also.

CodeJACKz commented 2 years ago

Great, hit me up if you ever want stuff tested.

I just hit an issue now as a result of different vmnic sequence between the old an new clusters. vmnic2 doesnt exist on the old nodes so I get that same error as before :-(

So that error just means a failed attempt at reading the attribute

tpcarman commented 2 years ago

OK, I've removed the NIC driver info for now, because I thought this might be an issue.

I've removed all releases from GitHub and PS Gallery back to 0.3.0, and have just pushed 0.4.1 to dev.

Maybe give that a test, and then all going well I will release it.

I should really not try and rush these things.