VMware Cloud Community
lElOUCHE_79
Enthusiast
Enthusiast
Jump to solution

Manage Firwall VAMI with PowerCLI

Hello

it's possible to add a list of network in VAMI in bulk using PowerCLI?

Tags (3)
Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

You might want to have a look at Solved: Re: Invoke-VMScript. Pass variable in BASH - VMware Technology Network VMTN as an example on how to use Invoke-VMScript on a Linux box and use the sed to change a file on there.


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

View solution in original post

10 Replies
LucD
Leadership
Leadership
Jump to solution

Do you mean if PowerCLI has cmdlets to configure the networks on the VCSA appliance?
If that is what you ask, no there are no such cmdlets.

But there other ways to call the vami_config_net cli if that is what you mean.
The VCSA has the VMware Tools installed, so you could use Invoke-VMSCript.
Or use the  Posh-SSH module to use an SSH connection to the VCSA to execute said cli.


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

Reply
0 Kudos
lElOUCHE_79
Enthusiast
Enthusiast
Jump to solution

thanks LucD

Yep I mean the way 2 call VAMI  but I'm unsure about that. Can you provide me with some guidance?

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

Not sure what you mean by "guidance", it is either basic usage of the Invoke-VMScript cmdlet or basic usage of the Posh-SSH cmdlets.
For the latter, I have a short example in Use Posh-SSH instead of PuTTY


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

Reply
0 Kudos
lElOUCHE_79
Enthusiast
Enthusiast
Jump to solution

Please accept my apologies, I misspoke.

Can you give me a hand to add the bulk IP list?

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

Which vami_config_net command do you want to run through PowerCLI?


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

Reply
0 Kudos
lElOUCHE_79
Enthusiast
Enthusiast
Jump to solution

I just check vmware documentation regarding vami_config_net and i didn't find the information related to firewall so honestly not sure how to tacle this.

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

I suspect the only way in that case would be to edit the firewall.conf file (with sed).
That can be done with Invvoke-VMScript or through an SSH session.


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

lElOUCHE_79
Enthusiast
Enthusiast
Jump to solution

then, I will try to learn about Invvoke-VMScript, 🙂 

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

You might want to have a look at Solved: Re: Invoke-VMScript. Pass variable in BASH - VMware Technology Network VMTN as an example on how to use Invoke-VMScript on a Linux box and use the sed to change a file on there.


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

lElOUCHE_79
Enthusiast
Enthusiast
Jump to solution

Thank you 😉

Reply
0 Kudos