auto now hosts django apps
added devfs_rule configs for jails configure mail ipv6 settings windows2019 VM
This commit is contained in:
@ -24,6 +24,11 @@ ifconfig bridge1 addm tap83 up
|
||||
ifconfig tap83 up
|
||||
ifconfig tap83 inet6 auto_linklocal
|
||||
|
||||
ifconfig tap84 create
|
||||
ifconfig bridge1 addm tap84 up
|
||||
ifconfig tap84 up
|
||||
ifconfig tap84 inet6 auto_linklocal
|
||||
|
||||
ifconfig tap90 create
|
||||
ifconfig bridge1 addm tap90 up
|
||||
ifconfig tap90 up
|
||||
|
8
jails/config/vm/devfs_rules.raw
Normal file
8
jails/config/vm/devfs_rules.raw
Normal file
@ -0,0 +1,8 @@
|
||||
100 include 4
|
||||
200 path vmm unhide
|
||||
300 path vmm/* unhide
|
||||
400 path vmm.io unhide
|
||||
500 path vmm.io/* unhide
|
||||
600 path tap* unhide
|
||||
700 path zvol/ship/raw/* unhide
|
||||
800 path nmdm* unhide
|
14
jails/config/vm/devfs_rules.txt
Normal file
14
jails/config/vm/devfs_rules.txt
Normal file
@ -0,0 +1,14 @@
|
||||
# devfs rule -s 200 add - < devfs_rules.raw
|
||||
# devfs rule -s 200 show
|
||||
|
||||
# add to /etc/default/devfs.rules
|
||||
|
||||
[devfs_rules_bhyve_jail=200]
|
||||
add include $devfsrules_jail
|
||||
add path vmm unhide
|
||||
add path vmm/* unhide
|
||||
add path vmm.io unhide
|
||||
add path vmm.io/* unhide
|
||||
add path tap* unhide
|
||||
add path zvol/ship/raw/* unhide
|
||||
add path nmdm* unhide
|
@ -15,7 +15,7 @@ bhyvectl --destroy --vm=r-windows
|
||||
while true
|
||||
do
|
||||
|
||||
bhyve -c 4 -m 8G -S -A -H -P \
|
||||
bhyve -c sockets=1,cores=2,threads=2 -m 16G -S -A -H -P \
|
||||
-s 0,hostbridge \
|
||||
-s 4,ahci-hd,/dev/zvol/ship/raw/windows,sectorsize=512 \
|
||||
-s 5,virtio-net,tap81,mac=00:0A:0B:0C:0D:81 \
|
||||
@ -47,7 +47,8 @@ exit $?
|
||||
|
||||
# -s 3,ahci,cd:/mnt/windows/w10.iso,cd:/mnt/windows/virtio-win.iso \
|
||||
# mounting the USB HDD as an attached drive to the system
|
||||
#-s 3,ahci,cd:/mnt/windows/w10.iso,cd:/mnt/windows/virtio-win.iso,hd:/dev/da3p2 \
|
||||
#-s 3,ahci,cd:/mnt/windows/w10.iso,cd:/mnt/windows/virtio-win.iso,hd:/dev/daXp2 \
|
||||
# daX being an NTFS drive
|
||||
|
||||
# bhyvectl --get-all --vm=r-windows
|
||||
|
||||
|
@ -18,20 +18,25 @@ tmux new-session -d -s $session -n freepbx
|
||||
tmux selectp -t 1
|
||||
tmux send-keys "cd /mnt/config;./pbx.sh" C-m
|
||||
|
||||
# create a new window r-windows
|
||||
tmux new-window -t $session:1 -n r-windows
|
||||
tmux selectp -t 1
|
||||
tmux send-keys "cd /mnt/config;./r-windows.sh" C-m
|
||||
|
||||
# create a new window ubuntu
|
||||
tmux new-window -t $session:1 -n ubuntu
|
||||
tmux new-window -t $session:2 -n ubuntu
|
||||
tmux selectp -t 1
|
||||
tmux send-keys "cd /mnt/config;./ubuntu.sh" C-m
|
||||
|
||||
# create a new window freebsd
|
||||
tmux new-window -t $session:2 -n freebsd
|
||||
tmux new-window -t $session:3 -n freebsd
|
||||
tmux selectp -t 1
|
||||
tmux send-keys "cd /mnt/config;./freebsd.sh" C-m
|
||||
|
||||
# create a new window r-windows
|
||||
tmux new-window -t $session:3 -n r-windows
|
||||
# create a new window w2019
|
||||
tmux new-window -t $session:4 -n w2019
|
||||
tmux selectp -t 1
|
||||
tmux send-keys "cd /mnt/config;./r-windows.sh" C-m
|
||||
tmux send-keys "cd /mnt/config;./w2019.sh" C-m
|
||||
|
||||
# return to main window
|
||||
tmux select-window -t $session:0
|
||||
|
65
jails/config/vm/w2019.sh
Executable file
65
jails/config/vm/w2019.sh
Executable file
@ -0,0 +1,65 @@
|
||||
# Copyright (c) 2018-2020, diyIT.org
|
||||
# All rights reserved.
|
||||
#
|
||||
# BSD 2-Clause License ("Simplified BSD License" or "FreeBSD License")
|
||||
# https://diyit.org/license/
|
||||
#
|
||||
#
|
||||
|
||||
#!/usr/local/bin/bash
|
||||
# ./w2019.sh under tmux
|
||||
|
||||
# clean cached state
|
||||
bhyvectl --destroy --vm=w2019
|
||||
|
||||
while true
|
||||
do
|
||||
|
||||
bhyve -c sockets=1,cores=2,threads=2 -m 16G -S -A -H -P \
|
||||
-s 0,hostbridge \
|
||||
-s 4,ahci-hd,/dev/zvol/ship/raw/w2019,sectorsize=512 \
|
||||
-s 5,virtio-net,tap84,mac=00:0A:0B:0C:0D:84 \
|
||||
-s 6,ahci-hd,/dev/zvol/ship/raw/w2019_data,sectorsize=512 \
|
||||
-s 29,fbuf,tcp=0.0.0.0:5984,w=1600,h=900 \
|
||||
-s 30,xhci,tablet \
|
||||
-s 31,lpc -l com1,/dev/nmdm84A \
|
||||
-l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \
|
||||
w2019
|
||||
|
||||
bhyve_exit=$?
|
||||
# bhyve returns the following status codes:
|
||||
# 0 - VM has been reset
|
||||
# 1 - VM has been powered off
|
||||
# 2 - VM has been halted
|
||||
# 3 - VM generated a triple fault
|
||||
# all other non-zero status codes are errors
|
||||
#
|
||||
if [ $bhyve_exit = 1 ] || [ $bhyve_exit = 2 ]
|
||||
then
|
||||
break
|
||||
fi
|
||||
echo `date` - restarting w2019 in 5 seconds - press ctrl-c to stop
|
||||
sleep 5
|
||||
|
||||
done
|
||||
|
||||
exit $?
|
||||
|
||||
# -s 3,ahci,cd:/mnt/windows/w2019.iso,cd:/mnt/windows/virtio-win.iso \
|
||||
# mounting the USB HDD as an attached drive to the system
|
||||
#-s 3,ahci,cd:/mnt/windows/w2019.iso,cd:/mnt/windows/virtio-win.iso,hd:/dev/daXp2 \
|
||||
# daX being an NTFS drive
|
||||
|
||||
# bhyvectl --get-all --vm=w2109
|
||||
|
||||
# cu -l /dev/nmdm84B
|
||||
# (This uses cu() so press ~+Ctrl-D to exit)
|
||||
|
||||
#on base system:
|
||||
#zfs create -V 32G -o refreservation=none ship/raw/w2109
|
||||
#zfs create -V 128G -o refreservation=none ship/raw/w2019_data
|
||||
# on boot
|
||||
#ifconfig tap84 create
|
||||
#ifconfig bridge1 addm tap84 up
|
||||
#ifconfig tap84 up
|
||||
#ifconfig tap84 inet6 auto_linklocal
|
Reference in New Issue
Block a user