In this CBT bug, we all know there is fix from VMware http://kb.vmware.com/kb/2137545, this will fix the problem for the hosts and new VMs, not the VMs that we have. To fix the issue and have a proper backup vs restore we need to reset the CBT, and then Veeam as a PowerCli script that will fix CBT https://www.veeam.com/kb1113. My problem is whit this script.
Don't know if anyone had this problem with this script. But if I use this part in bold $ivms = get-vm | ?{$_.ExtensionData.Config.ChangeTrackingEnabled -eq $true}; i get this error:
Code: Select all
Get-VM : Cannot validate argument on parameter 'Name'. The argument is null or empty. Supply an argument that is not null or empty and then try the command again.
At C:\Users\edualuc\AppData\Local\Temp\Rar$DIa0.861\MassResetCBT.ps1:56 char:22
+ if ((Get-VM -name <<<< $vm).PowerState -ne "PoweredOn") {
+ CategoryInfo : InvalidData: (:) [Get-VM], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM
If I just comment the part #?{$_.ExtensionData.Config.ChangeTrackingEnabled -eq $true}; then the script can run and VMs can be displayed. But no check if the VMs has the CBT enable or not.
I have done some change on the script to try to get this to work, but I was never able to put this check to work.
Anyone had the same problem with this script??
I even created a small script just to check the if CBT was enable in a VM, but I get always false results. I think my problem is that I using the wrong object to check the CBT in the VM.
My example:
Code: Select all
$VMCBT = Get-Cluster "Cluster Test" | get-vm | ?{$_.ExtensionData.Config.ChangeTrackingEnabled -eq $true};
foreach ($VMCBTs in $VMCBT){
if ($VMCBTs | where {$_.ExtensionData.config.ChangeTrackingEnabled -eq $True}){
Write-Host ($VMCBTs.Name) ' CTB Disable'
} else { Write-Host ($VMCBTs.name) ' CBT is Enabled'}
}}
I need to run the Veeam Script this weekend in 2000+ VMs, and I need have the script running properly.
So anyone had similar issues with this script, or at least know the right object in the VM View to grab the enabled/disable CBT??
Thank You
JailBreak