How to determine the Open vSwitch port assigned to a VM instance in OpenStack

less than 1 minute read

This post describes a method to determine quickly what OVS ports are assigned to an OpenStack VM instance. It does require access to the OpenStack network CLI client.

Retrieve the port-list and grep for the IP address assigned to the port.
# quantum port-list | grep 192.168.20.3
| c656b76e-fd0c-4f34-b6b0-57fcc4a9480b | | fa:16:3e:99:9c:bf | {"subnet_id": "20bcb936-c033-4e4d-bd08-e54e6a54312b", "ip_address": "192.168.20.3"} |

Using the first 8 characters of the port's ID, query OVS for the network interfaces assigned to the port.
# ovs-vsctl show | grep c656b76e
Port "qvoc656b76e-fd"
Interface "qvoc656b76e-fd"

Updated: