vm-start/README.md

75 lines
2.4 KiB
Markdown
Raw Normal View History

2024-01-13 16:06:29 +01:00
# vm-start
## Description:
script which permit to launch easily some virtual machines via qemu
## Dependencies:
- <u>qemu</u> full installation
2024-01-31 21:57:21 +01:00
## Functionnality:
- create a config file to stores options for a vm [~]
- start a vm while reading for the conf file [ok]
- create a vm with the ability to choose an iso disk to launch the vm [ok]
- del all sata related to a vm [~ok] (misses deleted conf file)
- create a backup or being able to recall the bacup [ok] (can be improved)
- start directly the backup file [ok]
- can create only the conf file instead of starting/creating vm [ok]
- list all vm already created [ok]
- print help of version number [ok]
- support option nproc to launch the vm with a different number of proc than precised in the config file [ok]
- same for option memory [ok]
- same for option size, size is only usefull when creating a vm [ok]
- can support launching vm in uefi mode [ok] (doesn't fully support the UEFI in conf mode, preffer use the option uefi while launching vm.)
- can add customs options to a vm [ok]
- take option create_disk to know what disk to use when creating a vm. [ok]
- compatible to an extensive network configuration [~ok] (can work either with nat or bridge of even without any network. By default it is one interface by nat, and don't work whith the config file yet.)
2024-01-31 21:57:21 +01:00
## Usage:
### to get some help;
vm-start --help
### to list all vm already configured
vm-start --list
### to create a new vm
vm-strart <nom_de_la_vm> create create_disk=<location_of_iso_file>
you can of course add options like uefi to tun in uefi mode, or nproc=<nb_proc> to select a number of processors.
If you go to the conf folder created the first time you launch the script, you will find all configured variables for each of your vm.
### to connect two vm on different networks at a gateway nat.
first, run the script set-tap.sh to create two bridges.
```
set-tap.sh --add-br-id=br0
set-tap.sh --add-br-id=br1
```
after that change the mac address of all vm in conf folder.
```
vm-1 from 00:00:00:00:00:00 to 00:00:00:00:00:01
vm-2 from 00:00:00:00:00:00 to 00:00:00:00:00:02
```
and start the gateway and the vms after.
```
vm-start.sh gateway start net=br:br0 net=br:br1 net=nat:id01
vm-start.sh vm-1 start net=br:br0
vm-start.sh vm-2 start net=br:br1
```
And that's it, your three vm are now connected. You just have now to do some configurations on thoses vms.