Created
November 28, 2019 20:43
-
-
Save 8bitnz/a674ac46b95bf06f67f69f2bfec0df53 to your computer and use it in GitHub Desktop.
VMware vCloud Availability Replicator Fix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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