add networking options
This commit is contained in:
parent
247578fcb5
commit
de44bbf565
1 changed files with 5 additions and 0 deletions
|
@ -37,6 +37,9 @@ OPTION available
|
|||
options=<option> additinal options to give to qemu. By default is
|
||||
-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 Add a nat connection to the vm. By default there is already one #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. #TODO
|
||||
net=none The vm will have no network interface #TODO
|
||||
"
|
||||
|
||||
MAIN_LOCATION="$HOME/virtual_machine"
|
||||
|
@ -103,6 +106,8 @@ start_the_vm() {
|
|||
-smp "$NPROC" \
|
||||
-net nic \
|
||||
-net user"$FORWARD",hostname="$VMHOSTNAME" \
|
||||
-netdev user,id=id01,net=192.168.76.0/24,dhcpstart=192.168.76.9 \
|
||||
-device virtio-net,netdev=id01 \
|
||||
-m "$MEMORY" \
|
||||
-drive file="${MAIN_LOCATION}/${LOCATION}/${VMDRIVE}",index=2,id=maindrive,media=disk \
|
||||
$OPTION
|
||||
|
|
Loading…
Reference in a new issue