table of contents
PVIRSH(1) | VM definition tuner | PVIRSH(1) |
NAME¶
pvirsh - Parallel virsh command
SYNOPSIS¶
pvirsh [OPTIONS]
DESCRIPTION¶
pvirsh is a parallel virsh command to manage selected group of Virtual Machine. This provide an easy way to execute the same command on a selected group of Virtual Machine.
Today if you want to manage more than one Virtual Machine you need to script your action and this will be done in a sequential way (most of the time). pvirsh is a wrapper to launch async management command on a group of Virtual Machine.
pvirsh is launched in interactive mode by default.
CONFIGURATION¶
If you are using an RPM package, the default group configuration yaml file will be in /etc/pvirsh directory. If you are using the setup.py it will be in /usr/share/pvirsh/ directory. Its possible to not use a group yaml by selecting vm from a list (select_vm).
XML DEVICES DEFINITION¶
All xml default device definition are in /usr/share/pvirsh/xml directory.
FEATURES¶
- Launch parallel command on mulitiple Virtual Machine selected by group (or in a list)
- Auto-completion of the virsh domain command
- Reports of error/success per Virtual Machine
- Interactive mode with intelligent prompt (display group, yaml file and connector)
- Interactive terminal or a one shot command
- Colored prompt to easily catch up trouble and syntax
- yaml file group: default is groups.yaml, possible to change to any other file
Interactive command¶
- conn: connect to an Hypervisor
- show_xml_path: show the current path to the XML device definition
- xml_path: choose path to the XML device definition
- file: select the group yaml file
- show_file: show the current yaml file used
- show_group: show all groups available
- select_group: select the group of Virtual Machine to work on
- show_vm: display the list of VM selected according to the current group(s)
- show_all_vm: display the list of all Virtual Machine available in current Hypervisor
- select_vm: select Virtual Machine(s) to work on (multiple selection possible separate by ,)
- cmd: execute a domain command
- hcmd: help on virsh command (display options)
- add_dev: easy way to add a device to a group of Virtual Machine
- remove_dev: easy way to remove a device to a group of Virtual Machine
- start: start a group of Virtual Machine
- shutdown: shutdown a group of Virtual Machine
- shell: execution of a system command
OPTIONS¶
- -h, --help
- show this help message and exit.
- -s, --showgroup
- Show group from the yaml group file
- --conn CONN
- Connect to the hypervisor (local | ssh)
- -g, --group GROUP
- Group of VM to use (could be a list separated by ,)
- -f, --file FILE
- Group file to use as yaml file
- -n, --noninter
- Launch this tool in non interactive mode
- --c, --cmd CMD
- Command to execute on a group of VM
AUTHORS¶
Written by Antoine Ginies
2023-03-03 | 2.2 |