{"id":16963990,"url":"https://github.com/hellt/brvirt","last_synced_at":"2025-10-26T18:19:30.464Z","repository":{"id":74018102,"uuid":"77535816","full_name":"hellt/brvirt","owner":"hellt","description":"brvirt displays bridges and enclosed interfaces along with corresponding KVM Virtual Machines names and virsh domain ids.","archived":false,"fork":false,"pushed_at":"2017-01-05T06:33:07.000Z","size":4,"stargazers_count":7,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T18:40:35.634Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://noshut.ru/2016/12/brvirt-when-brctl-meets-virsh/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hellt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-28T13:45:39.000Z","updated_at":"2017-11-20T05:35:19.000Z","dependencies_parsed_at":"2023-09-24T02:29:12.211Z","dependency_job_id":null,"html_url":"https://github.com/hellt/brvirt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellt%2Fbrvirt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellt%2Fbrvirt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellt%2Fbrvirt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellt%2Fbrvirt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hellt","download_url":"https://codeload.github.com/hellt/brvirt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248490618,"owners_count":21112799,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T23:26:50.850Z","updated_at":"2025-10-26T18:19:25.412Z","avatar_url":"https://github.com/hellt.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# About brvirt\n`brvirt` displays bridges and enclosed interfaces along with corresponding\nKVM Virtual Machines names and virsh domain ids.\n\nIt answers one simple question:\n**How to determine which virtual interface belongs to which virtual\nmachine and what bridge it is in?\"**\n\n![brvirt_demo](https://img-fotki.yandex.ru/get/197852/21639405.11d/0_8b9d6_3d8bd18_orig.gif)\n# Requirements\nThe script is compatible with `python2.7` and `python3+`.\n\n- `brvirt` uses `virsh` tool to list VM properties and virtual network interfaces. To install `virsh` use:\n```\n # on Debian-based distros:\nsudo apt-get install libvirt-bin\n\n # on RHEL based:\nsudo yum install libvirt\n```\n\n- Apart from virsh, the script relies on [tabulate](https://bitbucket.org/astanin/python-tabulate) python package to render console tables:\n```shell\nTABULATE_INSTALL=lib-only pip install tabulate\n```\n\n# Usage\nAs simple as `python brvirt.py`\nwill produce the following output which combines `brctl` and `virsh domiflist` commands output:\n```\n(brvirt) [root@leo ~]# python brvirt.py\n+----------+---------------+-----------+-------------+--------------------+\n| Bridge   | Interface     | VM name   | Domain ID   | Int. MAC address   |\n|----------+---------------+-----------+-------------+--------------------|\n| br0      | eno1          |           |             | 28:80:23:90:ea:28  |\n|          | vnet0         | cobbler   | 8           | 52:54:00:5a:a9:2c  |\n|          | vnet4         | nuage-dns | 4           | 52:54:00:db:45:92  |\n| br1      | eno2          |           |             | 28:80:23:90:ea:29  |\n|          | vnet1         | cobbler   | 8           | 52:54:00:9b:c2:dc  |\n| br999    | eno2.999@eno2 |           |             | 28:80:23:90:ea:29  |\n+----------+---------------+-----------+-------------+--------------------+\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellt%2Fbrvirt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhellt%2Fbrvirt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellt%2Fbrvirt/lists"}