Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gitkaz/kvm_port_switcher
https://github.com/gitkaz/kvm_port_switcher
Last synced: 10 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/gitkaz/kvm_port_switcher
- Owner: gitkaz
- License: bsd-2-clause
- Created: 2018-01-10T13:19:52.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-11T12:37:35.000Z (almost 7 years ago)
- Last Synced: 2024-11-06T02:18:24.625Z (about 2 months ago)
- Language: Python
- Size: 416 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# kvm_port_switcher
## Demo Animation
![result](https://github.com/gitkaz/kvm_port_switcher/blob/media/interactive_mode_demo.gif)## What is this?
This is a Python Script for view and modify KVM guest (domain)'s interface configuration.
This scirpt is able to use either one-shot execution(normal cli command), and continuous interactive interface.## Limitations.
Server (libvirtd host) should use KVM. And domain interface configuration should based on portgroup.
Like this.
```
```
This script can change "**source**" element's attributes(**network** and **portgroup**, only).## usage
- one-shot execute and get domain and interface list.
- kvm_port_switcher -c "libvirt uri"
- one-shot execute and get network and porgroup list.
- kvm_port_switcher -c "libvirt uri" -n
- one-shot execute and change domain's interfe's network and portgoroup.
- kvm_port_switcher -c "libvirt uri" --set -i -p
- interactive mode.
- kvm_port_switcher -c "libvirt uri" -I## help
```
usage: kvm_port_switcher.py [-h] -c CONNECT [-I] [-d] [-n] [-s] [-i INTERFACE]
[-p PORTGROUP] [--dry]KVM virtual machine interface switcher
optional arguments:
-h, --help show this help message and exit
-c CONNECT, --connect CONNECT
Hypervisor(libvirtd) connection URI. always required.
-I, --Interactive Enable interactive mode
-d, --domain Show domain(virtual machine) and network insterface
list of connected hypervisor
-n, --network Show network and portrgoup list of connected
hypervisor
-s, --set Set mode. This mode configure your hypervisor
configuration. use with -i, -p and --dry.
-i INTERFACE, --interface INTERFACE
Specify modify interface by number
-p PORTGROUP, --portgroup PORTGROUP
Specify target portgroup by number
--dry Don't update real configuration. Just display before
and after Interface XML
```