mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-04-07 20:35:27 +02:00
+ Fix hyperv node-snapshot
This commit is contained in:
parent
74c4060b5a
commit
91091f8348
@ -58,10 +58,14 @@ Try {
|
||||
if ($vm.status -imatch "Backing") {
|
||||
$VMDisks = Get-VMHardDiskDrive -VMName $vm.VMName
|
||||
Foreach ($VMDisk in $VMDisks) {
|
||||
if ($VMDisk.Path -imatch ".avhdx" -or $VMDisk.VhdType -imatch "Differencing") {
|
||||
$vhd = Get-VHD $VMDisk.Path
|
||||
$parent = Get-Item $vhd.ParentPath
|
||||
$VHD = Get-VHD $VMDisk.Path
|
||||
if ($VHD.Path -imatch ".avhdx" -or $VHD.VhdType -imatch "Differencing") {
|
||||
$parent = Get-Item $VHD.ParentPath
|
||||
if ($i -eq 0) {
|
||||
Write-Host "[name=" $vm.VMName "][state=" $vm.State "][note=" $note "]"
|
||||
}
|
||||
Write-Host "[checkpointCreationTime=" (get-date -date $parent.LastWriteTime -UFormat ' . "'%s'" . ') "]"
|
||||
$i=1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user