From c7605a2ac0dce2e4dc322a637f901191e2706100 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sat, 3 Dec 2022 05:34:34 -0300 Subject: bin/vm: Improve help string documentation --- bin/vm | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) (limited to 'bin/vm') 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 } -- cgit v1.2.3