Compare commits

...

4 commits

Author SHA1 Message Date
Hippolyte Chauvin
14c8743207 README : documentation de qemush ls 2023-12-04 22:43:58 +01:00
Hippolyte Chauvin
528b702a88 README : sous-section d'installation pour first-free-port 2023-12-04 22:43:37 +01:00
Hippolyte Chauvin
42c2e24bb6 README : ligne à propos des dépendances 2023-12-04 22:43:18 +01:00
Hippolyte Chauvin
ab8b2c67cf README : section sur les bonnes pratiques 2023-12-04 22:42:48 +01:00

View file

@ -22,8 +22,25 @@ scripts](#write-a-launching-script) to make it work as intended.
`qemush` is **easy to setup** : you can make it work in a few steps, see `qemush` is **easy to setup** : you can make it work in a few steps, see
section [Installation instructions](#installation-instructions). section [Installation instructions](#installation-instructions).
## Good practices?
Here is a list of good practices forced by `qemush`.
- **Processes running as user `qemu`**: members of group `qemu` can manage
the same virtual machines
- **Modularization**: `qemush` launching scripts are intended to be
stackable to reuse common `qemu` parameters in all virtual machines
needing them
- **Process supervision**: `qemush` uses `screen` to supervise processes
and keep track of them
- **Copy-on-write**: images are formatted using `qcow2` to use less space
on disk
## Dependencies ## Dependencies
All dependencies are common packages for a distribution, you'll be able to
grab them from your packages sources.
- `qemu` - this is literally a QEMU wrapper so there's a chance you'll - `qemu` - this is literally a QEMU wrapper so there's a chance you'll
need it need it
- `bash` - the `qemush` interpreter - `bash` - the `qemush` interpreter
@ -58,6 +75,15 @@ Use your preferred way to add the `qemush` script to a folder of `PATH`.
Recommended : copy the script in `/usr/local/bin` to make it effortlessly Recommended : copy the script in `/usr/local/bin` to make it effortlessly
system wide. system wide.
### Extra: add `first-free-port` in `PATH`
`first-free-port` is a small C program designed accordingly to the Unix
philosophy to show in `stdout` the first free (not listening) TCP port
after `argv[1]`, or `argv[1]` if it is free. You can compile it and add
it to your `PATH` if you need to allocate ports to protocols like SPICE in
your launching scripts (example in `qemu/bin/*-spice`). Its source is in
`src` folder of this repository.
## Usage ## Usage
### Writing a launching script ### Writing a launching script
@ -82,3 +108,9 @@ You can launch any machine with the following command :
```sh ```sh
qemush start "$name" qemush start "$name"
``` ```
You can also list all available virtual machines by running this command :
```sh
qemush ls
```