Hi All,
VMware Cloud Director version: 10.1.2.16779297
So spent a good few hours searching and trying a few solutions across the web, and I can't seem to find a working example,
ExtensionData.VCloudExtension.any.VirtualDisksMaxChainLength - doesn't seem to do anything for me
I'd like to be able to add to my workflow of deploying / modifying vapp (and vms) a step to Consolidate VM Chain Length.
any guidance or working examples of how I might approach this? this is what I am referring to in UI
one of my collages figured this out, all working as desired.
$vms = get-org $CIOrg | Get-CIVApp $CIVAppName | Get-CIVM | Get-CIView
foreach ($vm in $vms) {
echo $vm.Name
echo $vm.VCloudExtension.GetValue(0).any.VirtualDisksMaxChainLength
try {
$task = $vm.Consolidate_Task()
Start-Sleep 1
while ((Get-Task -Id $task.Id).State -ne "Success" ) {
#Report power state
Write-Output "$($VM.name) - Percent: $((Get-Task -Id $task.Id).PercentComplete) / State: $((Get-Task -Id $task.Id).State)"
Start-Sleep .5
}
}
catch {
Write-Output " $($VM.name) Failed!"
}
}
one of my collages figured this out, all working as desired.
$vms = get-org $CIOrg | Get-CIVApp $CIVAppName | Get-CIVM | Get-CIView
foreach ($vm in $vms) {
echo $vm.Name
echo $vm.VCloudExtension.GetValue(0).any.VirtualDisksMaxChainLength
try {
$task = $vm.Consolidate_Task()
Start-Sleep 1
while ((Get-Task -Id $task.Id).State -ne "Success" ) {
#Report power state
Write-Output "$($VM.name) - Percent: $((Get-Task -Id $task.Id).PercentComplete) / State: $((Get-Task -Id $task.Id).State)"
Start-Sleep .5
}
}
catch {
Write-Output " $($VM.name) Failed!"
}
}