Enabling CBT on Powered On VM’s

This is something we usually do on VM’s Advanced Options setting the “ctkEnabled” parameter to True.

Thank to LazyWinAdmin I can do it with Powershell.

###########################################
# Enables CBT on a given Virtual Machine
###########################################
Param($VMName)
$vmtest = Get-vm $VMName | get-view
$vmConfigSpec = New-Object VMware.Vim.VirtualMachineConfigSpec
$vmConfigSpec.changeTrackingEnabled = $True
$vmtest.reconfigVM($vmConfigSpec)

But a restart or even a Snapshot creation/deletion procedure is needed before this changes take effect. Also you can check whether it is enabled or not :

(Get-VM -Name $VMNAME).ExtensionData.Config.ChangeTrackingEnabled
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s