- Shell 100%
| archlinux | ||
| Documentation/Images | ||
| .gitignore | ||
| README.md | ||
| sv | ||
| sv-completion | ||
sv
Bashscript-based starter for virtual machines (libvirt)
overview
sv will ask your running libvirtd for your available virtual machines and present them in a list to choose from. The selected domain will be started, and virt-viewer will connect to it.
screenshots
graphical interface
text mode interface
why?
I prefer using virt-viewer over the embedded viewer in virt-manager. Using sv you have the opportunity to start and use any of your virtual machines with just 1 or 2 clicks.
It is also possible using libvirt running on a remote machine. This is as easy as running
sv -c user@host or by setting the environment variable SV_CONNECTION to user@host.
Forget about connection strings like qemu+ssh://user@host/system. sv is managing this for you.
key features
- choose domain by number (text mode), mouse click (graphical mode) or parameter (cli, -d)
- start virtual domain and connect to it (default, -d), only start domain (-n), or shutdown domain (-s)
- connect to local running libvirt (default) or to libvirt running on a remote machine (for this using public key authentication is strongly recommended).
- If a domain is given on the command line, this domain is started/attached to/shutdown directly. No menu for selection is shown in this case.
- bash completion is included
usage
Just start sv for text mode or sv -g for graphical mode.
Here are all available options:
-a: select/attach to a already running domain
-c c: c is connection for ssh-access like user@host
-C: check for running libvirtd before using it
-d D: start domain named D
-f: start virt-viewer fullscreen (needs wmctrl)
-g: use graphical layout
-h: show this help
-H: height of graphical window (default 380)
-l: list all known domains
-n: only start domain, don't start virt-viewer
-o: once: exit sv after first selection (default)
-O: not once: loop until quit is selected
-s: shutdown a running domain
-t: time to wait in s before refreshing the domain list (2.5 s)
-v: show versions and exit
installation
archlinux user
Download the zipped repo from this site, unzip it. Change to the directory sv and execute
makepkg -sic
The installation will take care for fulfilling the requirements (see below).
other distros
Download the zipped repo from this site, unzip it. Change to the directory sv and execute
sudo install sv /usr/local/bin
sudo install -m644 sv-completion /usr/share/bash-completion/completions/sv
Make sure the requirements (see below) are met.
hints
- sv will run in a loop until quit is selected if
-O/--notonceis given. - normally only inactive domains are listed. Giving -a or -s inverts this and only active domains are listed.
requirements
- bash
- libvirt
- virt-viewer
- yad
- wmctrl (optional, needed for -f/--fullscreen)

