diff --git a/set-tap.sh b/set-tap.sh index 15ee91d..ca78403 100755 --- a/set-tap.sh +++ b/set-tap.sh @@ -19,7 +19,7 @@ PARAMETTER available OPTION available --add-br-id= Set the name for the new bridge interface, usually it is br0, br1, etc --rm-br-id= Remove a bridge interface. Be carefull, it do no verification wheither bridge-id is a real interface or a bridge interface. - --addr=
Set an external address on the bridge. The external is the one accessible from the host. #TODO + --addr=
Set an external address on the bridge. The external is the one accessible from the host. --replace= In case you want to replace the main connexion of your computer so that only the vm will be able to reach the external network, replace interface by the interface you want to replace, and make sure that the --addr is set to one of the ip on the interace. Please not that it will be possible for your host to lost all connection to the external internet with this parametter. " Version="1.0" @@ -99,6 +99,7 @@ for i in $@; do bridge="${i#*=}" echo "${bridge}" rm_bridge + exit 0 ;; "--addr") address="${i#*=}" @@ -121,6 +122,11 @@ then exit fi +if [ ! "${address}" == "" ] +then + ${rooter} ip a add dev ${bridge} ${address} +fi + diff --git a/vm-start.sh b/vm-start.sh index cbdb705..3e9d30e 100755 --- a/vm-start.sh +++ b/vm-start.sh @@ -30,7 +30,7 @@ COMMAND available OPTION available --nproc= Def the number of proc of the vm --memory= Def the qty of memory allocated to the vm - --size= Def the size that should be allocated by create #TODO + --size= Def the size that will be allocated by create. Have no effect on other commands. --uefi Select if there will be an UEFI by default. can be either set or unset. By default is unset. --options=