Get Vms Snapshots and Export Excel has completed.

This commit is contained in:
panjunlan
2026-02-19 15:35:27 +08:00
parent 55719ed953
commit 3332e3b865
10 changed files with 748 additions and 74 deletions

35
config/config.yaml Normal file
View File

@@ -0,0 +1,35 @@
# 管理节点配置包含vCenter和ESXi
management_nodes:
# vCenter节点
- type: vcenter # 标记类型为vcenter
name: vc1 # 节点名称(用于日志)
host: 192.168.40.134 # 地址
user: administrator@lan.com
password: Root@2025
max_delete_concurrent: 4 # 该节点最大并发删除数
# ESXi节点未接入 vCenter 的 Esxi 主机)
- type: esxi # 标记类型为esxi
name: esxi1
host: 192.168.40.133
user: root # ESXi默认用root
password: Root@2025
max_delete_concurrent: 2 # ESXi性能较弱并发数可设小些
# 另一个ESXi节点
- type: esxi
name: esxi2
host: esxi2.example.com
user: root
password: esxi2_password
max_delete_concurrent: 2
# 全局策略配置
global:
snapshot_retention_days: 15
excel_output_path: ./vm_snapshots_report.xlsx
# excel_output_path: /tmp/vm_snapshots_report.xlsx
# log_file_path: /var/log/vm_snapshot_cleanup.log
log_file_path: ./vm_snapshot_cleanup.log
# ESXi连接特殊配置禁用SSL验证ESXi默认自签证书
disable_ssl_verify: true