Identifying VMs Associated with a Specific Security Group in OpenStack

Problem

How to identify Virtual Machines (VMs) that are associated with a specific Security Group within their OpenStack environment using CLI.

Environment

  • Platform9 Managed OpenStack - v4.0 and Higher

Procedure

1. Identify Ports Associated with a Security Group:

  • Open a terminal session and authenticate with your OpenStack environment.
  • Execute the following command to list all ports associated with the desired Security Group. Replace <security_group_id> with the actual ID of the Security Group you are interested in:
Bash
Copy
  • Note down the port IDs returned by the command.

2. Find VMs Attached to These Ports:

  • For each port ID identified in the previous step, execute the following command to display details about the port. Replace <port_id> with the actual port ID:
Bash
Copy
  • Look for the device_id __field in the output of each command. This device_id is the ID of the VM attached to the port.

3. Retrieve VM Details:(Optional)

  • If further details about the VM are required, use the following command, replacing <vm_id> with the device_id found in the previous step:
Bash
Copy
  • This command will provide comprehensive details about the VM, including its name, status, and other relevant information.

Additional Information

VariableType to search · ESC to discard
GlossaryType to search · ESC to discard
InsertType to search · ESC to discard
No matches