correct tap by br
This commit is contained in:
parent
5400d15b13
commit
20380fbd50
1 changed files with 5 additions and 5 deletions
10
vm-start.sh
10
vm-start.sh
|
@ -38,7 +38,7 @@ OPTION available
|
||||||
-display gtk -vga qxl
|
-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.
|
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=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
|
net=none The vm will have no network interface
|
||||||
"
|
"
|
||||||
|
|
||||||
|
@ -203,13 +203,13 @@ set_uefi() {
|
||||||
set_net() {
|
set_net() {
|
||||||
case "${1%:*}" in
|
case "${1%:*}" in
|
||||||
"nat")
|
"nat")
|
||||||
echo "ajout de l'interface ${1#*:}"
|
echo "add the interface ${1#*:}"
|
||||||
network="${network} \
|
network="${network} \
|
||||||
-netdev user,id=${1#*:} \
|
-netdev user,id=${1#*:} \
|
||||||
-device virtio-net,netdev=${1#*:}"
|
-device virtio-net,netdev=${1#*:}"
|
||||||
;;
|
;;
|
||||||
"tap")
|
"br")
|
||||||
echo "ajout de l'interface tap ${1#*:}"
|
echo "add bridge ${1#*:}"
|
||||||
if [ "${mac}" == "" ]
|
if [ "${mac}" == "" ]
|
||||||
then
|
then
|
||||||
echo "error, no mac set"
|
echo "error, no mac set"
|
||||||
|
@ -224,7 +224,7 @@ set_net() {
|
||||||
network="-nic none"
|
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
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in a new issue