|
|
|
@ -11,6 +11,9 @@ vms="$RUN/vm_*.pid"
|
|
|
|
|
alpine="$RUN/vm_alpine_*.pid"
|
|
|
|
|
alpine1="$RUN/vm_alpine_1.pid"
|
|
|
|
|
alpine2="$RUN/vm_alpine_2.pid"
|
|
|
|
|
win="$RUN/vm_win_*.pid"
|
|
|
|
|
win1="$RUN/vm_win_1.pid"
|
|
|
|
|
win2="$RUN/vm_win_2.pid"
|
|
|
|
|
kali="$RUN/vm_kali.pid"
|
|
|
|
|
proxy2="$RUN/proxy_2.pid"
|
|
|
|
|
proxy3="$RUN/proxy_3.pid"
|
|
|
|
@ -23,18 +26,24 @@ start)
|
|
|
|
|
case "$2" in
|
|
|
|
|
network | all)
|
|
|
|
|
echo "Starting VDE network for QEMU: "
|
|
|
|
|
vde_switch -daemon -s $RUN/sw_main.sock -p $RUN/net_sw_main.pid
|
|
|
|
|
vde_switch -daemon -s $RUN/sw_proxy1.sock -p $RUN/net_sw_proxy1.pid
|
|
|
|
|
vde_switch -daemon -s $RUN/sw_proxy2.sock -p $RUN/net_sw_proxy2.pid
|
|
|
|
|
vde_switch -daemon -s $RUN/sw_proxy3.sock -p $RUN/net_sw_proxy3.pid
|
|
|
|
|
vde_switch -x -daemon -s $RUN/sw_main.sock -p $RUN/net_sw_main.pid
|
|
|
|
|
vde_switch -x -daemon -s $RUN/sw_proxy1.sock -p $RUN/net_sw_proxy1.pid
|
|
|
|
|
vde_switch -x -daemon -s $RUN/sw_proxy2.sock -p $RUN/net_sw_proxy2.pid
|
|
|
|
|
vde_switch -x -daemon -s $RUN/sw_proxy3.sock -p $RUN/net_sw_proxy3.pid
|
|
|
|
|
slirpvde -D -H 10.0.0.2 --daemon -s $RUN/sw_main.sock -p $RUN/net_slirp.pid
|
|
|
|
|
;;&
|
|
|
|
|
alpine1 | alpine | vms | all)
|
|
|
|
|
alpine1 | alpine)
|
|
|
|
|
$qemu -m 512 -nic vde,mac='52:54:00:12:34:56',sock=$RUN/sw_proxy1.sock -hda alpine1.qcow2 -daemonize -vnc :1 -pidfile $alpine1
|
|
|
|
|
;;&
|
|
|
|
|
alpine2 | alpine | vms | all)
|
|
|
|
|
alpine2 | alpine)
|
|
|
|
|
$qemu -m 512 -nic vde,mac='52:54:00:12:34:66',sock=$RUN/sw_proxy2.sock -hda alpine2.qcow2 -daemonize -vnc :2 -pidfile $alpine2
|
|
|
|
|
;;&
|
|
|
|
|
win1 | win | vms | all)
|
|
|
|
|
$qemu -vga cirrus -smp 1 -net nic,model=rtl8139 -net vde,sock=$RUN/sw_proxy1.sock -soundhw sb16 -m 128 -usb -usbdevice tablet -drive file=images/win98.raw,format=raw,index=0,media=disk -daemonize -vnc :1 -pidfile $win1
|
|
|
|
|
;;&
|
|
|
|
|
win2 | win | vms | all)
|
|
|
|
|
$qemu -vga cirrus -smp 1 -net nic,model=rtl8139 -net vde,sock=$RUN/sw_proxy2.sock -soundhw sb16 -m 128 -usb -usbdevice tablet -drive file=images/win98-2.raw,format=raw,index=0,media=disk -daemonize -vnc :2 -pidfile $win2
|
|
|
|
|
;;&
|
|
|
|
|
kali | vms | all)
|
|
|
|
|
$qemu -m 1024 -nic user -nic vde,mac='52:54:00:12:34:76',sock=$RUN/sw_proxy3.sock -hda kali.qcow2 -daemonize -vnc :3 -pidfile $kali
|
|
|
|
|
;;&
|
|
|
|
|