Skip to content

Commit

Permalink
Tca 23.11 (#7)
Browse files Browse the repository at this point in the history
* add edit passthrough cmd
* add shell/cli equiv
  • Loading branch information
tcarland authored Nov 30, 2023
1 parent 28a080b commit f61d4ab
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bin/kvm-mgr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Creates and manages KVM infrastructure using a JSON manifest.
#
PNAME=${0##*\/}
VERSION="v23.09"
VERSION="v23.11"
AUTHOR="Timothy C. Arland <tcarland@gmail.com>"

pool="default"
Expand Down
10 changes: 8 additions & 2 deletions bin/kvmsh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# Timothy C. Arland <tcarland@gmail.com>
#
PNAME=${0##*\/}
VERSION="v23.09"
VERSION="v23.11"
AUTHOR="tcarland@gmail.com"

# ------------------------------------
Expand Down Expand Up @@ -87,6 +87,7 @@ Options:
Actions:
create|delete <name> : Create or delete a VM (will not delete volumes).
define <xml> : Import or define a VM from the provided XML.
edit <name> : Edit the live XML configuration for a VM.
undefine|delete <name> : Remove a VM resource from virsh. Same as 'delete'
start|stop <name> : Start or stop a VM.
create-pool <dir> <n> : Creates a storage pool named <n> for a given dir.
Expand Down Expand Up @@ -490,6 +491,10 @@ create)
fi
;;

cli|shell)
virsh
;;

# --- CLONE VM
clone)
path="${poolmap[$pool]}"
Expand Down Expand Up @@ -536,6 +541,7 @@ get-mac*|mac-addr*)
# --- STATUS
status)
if [ -z "$name" ]; then
echo "$PNAME error: no target provided." >&2:w
exit 2
fi

Expand All @@ -544,7 +550,7 @@ status)
;;

# --- PASSTHROUGH OPERATIONS to virsh
start|suspend|restore|save|reset|resume|reboot|console|pool-info|info|dumpxml|define|dom*|checkpoint-*|net*|iface-*|nwfilter-*)
start|suspend|restore|save|reset|resume|reboot|console|pool-info|info|dumpxml|define|dom*|edit|checkpoint-*|net*|iface-*|nwfilter-*)
if [ $dryrun -eq 0 ]; then
( $virsh $action $name $args )
rt=$?
Expand Down

0 comments on commit f61d4ab

Please sign in to comment.