correct tap by br

This commit is contained in:
primardj 2024-02-01 03:26:14 +00:00
parent 5400d15b13
commit 20380fbd50

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. 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=br:<br-id> Connect the vm to the bridge <br-id>. Please use the script set-tap.sh as root to create the bridge. 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
"
@ -203,13 +203,13 @@ set_uefi() {
set_net() {
case "${1%:*}" in
"nat")
echo "ajout de l'interface ${1#*:}"
echo "add the interface ${1#*:}"
network="${network} \
-netdev user,id=${1#*:} \
-device virtio-net,netdev=${1#*:}"
;;
"tap")
echo "ajout de l'interface tap ${1#*:}"
"br")
echo "add bridge ${1#*:}"
if [ "${mac}" == "" ]
then
echo "error, no mac set"
@ -224,7 +224,7 @@ set_net() {
network="-nic none"
;;
*)
echo "type ${1%:*} not known, it should be either nat, tap or none" >&2
echo "type ${1%:*} not known, it should be either nat, br or none" >&2
exit 1
;;
esac