TUN/TAP Support first steps
This commit is contained in:
parent
a5e02be3d9
commit
f4d6a616fb
10
nlvmi
10
nlvmi
|
@ -69,7 +69,7 @@ function createdb {
|
|||
tapdev3 VARCHAR(50),
|
||||
macaddr3 VARCHAR(50),
|
||||
brdev3 VARCHAR(50),
|
||||
vncport VARCHAR(50),
|
||||
vncport INTEGER,
|
||||
websocket INTEGER,
|
||||
vncpasswort VARCHAR(50)
|
||||
);"
|
||||
|
@ -122,10 +122,10 @@ function vmstart {
|
|||
if [ ! -z ${array[27]} ]; then MACADDR3="-net nic,macaddr=${array[27]},model=virtio,netdev=net0"; fi
|
||||
if [ ! -z ${array[28]} ]; then BRDEV3="${array[28]}"; fi
|
||||
if [ ! -z ${array[29]} ]; then VNCPORT="-vnc :${array[29]},websocket=${array[30]},password"; fi
|
||||
# tunctl -t ${array[20]} -u ${array[2]}
|
||||
# brctl addif ${array[22]} ${array[20]}
|
||||
# ifconfig ${array[20]} up
|
||||
COMMAND=(su ${array[2]} -c "${array[4]} -enable-kvm $CPUTYPE $MEMORY $SMP -boot ${array[11]} $USBDEV -k ${array[9]} -daemonize $DRIVE1$FORMAT1 $DRIVE2$FORMAT2 $DRIVE3$FORMAT3 $CDROM $MACADDR1 $TAPDEV1 $BRDEV1 $MACADDR2 $TAPDEV2 $BRDEV2 $MACADDR3 $TAPDEV3 $BRDEV3 $VNCPORT $CUSTOM -pidfile $RUNDIRECTORY/${array[1]}.pid -monitor unix:$RUNDIRECTORY/${array[1]}.mon,server,nowait")
|
||||
tunctl -t ${array[20]} -u ${array[2]}
|
||||
brctl addif ${array[22]} ${array[20]}
|
||||
ifconfig ${array[20]} up
|
||||
COMMAND=(su ${array[2]} -c "${array[4]} -enable-kvm $CPUTYPE $MEMORY $SMP -boot ${array[11]} $USBDEV -k ${array[9]} -daemonize $DRIVE1$FORMAT1 $DRIVE2$FORMAT2 $DRIVE3$FORMAT3 $CDROM $MACADDR1 $TAPDEV1 $MACADDR2 $TAPDEV2 $MACADDR3 $TAPDEV3 $VNCPORT $CUSTOM -pidfile $RUNDIRECTORY/${array[1]}.pid -monitor unix:$RUNDIRECTORY/${array[1]}.mon,server,nowait")
|
||||
if [ $LOGLEVEL -gt "1" ]; then echo ${COMMAND[@]}; fi
|
||||
`"${COMMAND[@]}"`
|
||||
#Set VNC Password
|
||||
|
|
Loading…
Reference in New Issue