-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vSAN 8 ESA - "VsanDiskGroup" is empty #113
Comments
Same issue here. got it working with some tweaks: added an extra line to $VsanClusterInfo 'vSAN ESA Enabled' = Switch ($VsanCluster.VsanEsaEnabled) {
$true { 'Yes' }
$false { 'No' }
} in the vsanclusters loop I excluded the OSA disk details if (!($VsanCluster.VsanEsaEnabled -eq $true)){
$VsanDiskGroup = Get-VsanDiskGroup -Cluster $VsanCluster.Cluster
$NumVsanDiskGroup = $VsanDiskGroup.Count
$VsanDisk = Get-VsanDisk -VsanDiskGroup $VsanDiskGroup
$VsanDiskFormat = $VsanDisk.DiskFormatVersion | Select-Object -First 1 -Unique
$NumVsanSsd = ($VsanDisk | Where-Object { $_.IsSsd -eq $true }).Count
$NumVsanHdd = ($VsanDisk | Where-Object { $_.IsSsd -eq $false }).Count
if ($NumVsanHdd -gt 0) {
$VsanClusterType = "Hybrid"
} else {
$VsanClusterType = "All Flash"
}
} else {
$VsanClusterType = "All Flash (NVMe)"
} I removed these 3 lines from the clusterdetail object and added them only if there is no ESA if (!($VsanCluster.VsanEsaEnabled -eq $true)){
$VsanClusterDetail | Add-Member -MemberType NoteProperty -name 'Disk Format Version' -value $VsanDiskFormat
$VsanClusterDetail | Add-Member -MemberType NoteProperty -name 'Total Number of Disks' -value $NumVsanSsd + $NumVsanHdd
$VsanClusterDetail | Add-Member -MemberType NoteProperty -name 'Total Number of Disk Groups' -value $NumVsanDiskGroup
} lastly I excluded the whole section disk groups and disks. These are depended on the diskgroup which do no exist anymore if (!($VsanCluster.VsanEsaEnabled -eq $true)){
.....
} for the exclusion. the result is that the report is created only the ESA lines are not included in the report yet. |
I have this coded already, however I got distracted while testing it in a few environments. I'll aim to push this up to the repo over the Easter weekend and you can test it further. |
Are you sure that it is fixed? DETAILED: [ 14:41:03:404 ] [ Document ] - Processing paragraph 'The following sections detail the co[..]'.
I have to mention that i installed a prerelease version while we tested in the last month: Version Name Repository Description 1.4.0 AsBuiltReport.Core PSGallery A PowerShell module which provides the core framework for generating As-Built documentation ... The update with the --force gives no errors but am not sure if the correct module is active now WARNUNG: [ 14:52:25:303 ] [ Module ] - AsBuiltReport.VMware.vSphere 1.3.4.1 is currently installed. To be sure i need to uninstall the prerelease and install from scratch but i get this error: PackageManagement\Uninstall-Package : The module 'AsBuiltReport.VMware.vSphere' of version '1.3.4-rc1' in module base folder 'C:\Program
|
Update: ModuleType Version Name ExportedCommands Script 1.3.4.1 AsBuiltReport.VMware.vSphere Invoke-AsBuiltReport.VMware.vSphere The error remains: New-AsBuiltReport : The argument for the VsanDiskGroup parameter cannot be verified. The argument is NULL or empty. Provide an argument that is not NULL or empty and run the command again. |
@mpacholke Can you please provide a verbose output or screenshot of where it is failing? |
What vSphere & VSAN version are you using? What is the VSAN InfoLevel configured for within the report configuration JSON? |
Here the versions and info's: ESXi vCenter : 8.0.2 23319993 "InfoLevel": { I varied the setting for vSAN to 1 and 0 but the error remains |
Can you please provide further information about your VSAN cluster? Is it ESA or OSA? Hybrid or SSD? Try and run this and share the output file. $VcenterServer = "Your vCenter Server name"
$VsanCluster = "Your VSAN cluster name"
$vccreds = Get-Credential
$vcenter = connect-viserver $VcenterServer -Credential $vccreds
# Set verbose and debug preferences
$global:VerbosePreference = 'Continue'
$global:DebugPreference = 'Continue'
Start-Transcript -Path .\Output.log
$VsanCluster = Get-VsanClusterConfiguration -Cluster $VsanCluster -Server $vCenter | Where-Object { $_.vsanenabled -eq $true }
if ($VsanCluster) {
if ($VsanCluster.VsanEsaEnabled) {
$VsanStoragePoolDisk = Get-VsanStoragePoolDisk -Cluster $VsanCluster.Cluster
$VsanDiskFormat = $VsanStoragePoolDisk.DiskFormatVersion | Select-Object -First 1 -Unique
$VsanClusterDetail = [PSCustomObject]@{
'Cluster' = $VsanCluster.Name
'ID' = $VsanCluster.Id
'vSAN Type' = Switch ($VsanCluster.VsanEsaEnabled) {
$true { 'vSAN ESA' }
$null { 'vSAN OSA' }
}
'Stretched Cluster' = Switch ($VsanCluster.StretchedClusterEnabled) {
$true { 'Yes' }
$false { 'No' }
}
'Number of Hosts' = $VsanCluster.Cluster.ExtensionData.Host.Count
'Number of Disks' = $VsanStoragePoolDisk.Count
'Disk Claim Mode' = $VsanCluster.VsanDiskClaimMode
'Disk Format Version' = $VsanDiskFormat
'Deduplication & Compression' = Switch ($VsanCluster.SpaceEfficiencyEnabled) {
$true { 'Enabled' }
$false { 'Disabled' }
$null { 'Disabled' }
}
'Encryption' = Switch ($VsanCluster.EncryptionEnabled) {
$true { 'Enabled' }
$false { 'Disabled' }
$null { 'Disabled' }
}
'Health Check' = Switch ($VsanCluster.HealthCheckEnabled) {
$true { 'Enabled' }
$false { 'Disabled' }
$null { 'Disabled' }
}
'HCL Last Updated' = $VsanCluster.TimeOfHclUpdate
}
} else {
$VsanDiskGroup = Get-VsanDiskGroup -Cluster $VsanCluster.Cluster
$NumVsanDiskGroup = $VsanDiskGroup.Count
$VsanDisk = Get-VsanDisk -VsanDiskGroup $VsanDiskGroup
$VsanDiskFormat = $VsanDisk.DiskFormatVersion | Select-Object -First 1 -Unique
$NumVsanSsd = ($VsanDisk | Where-Object { $_.IsSsd -eq $true }).Count
$NumVsanHdd = ($VsanDisk | Where-Object { $_.IsSsd -eq $false }).Count
if ($NumVsanHdd -gt 0) {
$VsanClusterType = "Hybrid"
} else {
$VsanClusterType = "All Flash"
}
$VsanClusterDetail = [PSCustomObject]@{
'Cluster' = $VsanCluster.Name
'ID' = $VsanCluster.Id
'vSAN Type' = Switch ($VsanCluster.VsanEsaEnabled) {
$true { 'vSAN ESA' }
$null { 'vSAN OSA' }
}
'Storage Type' = $VsanClusterType
'Stretched Cluster' = Switch ($VsanCluster.StretchedClusterEnabled) {
$true { 'Yes' }
$false { 'No' }
}
'Number of Hosts' = $VsanCluster.Cluster.ExtensionData.Host.Count
'Number of Disks' = $NumVsanSsd + $NumVsanHdd
'Number of Disk Groups' = $NumVsanDiskGroup
'Disk Claim Mode' = $VsanCluster.VsanDiskClaimMode
'Disk Format Version' = $VsanDiskFormat
'Deduplication & Compression' = Switch ($VsanCluster.SpaceEfficiencyEnabled) {
$true { 'Enabled' }
$false { 'Disabled' }
$null { 'Disabled' }
}
'Encryption' = Switch ($VsanCluster.EncryptionEnabled) {
$true { 'Enabled' }
$false { 'Disabled' }
$null { 'Disabled' }
}
'Health Check' = Switch ($VsanCluster.HealthCheckEnabled) {
$true { 'Enabled' }
$false { 'Disabled' }
$null { 'Disabled' }
}
'HCL Last Updated' = $VsanCluster.TimeOfHclUpdate
}
Write-Output $VsanClusterDetail | fl
}
} else {
Write-Error -Message "VSAN cluster not found!"
}
Stop-Transcript
# Reset verbose and debug preferences
$global:VerbosePreference = 'SilentlyContinue'
$global:DebugPreference = 'SilentlyContinue' |
Hi sorry for the delay. I only have access to the customer site at dedicated time frames. This is a vSAN ESA (all-nvme) cluster. I have to anonymize some data: cat .\Output.log Start der Windows PowerShell-Aufzeichnung Die Aufzeichnung wurde gestartet. Die Ausgabedatei ist ".\Output.log". Ende der Windows PowerShell-Aufzeichnung |
i run the script again and after some errors i got this tail . I removed all personal information: nStart der Windows PowerShell-Aufzeichnung Konfigurationsname: https://aka.ms/vscode-powershell Die Aufzeichnung wurde gestartet. Die Ausgabedatei ist ".\Output.log".
AUSFÜHRLICH: 25.07.2024 19:16:42 Get-VsanDiskGroup Finished execution
Cluster : Ende der Windows PowerShell-Aufzeichnung |
Hi, |
I have run the script a week ago in a ESA environment. And that ran succesfully. you could try my earlier suggestion to bypass the diskgroup check. |
Lets simplify this check, could you please report the output of the following.
Could you also provide the output of the following?
|
Hi ,the result is true. PS C:\Users\Administrator> $VsanCluster.VsanEsaEnabled Name Version AsBuiltReport.Core 1.4.0 |
Yes, i tested it last week and it works. I have a nearly complete report - thanks for your advice. |
General enhancement: |
Please raise this as a separate feature request |
Did you successfully test this using v1.3.4.1, or did you use your modified script? |
I used the modified script |
You might be in luck. I will be working on a customer project in January deploying multiple vSAN ESA clusters so I will have an opportunity to look at this properly then. |
vSAN 8 ESA has no disk groups anymore. The argument is NULL or empty
Perhaps you can skip the vSAN disk group information in the script ?
Update:
Test with the RC run into the same error:
ModuleType Version Name ExportedCommands
Script 1.3.4 AsBuiltReport.VMware.vSphere Invoke-AsBuiltReport.VMware.vSphere
New-AsBuiltReport : The argument for the VsanDiskGroup parameter cannot be verified. The argument is NULL or empty. Provide an argument that is not NULL or empty, and
run the command again.
In line:1 character:1
ESXi 8.0.2 Build 22380479
vCenter 8.0.2 Build 22385739
Name Value
PSVersion 5.1.19041.3693
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.3693
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
PowerCLI Version
VMware.PowerCLI 13.2.1 build 22851661
Component Versions
VMware Common PowerCLI Component 13.2 build 22643733
VMware Cis Core PowerCLI Component PowerCLI Component 13.2 build 22643734
VMware VimAutomation VICore Commands PowerCLI Component PowerCLI Component 13.2 build 22643732
VMware VimAutomation Storage PowerCLI Component PowerCLI Component 13.2 build 22643728
VMware VimAutomation Vds Commands PowerCLI Component PowerCLI Component 13.1 build 21610933
The text was updated successfully, but these errors were encountered: