add possibility to connect two vm on the same bridge.

This commit is contained in:
primardj 2024-02-01 02:24:27 +00:00
parent 72d1cbd2f5
commit 6cd83509f6

View file

@ -38,7 +38,7 @@ OPTION available
-display gtk -vga qxl
create_disk=<loc_disk> Def a create disk to boot on. Is necessary for using create, or need the variable INSTALLATION_DISK_LOCATION to be set.
net=nat:id Add a nat connection to the vm. By default there is already one.
net=tap:<tapInterface> Connect the vm to the tap interface <tapInterface>. Please use the script set-tap.sh as root to create the tap interface. #TODO
net=tap:<tapInterface> Connect the vm to the tap interface <tapInterface>. Please use the script set-tap.sh as root to create the tap interface. in the conf file, a mac field have to be set. for two vm to connect togethers, their mac addresses on the same network have to be differents.
net=none The vm will have no network interface
"
@ -208,7 +208,15 @@ set_net() {
-device virtio-net,netdev=${1#*:}"
;;
"tap")
echo "tap"
echo "ajout de l'interface tap ${1#*:}"
if [ "${mac}" == "" ]
then
echo "error, no mac set"
exit 1
fi
network="${network} \
-netdev bridge,id=${1#*:} \
-device virtio-net,netdev=${1#*:},mac=${mac}"
;;
"none")
echo "no interface will be connected."