VMware Cloud Community
admin
Immortal
Immortal

FT-enable a VM.

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.

Tags (3)
Reply
0 Kudos
3 Replies
Michelle_Laveri
Virtuoso
Virtuoso

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

http://www.rtfm-ed.co.uk

Author of the SRM Book: http://www.lulu.com/content/4343147

Regards
Michelle Laverick
@m_laverick
http://www.michellelaverick.com
Reply
0 Kudos
lamw
Community Manager
Community Manager

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

VMware Developer Comuunity

Twitter: @lamw

If you find this information useful, please award points for "correct" or "helpful".

Reply
0 Kudos
admin
Immortal
Immortal

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

Read the PowerCLI Blog

Follow me on Twitter

Reply
0 Kudos