Skip to content

Instantly share code, notes, and snippets.

@8bitnz
Created November 28, 2019 20:43
Show Gist options
  • Save 8bitnz/a674ac46b95bf06f67f69f2bfec0df53 to your computer and use it in GitHub Desktop.
Save 8bitnz/a674ac46b95bf06f67f69f2bfec0df53 to your computer and use it in GitHub Desktop.
VMware vCloud Availability Replicator Fix
#Requires POSH-SSH
#Fix for replication bug 'Several days after upgrading to 3.0.3 or 3.0.4, the replications synchronization stops progressing'
#As detailed in release notes
#https://docs.vmware.com/en/VMware-vCloud-Availability/3.0.4/rn/VMware-vCloud-Availability-304-Release-Notes.html
$vca_replicators = @{
"rep01" = 'password'
"rep02" = 'password'
"rep03" = 'password'
"rep04" = 'password'
"rep05" = 'password'
"rep06" = 'password'
}
foreach ($vm in $vca_replicators.keys){
$password = $vca_replicators[$vm] | ConvertTo-SecureString -asPlainText -Force
$username = "root"
$credential = New-Object System.Management.Automation.PSCredential($username,$password)
$command = 'echo “TRAFFIC_ACCOUNTING=false” >> /opt/vmware/h4/lwdproxy/conf/lwdproxy.properties'
$session = New-SSHSession -Computername $vm -Credential $credential -AcceptKey
$result = Invoke-SSHCommand -SessionId $session.SessionId -Command $command
$result.output
$command = 'systemctl restart lwdproxy'
$result = Invoke-SSHCommand -SessionId $session.SessionId -Command $command
$result.output
Remove-SSHSession $session
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment