script which permit me to launch all my vm thanks to qemu
Find a file
2024-02-04 11:38:30 +00:00
LICENSE Initial commit 2024-01-13 16:06:29 +01:00
README.md update part how to use the script 2024-02-03 01:06:22 +00:00
remote_connection.sh improve remote_connection.sh, now it's possible to put the protocol no matter where in the title. 2024-02-04 11:38:30 +00:00
setup_bridge.sh change usage jaaj for it to be more accurate. 2024-02-03 00:47:28 +00:00
vm-start.sh change usage jaaj vm-start.sh and add possibility to add address to a new bridge 2024-02-01 15:41:55 +00:00

vm-start

Description:

script which permit to launch easily some virtual machines via qemu

Dependencies:

  • qemu full installation

Optionnal Dependencies:

  • ssh to have possibility to connect via ssh with the remote_connection.sh script.
  • rsp to have possibility to connect via rsp with the remote_connection.sh script.

Functionnality:

  • use of config files [not fully ok]
  • start,create vm reading the config file [ok]
  • delete all data related to a vm [ok]
  • create a backup or being able to recall the bacup [ok - have to be improved]
  • start directly the backup file [ok]
  • list all vm already configured [ok]
  • print help of version number [ok]
  • support options to overrides the config file [ok]
  • can support launching vm in uefi mode [ok] (doesn't support automatic add of uefi in conf file.)
  • take option create_disk to know what disk to use when creating a vm. [ok]
  • compatible to an extensive network configuration [~ok] (don't work with conf file, and no possibility to bridge over an existing interface.)

Next changes to come

  • put the path of the creation disk on the config file
  • add vnc support
  • add an option -ng, --nographic with it's parametters assiciated.
  • majors changes in setup_bridges.sh, it will be from this point called

setup_bridges 'bridge_name' add|rm [--ip=<ip> | --imaster=<interface_master>]

Usage:

to get some help;

vm-start --help

to list all vm already configured

vm-start --list

to create a new vm

vm-start <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.

setup_bridge.sh --add-br-id=br0
setup_bridge.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.