Skip to content

Releases: ryran/valine

elydoric unwiped shillalah

30 Mar 03:54
b4f324a
Compare
Choose a tag to compare

Changelog:

  • Implemented set-mem and set-maxmem commands #16
  • Updated Change-media command to canonicalize relative paths to iso files #27

laudably valiant meerkat

24 Feb 06:38
5975d2a
Compare
Choose a tag to compare

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 now sudo -n lvm, i.e., requiring nopasswd -- 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 use new-snap, revert-snap, or Delete-snap, gracefully exit with an error and explanation
  • State files get deleted by NUKE now

valentine squeeze

14 Feb 22:50
Compare
Choose a tag to compare

Changelog:

  • rename NUKE shortcut of "K" to "N"
  • get rid of extra blank lines in the standard list output

gleemen gamogamy

13 Feb 09:31
e3ea090
Compare
Choose a tag to compare

Wow! I got a little carried away tonight and spent 6 hours on this. Here's the changelog:

  • #8 Rename shutdown w/ h shortcut to Shutdown 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: make start, shutdown, destroy, hibernate execute
    conditionally (e.g., when doing valine -a shutdown it would previously
    print errors for all the VMs that were already off)
  • #5 valine --help now automatically pipes itself to less -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
  • #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 include virsh dominfo and virsh domblklist output
    in addition to snapshot-details

lightless fluster

03 Feb 05:40
8b60be2
Compare
Choose a tag to compare

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 for virsh
  • 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
 └──────────────────────────────────────────────────────────────────────────────