Releases: ryran/valine
Releases · ryran/valine
elydoric unwiped shillalah
laudably valiant meerkat
All about #24
- lvm state files moved from
/etc/valine
to/var/lib/valine
- If
/var/lib/valine
doesn't exist and it needs to be created,valine
exits with an explanation of how to create it - When doing normal printing and an lvm state file exists: replaced calls to
sudo lvm lvs
with other logic - All
sudo lvm
commands are nowsudo -n lvm
, i.e., requiringnopasswd
-- i.e., they fail if sudo needs to ask for a password - If a statefile doesn't exist for a VM with lvm storage and the current user can't do
sudo -n lvm
, we gracefully continue -- print a warning to stderr but still display the primary storage as reported by xml - If a user that can't do
sudo -n lvm
tries to usenew-snap
,revert-snap
, orDelete-snap
, gracefully exit with an error and explanation - State files get deleted by
NUKE
now
valentine squeeze
Changelog:
- rename NUKE shortcut of "K" to "N"
- get rid of extra blank lines in the standard list output
gleemen gamogamy
Wow! I got a little carried away tonight and spent 6 hours on this. Here's the changelog:
- #8 Rename
shutdown
w/h
shortcut toShutdown
w/S
shortcut - #2 Add
h|hibernate
cmd - #3 Add
l|loop-ssh
cmd - #10 Add
C|Change-media
cmd to insert/eject isos - #14 Add
H|Hard-reboot
cmd - #4 Fix for
--all
: makestart
,shutdown
,destroy
,hibernate
execute
conditionally (e.g., when doingvaline -a shutdown
it would previously
print errors for all the VMs that were already off) - #5
valine --help
now automatically pipes itself toless -R
- #6 Intelligently hide subcommands based on VM state, i.e.:
- Only suggest
start
if VM is off - Only suggest
revert-snap
&Delete-snap
if VM has snapshots - Only suggest
Change-media
if VM has cdrom - Only suggest
console
,Shutdown
,Hard-reboot
,destroy
,hibernate
if
VM is running
- Only suggest
- #7 Get rid of forced 2sec sleep when using
NUKE
- #17 Enhance
valine DOMAIN
output, i.e., when run against a VM with no
subcommand we now also includevirsh dominfo
andvirsh domblklist
output
in addition to snapshot-details
lightless fluster
valine was previously housed in https://github.com/ryran/b19scripts ... With some of the future work I have planned, it was time to move it to its own repo. Here's the initial release, which compared to the old one has the following changes:
/usr/bin/valine
instead of/usr/sbin/valine
- No longer requires root access to be run
- Instead, expects you to have added users to the
libvirt
group forvirsh
- For lvm snapshotting, it explicitly calls
sudo lvm {lvs|lvcreate|lvremove}
- Renamed subcommands:
revert ==> revert-snap
Delete ==> Delete-snap
new ==> new-snap
- Added subcommand
NUKE
to delete a VM and all of its storage (has confirmation prompt + a 2 second-pause)
Note that all sub-command short-names are still available -- but don't take my word for it; check the help page. Here's an excerpt:
Starting/stopping/accessing/deleting domains with valine:
┐
│valine DOMAIN {s|start} | {h|shutdown} | {d|destroy} | {c|console} | {K|NUKE}
│
│start, shutdown, destroy, console commands are available as a convenience due
│to virsh's lack of intelligent BASH tab-completion
│The NUKE command is equivalent to running:
│ virsh destroy DOMAIN
│ virsh undefine --snapshots-metadata --remove-all-storage DOMAIN
└──────────────────────────────────────────────────────────────────────────────
Managing ALL domains at once with valine:
┐
│valine --all [ {n|new-snap} | {r|revert-snap} | {s|start} |
│ {h|shutdown} | {d|destroy} ]
│
│Replace DOMAIN with '--all' (or '-a') to operate on all detected domains in
│parallel (jobs are backgrounded, verbose output is lessened, and cancelling
│requires double Ctrl-c)
│Note: Does not work with console or Delete-snap or NUKE commands
│As above, the --off switch is optional with new-snap and revert-snap
└──────────────────────────────────────────────────────────────────────────────