aboutsummaryrefslogtreecommitdiff
path: root/bin/vm
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2022-12-03 05:34:34 -0300
committerEuAndreh <eu@euandre.org>2022-12-03 05:34:34 -0300
commitc7605a2ac0dce2e4dc322a637f901191e2706100 (patch)
treeb4e280c1d8dbaf5c6d969128130542e899a02aaf /bin/vm
parentbin/vm: Support -n for dry-run and "-- --flags" forwarding to QEMU (diff)
downloaddotfiles-c7605a2ac0dce2e4dc322a637f901191e2706100.tar.gz
dotfiles-c7605a2ac0dce2e4dc322a637f901191e2706100.tar.xz
bin/vm: Improve help string documentation
Diffstat (limited to 'bin/vm')
-rwxr-xr-xbin/vm27
1 files changed, 20 insertions, 7 deletions
diff --git a/bin/vm b/bin/vm
index 7304cb9..d82b396 100755
--- a/bin/vm
+++ b/bin/vm
@@ -25,7 +25,7 @@ help() {
- up
- down
- status
- OS the name of the OS to be acted upon
+ OS the name or prefix of the OS to be acted upon
QEMU_OPTIONS command line options to be given verbatim to QEMU
@@ -41,15 +41,22 @@ help() {
~/.ssh/config file, which contains one alias entry for each VM,
so that one can do a combination of `vm up alpine && ssh alpine`.
+ If the given OS name is a unique prefix, than it is enough to
+ guess the rest of the name, i.e. if there is only only type of
+ "Fedora" VM, fedora-amd64-headless, than saying "fedora" is enough.
+ Otherwise, a sufficiently uniqe prefix is required, like
+ "fedora-amd64", when there are more than one architecture of Fedora
+ VMs.
+
Examples:
- Start the VM for Alpine:
+ Start the VM for Alpine in verbose mode:
- $ vm up alpine
+ $ vm -v up alpine
- Stop the VM for Slackware, which was already down
+ Stop the VM for Slackware, which was already down:
$ vm down slackware
The VM for "slackware" is not running, already.
@@ -58,9 +65,15 @@ help() {
List the available VMs, and their current state:
$ vm status
- alpine up
- slackware down
- freebsd:up
+ alpine-amd64-headless up
+ slackware-amd64-plasma down
+ freebsd-amd64-headless up
+
+
+ Create a new VM, using graphics and verbose mode:
+
+ $ qemu-img create -f qcow2 $XDG_STATE_HOME/vm/qemu/debian-amd64-headless.qcow2 32G
+ $ vm -vG up debian -- -cdrom ~/Downloads/ISO/debian-11.5.0-amd64-netinst.iso
EOF
}