Posts

Showing posts from December, 2015

Fixing locked changed block tracking file in VMware with PowerShell and PowerCLI

Around a month ago, several VMs in my VMWare environment failed to migrate with the error message related to locked changed block tracking file. During the troubleshooting,  my coworker and I discovered a workaround by enable/ disable the CBT feature on affected VM. That setting can be changed in GUI when the VM is in power-off state. Cool. But wait, how about the production VMs that can't be shutdown unless someone wants to get the resume ready? Well, further research revealed that one can workaround that limitation with snapshot. So with some effort, here are the script we used to fix the problem on production VMs. Now, that's very cool. Here is the script: # Fix the locked changed block tracking file for vms in a VMWare environment. # It it achieved by flipping the changed block tracking settings. # Snapshot is used as an alternative so the setting can be changed. # Requires VMWare PowerCLI 5.1 and PowerShell V3 or above. #Add the required PowerPL