I updated the script. It’s now extensible with bash aliases and external functions. The idea is to have handy commands that can do simple or complex things but keep it separated from the core function of the script which is targeting vm’s.
It no longer accepts all `prlctl` commands. It only allows commands that focuses on a single vm at a time.
Here’s the usage pattern:
Code:
Usage:
prlvm <command> [-a,--all][-t,--template] <search vm_[name|status]> [OPTIONS]
List commands:
prlvm [-c,--commands]
List virtual machines:
prlvm [-l,--list]
The -a flag will target all matching vm’s without prompting you. Without this flag, it will always focus on a single instance. When multiple matches are found, it will prompt you for a selection.
example (suspend all running vm’s):
Code:
prlvm suspend -a running
The -t flag targets templates. These are kept separate from normal vm’s.
The -c flag will list all acceptable commands. This includes the internal `prlctl` commands, aliases and custom functions. The latter two will have an asterisk marked next to their names.
The -l flag will list all virtual machines. Running vm’s will be colored.
It was a painful learning experience. I’ll eventually push it into a full github project.
Last edited: Sep 13, 2012