VMware ESXI AS构建报告是一个PowerShell模块,与AsbuiltrePort.Core一起使用。
AsbuiltrePort是一个开源的社区项目,它利用PowerShell为多个供应商和技术以多种文档格式生产了量的文档。
VMware ESXI作为构建报告模块用于生成独立VMware ESXI服务器的构建文档。
请参阅VMware AsbuilTrePort的VMware报告,以报告VMware VSphere / Vcenter Server环境。
请参阅AsbuiltrePort网站以获取有关此项目的更多详细信息。
以下是有关如何安装,配置和生成VMware ESXI作为构建报告的说明。
构建报告的VMware ESXI支持以下ESXI版本;
以下VMware ESXI版本不再被测试和/或支持;
该报告与以下Powershell版本兼容。
Windows Powershell 5.1 | Powershell 7 |
---|---|
✅ | ✅ |
PowerShell 5.1或PowerShell 7,以及以下PowerShell模块以生成VMware ESXI作为构建报告所需的。
❗如果您无法安装.NET Core,则必须将ShowCoverPageImage
设置为“报告JSON配置文件”中的False
。
需要在ESXI主机上具有根特权的用户以生成VMware ESXI作为构建的报告。
打开一个PowerShell终端窗口并安装每个必需的模块。
install-module VMware.PowerCLI - MinimumVersion 12.3 - AllowClobber
install-module AsBuiltReport.VMware.ESXi
构建报告的ESXI使用JSON文件来允许报告报告信息,选项,详细信息和HealthChecks。
可以通过执行以下命令来生成ESXI报告配置文件;
New-AsBuiltReportConfig - Report VMware.ESXi - Path < User specified folder > - Name < Optional >
执行此命令将将默认的ESXI报告JSON配置复制到指定的文件夹。
然后,所有报告设置都可以通过JSON文件进行配置。
以下提供了如何在报告的JSON文件中配置每个架构的信息。
报告模式提供ESXI报告信息的配置
亚chema | 环境 | 默认 | 描述 |
---|---|---|---|
姓名 | 用户定义 | VMware ESXI作为构建报告 | 构建报告的名称 |
版本 | 用户定义 | 1.0 | 报告版本 |
地位 | 用户定义 | 发行 | 报告发布状态 |
展示图像 | 是 /错误 | 真的 | 切换以启用/禁用封面图像的显示 |
Showheaderfooter | 是 /错误 | 真的 | 切换以启用/禁用文档标头和页脚 |
ShowTableCaptions | 是 /错误 | 真的 | 切换到启用/禁用表字幕/编号 |
选项模式允许在报告中切换或关闭报告中的某些选项
亚chema | 环境 | 默认 | 描述 |
---|---|---|---|
showlicensekeys | 是 /错误 | 错误的 | 切换到蒙版/UNMASK ESXI许可键 蒙版许可证密钥 ***** - ***** - ***** -56YDM-AS12K 未掩盖的许可证密钥 AKLU4-PFG8M-W2D8J-56YDM-AS12K |
Showvmsnapshots | 是 /错误 | 真的 | 切换以启用/禁用VM快照的报告 |
Infolevel模式允许在粒状级别上配置报告的每个部分。可以设置以下各节
每个部分的细节粒度有6个级别(0-5),如下所示;
环境 | 无效 | 描述 |
---|---|---|
0 | 禁用 | 不收集或显示任何信息 |
1 | 启用 /摘要 | 提供摘要的信息以收集对象 |
2 | adv摘要 | 为对象集合提供凝结的详细信息 |
3 | 详细的 | 为单个对象提供详细信息 |
4 | adv详细 | 提供有关单个对象的详细信息,以及关联对象(主机,群集,数据存储,VM等)的信息 |
5 | 综合的 | 为单个对象(例如高级配置设置)提供全面信息 |
下表概述了每个部分的默认设置和最大impolevel设置。
亚chema | 默认设置 | 最大设置 |
---|---|---|
VMHOST | 3 | 5 |
网络 | 3 | 4 |
贮存 | 3 | 4 |
VM | 3 | 4 |
HealthCheck模式用于打开或关闭健康检查。
VMHOST模式用于配置VMHOST的健康检查。
亚chema | 环境 | 默认 | 描述 | 强调 |
---|---|---|---|---|
ConnectionState | 是 /错误 | 真的 | 检查VMHOSTS连接状态 | 维护 断开连接 |
超线程 | 是 /错误 | 真的 | 突出显示已禁用超线程的VMHOSTS | 超线程禁用 |
刮擦 | 是 /错误 | 真的 | 突出显示使用默认刮擦位置配置的VMHOSTS | 刮擦位置为 /tmp /刮擦 |
IPv6 | 是 /错误 | 真的 | 突出显示未启用IPv6的VMHOSTS | IPv6禁用 |
推动日 | 是 /错误 | 真的 | 亮点的VMHOSTS,其运行时间大于9个月 | 9-12个月 > 12个月 |
许可 | 是 /错误 | 真的 | 突出显示使用生产评估许可证的VMHOSTS | 使用的产品评估许可证 |
SSH | 是 /错误 | 真的 | 突出显示是否启用了SSH服务 | 启用TSM / TSM-SSH服务 |
Esxishell | 是 /错误 | 真的 | 突出显示是否启用了ESXI Shell服务 | 启用TSM / TSM-ESXISHELL服务 |
NTP | 是 /错误 | 真的 | 突出显示NTP服务是否已停止或在VMHOST上禁用 | NTP服务停止 /禁用 |
Storageadapter | 是 /错误 | 真的 | 突出显示的存储适配器不是“在线” | 存储适配器状态是“未知” 存储适配器状态为“离线” |
NetworkAdapter | 是 /错误 | 真的 | 突出显示未“连接”的物理网络适配器 突出显示“下降”的物理网络适配器 | 网络适配器已“断开连接” 网络适配器是“下降” |
LockDownMode | 是 /错误 | 真的 | 突出显示未启用锁定模式的VMHOSTS | 禁用锁定模式 |
数据存储模式用于配置数据存储的健康检查。
亚chema | 环境 | 默认 | 描述 | 强调 |
---|---|---|---|---|
容量化 | 是 /错误 | 真的 | 突出显示存储容量利用率超过75%的数据存储 | 75-90%使用 >使用> 90% |
VM模式用于配置虚拟机的健康检查。
亚chema | 环境 | 默认 | 描述 | 强调 |
---|---|---|---|---|
Powerstate | 是 /错误 | 真的 | 突出显示电源的VM | VM电源关闭 |
ConnectionState | 是 /错误 | 真的 | 突出显示孤立或无法访问的VM | VM是孤儿或无法访问的 |
cpuhotadd | 是 /错误 | 真的 | 突出显示具有CPU热添加启用的虚拟机 | CPU热添加启用 |
cpuhotremove | 是 /错误 | 真的 | 突出显示具有CPU HOT启用启用CPU的虚拟机 | CPU HOT启用了启用 |
MemoryHotadd | 是 /错误 | 真的 | 突出显示具有内存热添加启用的VM | 内存热添加启用 |
ChangeBlockTracking | 是 /错误 | 真的 | 突出显示没有变化块跟踪启用的VM | 变更块跟踪禁用 |
SPBMPolicyCompliance | 是 /错误 | 真的 | 突出显示不符合基于存储策略的VM | 基于VM存储的策略合规性未知 VM不符合基于存储的策略 |
vmtoolsstatus | 是 /错误 | 真的 | 突出显示未安装VM工具,已过时或未运行的虚拟机 | VM工具未安装,过时或不运行 |
VMSNAPSHOTS | 是 /错误 | 真的 | 亮点的虚拟机,其快照以上超过7天 | VM快照年龄> = 7天 VM快照年龄> = 14天 |
# Generate an ESXi As Built Report for ESXi server 'esxi-01.corp.local' using specified credentials. Export report to HTML & DOCX formats. Use default report style. Append timestamp to report filename. Save reports to 'C:UsersTimDocuments'
PS C: > New-AsBuiltReport - Report VMware.ESXi - Target ' esxi-01.corp.local ' - Username ' root ' - Password ' VMware1! ' - Format Html , Word - OutputFolderPath ' C:UsersTimDocuments ' - Timestamp
# Generate an ESXi As Built Report for ESXi server 'esxi-01.corp.local' using specified credentials and report configuration file. Export report to Text, HTML & DOCX formats. Use default report style. Save reports to 'C:UsersTimDocuments'. Display verbose messages to the console.
PS C: > New-AsBuiltReport - Report VMware.ESXi - Target ' esxi-01.corp.local ' - Username ' root ' - Password ' VMware1! ' - Format Text , Html , Word - OutputFolderPath ' C:UsersTimDocuments ' - ReportConfigFilePath ' C:UsersTimAsBuiltReportAsBuiltReport.VMware.ESXi.json ' - Verbose
# Generate an ESXi As Built Report for ESXi server 'esxi-01.corp.local' using stored credentials. Export report to HTML & Text formats. Use default report style. Highlight environment issues within the report. Save reports to 'C:UsersTimDocuments'.
PS C: > $Creds = Get-Credential
PS C: > New-AsBuiltReport - Report VMware.ESXi - Target ' esxi-01.corp.local ' - Credential $Creds - Format Html , Text - OutputFolderPath ' C:UsersTimDocuments ' - EnableHealthCheck
# Generate a single ESXi As Built Report for ESXi servers 'esxi-01.corp.local' and 'esxi-02.corp.local' using specified credentials. Report exports to Word format by default. Apply custom style to the report. Reports are saved to the user profile folder by default.
PS C: > New-AsBuiltReport - Report VMware.ESXi - Target ' esxi-01.corp.local ' , ' esxi-02.corp.local ' - Username ' root ' - Password ' VMware1! ' - StylePath ' C:ScriptsStylesMyCustomStyle.ps1 '
# Generate an ESXi As Built Report for ESXi server 'esxi-01.corp.local' using specified credentials. Export report to HTML & DOCX formats. Use default report style. Reports are saved to the user profile folder by default. Attach and send reports via e-mail.
PS C: > New-AsBuiltReport - Report VMware.ESXi - Target ' esxi-01.corp.local ' - Username ' root ' - Password ' VMware1! ' - Format Html , Word - OutputFolderPath ' C:UsersTimDocuments ' - SendEmail