add possibility to connect two vm on the same bridge.
This commit is contained in:
parent
72d1cbd2f5
commit
6cd83509f6
1 changed files with 10 additions and 2 deletions
12
vm-start.sh
12
vm-start.sh
|
@ -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."
|
||||
|
|
Loading…
Reference in a new issue