VMware Networking Community
rupeshjain
Contributor
Contributor

How to extract Security Group attached to a list of virtual machines?

Hi,  

I need to extract security group of few VM's in my NSX setup. is there any easier way to do this rather then doing it manually by going on all the VM's summary page one by one.    

Thanks

Tags (1)
Reply
0 Kudos
3 Replies
ashsevenuk80
Enthusiast
Enthusiast

Sorry are you wanting to  export the list of VM in the security group?

Reply
0 Kudos
DaleCoghlan
VMware Employee
VMware Employee

The API can provide this information for you.

GET /api/2.0/services/securitygroup/lookup/virtualmachine/{virtualMachineId}

Reply
0 Kudos
rupeshjain
Contributor
Contributor

Thanks Dale,

How to get the VM ID of multiple VM's. The thing is i have around 4k Vm in my environment and i want to get the security group information of 100 VM's. is there any easy way to do that?

Regards

Reply
0 Kudos