VMware Cloud Community
zenivox
Hot Shot
Hot Shot
Jump to solution

VCSA VAMI proxy settings

Hello, anybody knows if there are powercli cmdlets for enabling/disabling the VCSA proxy that is avaiable in the VAMI page? I can't find any..

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

No cmdlets, but you can use the REST APIs since vSphere 6.7

Find documentation here.


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

View solution in original post

0 Kudos
8 Replies
LucD
Leadership
Leadership
Jump to solution

No cmdlets, but you can use the REST APIs since vSphere 6.7

Find documentation here.


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

0 Kudos
LucD
Leadership
Leadership
Jump to solution

A simple example

Connect-CisServer -Server <MyVCSA>

$proxy = Get-CisService -Name 'com.vmware.appliance.networking.proxy'

$proxy.get('http')      # Other protocols are https and ftp


$config = $proxy.Help.set.config.Create()

$config.enabled = $true

[VMware.VimAutomation.Cis.Core.Types.V1.Secret]$config.password = 'VMware1!'

$config.port = 9512

$config.server = 'http://myproxy.domain'

$config.username = 'proxyUser'

$proxy.set('http',$config)

To remove the proxy setting for a protocol you can do

$proxy.delete('http')


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

0 Kudos
zenivox
Hot Shot
Hot Shot
Jump to solution

many thanks Luc! Unfortunately no 6.7 yet Smiley Sad I'll keep it in mind after the upgrade! Cheers!

0 Kudos
DavidGriswold66
Contributor
Contributor
Jump to solution

I know this is an old thread, but one of few I have found that relate to the exact need I have. I do not have CLI access to the VCSA (it is a Google GCVE deployment) BUT I can access via PowerCLI with the admin account.

I do not want to disable HTTPS proxy as it has been configured by Google for a reason, but I need to add a FQDN and IP to the NO_PROXY settings, like below if I had CLI access:

Add the Primary vCenter to the NO_PROXY list in /etc/sysconfig/proxy

  • Take an SSH session to your vCenter using “Putty”
  • Edit the proxy configuration file using “vi” #vi /etc/sysconfig/proxy
  • Add the target vCenter to the NO_PROXY section.
  • Save the changes “wq!”
0 Kudos
LucD
Leadership
Leadership
Jump to solution

Is there a question here?


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

0 Kudos
DavidGriswold66
Contributor
Contributor
Jump to solution

Yes - how do I use the 'no_proxy' service to add addition hosts to the list?

0 Kudos
DavidGriswold66
Contributor
Contributor
Jump to solution

I figured it out.

$temp1 = Get-CisService -Name 'com.vmware.appliance.networking.no_proxy'
$servers = $temp1.Help.set.servers.create()
$servers.Add("127.0.0.1")
$servers.Add("localhost")
$servers.Add("testserver.domain.local")
$temp1.set($servers)

$temp1.get()
127.0.0.1
localhost
testserver.domain.local

0 Kudos
LucD
Leadership
Leadership
Jump to solution

Correct, make sure to read the instructions at the beginning of the REST API reference for no-proxy PUT.


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

0 Kudos