VMware Cloud Community
jvm2016
Hot Shot
Hot Shot
Jump to solution

vc_HA_powercli

HI Luc,

i am thinking to add vcenter high availability in folowing way but i did not find direct command to do that .can you please suggest some siple code to do this .

#vcenter HA configuration

write-host "checking vcenter High availabity solution"

$vcha=get-view failoverclusterconfigurator

$state=$vcha.getVchaConfig().state

if($state -eq "notconfigured")

{

write-host "configuring vcha cluster"

$activeip=Read-Host "provide active ip"

$activeip_mask=Read-Host "provide active ip mask"

$passivip=Read-Host "provide passive ip mask"

$passivip_mask=Read-Host "provide passive ip mask"

$witnessip=Read-Host "provide witness ip"

$witnessip_mask=Read-Host "provide witness ip net mask"

}

28 Replies
LucD
Leadership
Leadership
Jump to solution

The vCenters are not installed/visible under the vCenter you have access to in the lab afaik.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
jvm2016
Hot Shot
Hot Shot
Jump to solution

will check on other lsbs .thnaks

0 Kudos
jvm2016
Hot Shot
Hot Shot
Jump to solution

since its not self manged vcha cluster can not be configured here and other labs where vcenter is not self manged.

0 Kudos
LucD
Leadership
Leadership
Jump to solution

If there is no HoL for VCHA I suspect you will have to try/test this in a lab of your own.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
jvm2016
Hot Shot
Hot Shot
Jump to solution

i will try that .however i find powercli and powershell very addictive .

0 Kudos
LucD
Leadership
Leadership
Jump to solution

It is (and I should know) :smileygrin:


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
jvm2016
Hot Shot
Hot Shot
Jump to solution

just thought of asking your view if a vmware environment is implemented with following in one script .will it not carry lot of value to it.

1.update powercli

2.install posh-ssh

3.create ftp server

4.vcsa native back up

5.create content lib

6.vcha high avalability

0 Kudos
LucD
Leadership
Leadership
Jump to solution

Not really.
The only thing I would do, instead of using 1 script, create multiple scripts.
One for each functionality. Perhaps even consider a module.

And then use a main script that calls all these functions.

The big advantages would be (at least for me)

  • reusability
  • easier maintenance
  • 1 function = 1 task


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
jvm2016
Hot Shot
Hot Shot
Jump to solution

yes that can be easliy converted to .psm1 file consisting individual functions .but these features will be of great help if implemented .

0 Kudos