To enable FT for a VM:
Get-VM X | Get-View | % { $_.CreateSecondaryVM($null) }
This will choose a host, if you want to specify a specific host, pass the host's MOR in place of $null.
To disable, run:
Get-VM X | Select -First 1 | Get-View | % { $_.TurnOffFaultToleranceForVM() }
Note that in PowerCLI 4.0 Get-VM will return a fault tolerant VM twice, so we select the first one.
Carter,
I am I right in saying there's no method to enable FT logging on a vmkernel port in the SDK.
I remember asking this before but I can't remember the answer...
If it is possible - can you point me to the right location in the SDK online?
Regards
Mike Laverick
RTFM Education
Author of the SRM Book: http://www.lulu.com/content/4343147
Mike,
Take a look at ftCLI2.pl to configure FT logging for a given set of ESX(i) hosts for a given FT portgroup, I'm sure this can be accomplished in PowerCLI as well since this just uses the vSphere APIs
=========================================================================
William Lam
VMware vExpert 2009
VMware ESX/ESXi scripts and resources at:
VMware Code Central - Scripts/Sample code for Developers and Administrators
If you find this information useful, please award points for "correct" or "helpful".
Try this.
# Enable or disable FT logging. $esxHost = "192.168.1.11" $vmKernel = "vmk0" # You can get these out of Get-VMHostNetwork $enable = $true $hView = Get-VMHost $esxHost | Get-View -Property configManager $nicManager = Get-View $hView.configManager.virtualNicManager if ($enable -eq $true) { $nicManager.SelectVnicForNicType("faultToleranceLogging", $vmKernel) } else { $nicManager.DeselectVnicForNicType("faultToleranceLogging", $vmKernel) }
=====
Carter Shanklin