Skip to content

Commit

Permalink
split dsk to personal db
Browse files Browse the repository at this point in the history
  • Loading branch information
olevole committed Sep 4, 2016
1 parent dc68b96 commit 4e9a48c
Show file tree
Hide file tree
Showing 71 changed files with 1,185 additions and 294 deletions.
8 changes: 8 additions & 0 deletions ObsoleteFiles
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,12 @@ etc/defaults/vm-linux-CentOS-6.7-x86_64.conf
etc/defaults/vm-dflybsd-x86-4.4.conf
tools/srcls
tools/basels
etc/defaults/vm-openbsd-x86-5.conf
etc/defaults/vm-freebsd-NAS4Free-10.2-x64.conf
etc/defaults/vm-freebsd-UbuntuBSD-x64-15.10.conf
etc/defaults/vm-linux-gentoo-amd64-20140403.conf
etc/defaults/vm-linux-opensuse-x86-13.conf
etc/defaults/vm-linux-ubuntuserver-x86-14.04.conf
etc/defaults/vm-linux-ubuntuserver-x86-15.10.conf

"
13 changes: 7 additions & 6 deletions bhyve.subr
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ compile_dsk_args()
local dsk_id=0
local sqldelimer=" "

eval $( cbsdsql local SELECT dsk_controller,dsk_path,dsk_slot FROM bhyvedsk WHERE jname=\"${jname}\" AND dsk_type=\"vhd\" |while read dsk_controller dsk_path dsk_slot; do
eval $( cbsdsql ${jailsysdir}/${jname}/local.sqlite SELECT dsk_controller,dsk_path,dsk_slot FROM bhyvedsk WHERE jname=\"${jname}\" AND dsk_type=\"vhd\" |while read dsk_controller dsk_path dsk_slot; do
if ! next_pci_id; then
# no free pci bus
exit 0
Expand Down Expand Up @@ -135,7 +135,7 @@ compile_nic_args()
local sqldelimer=" "
local mybridge

eval $( cbsdsql local SELECT id,nic_order,nic_driver,nic_slot,nic_type,nic_parent,nic_hwaddr FROM bhyvenic WHERE jname=\"${jname}\" |while read nic_id nic_order nic_driver nic_slot nic_type nic_parent nic_hwaddr; do
eval $( cbsdsql ${jailsysdir}/${jname}/local.sqlite SELECT id,nic_order,nic_driver,nic_slot,nic_type,nic_parent,nic_hwaddr FROM bhyvenic WHERE jname=\"${jname}\" |while read nic_id nic_order nic_driver nic_slot nic_type nic_parent nic_hwaddr; do

if ! next_pci_id; then
# no free pci bus
Expand Down Expand Up @@ -391,7 +391,7 @@ bhyve_remove_dsk()
local dsk="${1}"; shift
[ -z "${jname}" -o -z "${dsk}" ] && return 0

cbsdsql local DELETE FROM bhyvedsk WHERE dsk_path=\"${dsk}\" AND jname=\"${jname}\"
cbsdsql ${jailsysdir}/${jname}/local.sqlite DELETE FROM bhyvedsk WHERE dsk_path=\"${dsk}\" AND jname=\"${jname}\"

if [ "${zfsfeat}" = "1" ]; then
readconf zfs.conf
Expand Down Expand Up @@ -421,7 +421,7 @@ bhyve_remove_nic()
local id="${1}"; shift
[ -z "${jname}" -o -z "${id}" ] && return 0

cbsdsql local DELETE FROM bhyvenic WHERE id=\"${id}\" AND jname=\"${jname}\"
cbsdsql ${jailsysdir}/${jname}/local.sqlite DELETE FROM bhyvenic WHERE id=\"${id}\" AND jname=\"${jname}\"

return 0
}
Expand Down Expand Up @@ -482,8 +482,9 @@ compile_vnc_args()

${ECHO} "${MAGENTA}VRDP is enabled. VNC port: ${GREEN}${vm_port}. ${MAGENTA}VNC pass: ${GREEN}cbsd${NORMAL}${NORMAL}"

vnc_args="-s ${bhyve_pci_index},fbuf,tcp=0.0.0.0:5900,w=800,h=600"
# vnc_args="-s ${bhyve_pci_index},fbuf,tcp=0.0.0.0:5900,w=800,h=600,wait"
echo "${vm_port}" > ${jailsysdir}/${jname}/vnc_port

vnc_args="-s ${bhyve_pci_index},fbuf,tcp=${default_vnc_tcp_bind}:${vm_port},w=${default_vnc_width},h=${default_vnc_width}"
return 0
}
###
Expand Down
13 changes: 13 additions & 0 deletions etc/defaults/freecloud.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# This is ConvectIX specific module settings
# For FreeCloud services and their components

# Linux consumer IP with CBSD microservices
convectix_srv4linux_ip="unset"

# FreeBSD consumer IP with CBSD microservices
convectix_srv4freebsd_ip="unset"

# ssh private key for consumer IP (in $ssh dir)
#convectix_ssh_pubkey="convectix_services.id_rsa"
#convectix_ssh_privatekey="convectix_services.id_rsa"

20 changes: 0 additions & 20 deletions etc/defaults/vm-freebsd-ArchBSD-i386-20140527.conf

This file was deleted.

4 changes: 4 additions & 0 deletions etc/defaults/vm-freebsd-FreeBSD-x64-10.3.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,9 @@ imgsize="4g"
# disable profile?
active=1

## VNC. Not compatible with FreeBSD 10.3
#vm_vnc_port="0"
#vm_efi="uefi"

# VirtualBox Area
virtualbox_ostype="FreeBSD_64"
4 changes: 4 additions & 0 deletions etc/defaults/vm-freebsd-FreeBSD-x64-11.0.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,9 @@ imgsize="4g"
# disable profile?
active=1

# VNC
vm_vnc_port="0"
vm_efi="uefi"

# VirtualBox Area
virtualbox_ostype="FreeBSD_64"
6 changes: 5 additions & 1 deletion etc/defaults/vm-freebsd-FreeBSD-x64-12.0.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,17 @@ long_description="FreeBSD 12.0-RELEASE x86-64 (64 bit) architecture"
fetch=1

iso_site="ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/amd64/amd64/ISO-IMAGES/12.0/ ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/amd64/ISO-IMAGES/12.0/"
iso_img="FreeBSD-12.0-CURRENT-amd64-20160809-r303880-disc1.iso"
iso_img="FreeBSD-12.0-CURRENT-amd64-20160829-r305028-disc1.iso"

default_jailname="freebsd"
imgsize="4g"

# disable profile?
active=1

# VNC
vm_vnc_port="0"
vm_efi="uefi"

# VirtualBox Area
virtualbox_ostype="FreeBSD_64"
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# don't remove this line:
vm_profile="NAS4Free-10.2-x64"
vm_profile="NAS4Free-x64-10"

# this is one-string additional info strings in dialogue menu
long_description="An embedded Storage distribution for Windows, Mac, & UNIX-like systems"

# custom settings:
fetch=1

iso_site="http://netix.dl.sourceforge.net/project/nas4free/NAS4Free-10.2.0.2/10.2.0.2.2545/"
iso_img="NAS4Free-x64-LiveCD-10.2.0.2.2545.iso"
iso_site="http://netcologne.dl.sourceforge.net/project/nas4free/NAS4Free-10.3.0.3/10.3.0.3.2942/"
iso_img="NAS4Free-x64-LiveCD-10.3.0.3.2942.iso"

default_jailname="nas4free"
imgsize="6g"
Expand All @@ -19,5 +19,9 @@ virtio_type="ahci-hd"
# disable profile?
active=1

# VNC
#vm_vnc_port="0"
#vm_efi="uefi"

# VirtualBox Area
virtualbox_ostype="FreeBSD_64"
Original file line number Diff line number Diff line change
@@ -1,29 +1,30 @@
# don't remove this line:
vm_profile="UbuntuBSD-x64-15.10"
vm_profile="UbuntuBSD-x64-16"

# this is one-string additional info strings in dialogue menu
long_description="UbuntuBSD 15.10-RELEASE x86-64 (64 bit) architecture"
long_description="UbuntuBSD 16.04-RELEASE x86-64 (64 bit) architecture"

# custom settings:
fetch=1

bhyve_flags="-W" # Additional bhyve(8) flags

iso_site="http://vorboss.dl.sourceforge.net/project/ubuntubsd/efsd/ http://heanet.dl.sourceforge.net/project/ubuntubsd/efsd/"
iso_img="ubuntuBSD-15.10%7EBETA5-amd64.iso"
iso_site="http://heanet.dl.sourceforge.net/project/ubuntubsd/anh/ http://vorboss.dl.sourceforge.net/project/ubuntubsd/efsd/ http://heanet.dl.sourceforge.net/project/ubuntubsd/efsd/"
iso_img="ubuntuBSD-16.04%7EBETA1-amd64.iso"

#grub_boot_cmd="/usr/bin/lockf -s -t0 /tmp/bhyveload.${jname}.lock grub-bhyve -r hd0,msdos1 -m ${_devicemap} -M ${grubmem} ${jname}"
#grub_iso_cmd="/usr/bin/lockf -s -t0 /tmp/bhyveload.${jname}.lock grub-bhyve -r cd0 -m ${_devicemap} -M ${grubmem} ${jname}"

default_jailname="ubuntubsd"
imgsize="4g"
boot_from_grub=0
#boot_from_grub=0

# VNC
vm_vnc_port="0"
vm_efi="uefi"

# disable profile?
active=1
active=0

# VirtualBox Area
virtualbox_ostype="UbuntuBSD_64"
virtualbox_ostype="FreeBSD_64"
30 changes: 30 additions & 0 deletions etc/defaults/vm-freebsd-pfSense-2-LATEST-amd64.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# don't remove this line:
vm_profile="pfSense-2-LATEST-amd64"

# this is one-string additional info strings in dialogue menu
long_description="pfSense LATEST x86-64 (64 bit) architecture"

# custom settings:
fetch=1

iso_site="https://snapshots.pfsense.org/amd64/pfSense_master/installer/ https://nyifiles.pfsense.org/mirror/downloads/ https://frafiles.pfsense.org/mirror/downloads/ http://files.uk.pfsense.org/mirror/downloads/ http://files.nl.pfsense.org/mirror/downloads/ http://files.uk.pfsense.org/mirror/downloads/ http://files.uk.pfsense.org/mirror/downloads/old/"

iso_img="pfSense-CE-2.4.0-DEVELOPMENT-amd64-latest.iso"
iso_img_dist="pfSense-CE-2.4.0-DEVELOPMENT-amd64-latest.iso.gz"

iso_extract="gunzip -d "

default_jailname="pfsense"
imgsize="2g"

#virtio_type="ahci-hd"

# disable profile?
active=1

# VNC - not supported
vm_vnc_port="0"
vm_efi="uefi"

# VirtualBox Area
virtualbox_ostype="FreeBSD_64"
13 changes: 10 additions & 3 deletions etc/defaults/vm-freebsd-pfSense-2-RELEASE-amd64.conf
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
# don't remove this line:
vm_profile="pfSense-2-RELEASE-amd64"

pfver="2.3.2"

# this is one-string additional info strings in dialogue menu
long_description="pfSense ${pfver}-RELEASE x86-64 (64 bit) architecture"

# custom settings:
fetch=1

iso_site="https://frafiles.pfsense.org/mirror/downloads/ http://files.uk.pfsense.org/mirror/downloads/ http://files.nl.pfsense.org/mirror/downloads/ http://files.uk.pfsense.org/mirror/downloads/ http://files.uk.pfsense.org/mirror/downloads/old/"
iso_img="pfSense-CE-2.3-RELEASE-amd64.iso"
iso_img_dist="pfSense-CE-2.3-RELEASE-amd64.iso.gz"
iso_site="https://nyifiles.pfsense.org/mirror/downloads/ https://frafiles.pfsense.org/mirror/downloads/ http://files.uk.pfsense.org/mirror/downloads/ http://files.nl.pfsense.org/mirror/downloads/ http://files.uk.pfsense.org/mirror/downloads/ http://files.uk.pfsense.org/mirror/downloads/old/"

iso_img="pfSense-CE-${pfver}-RELEASE-amd64.iso"
iso_img_dist="pfSense-CE-${pfver}-RELEASE-amd64.iso.gz"

iso_extract="gunzip -d "

Expand All @@ -21,5 +24,9 @@ imgsize="2g"
# disable profile?
active=1

# VNC - not supported
#vm_vnc_port="0"
#vm_efi="uefi"

# VirtualBox Area
virtualbox_ostype="FreeBSD_64"
12 changes: 7 additions & 5 deletions etc/defaults/vm-linux-ArchLinux-x86-2016.conf
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,17 @@ grub_boot_cmd="echo -e \"cconfigfile /boot/grub/grub.cfg\n\" |/usr/bin/lockf -s

grub_iso_cmd="echo -e \"linux ${iso_vmlinuz_file} archisobasedir=arch archisolabel=ARCH_201602 ro\ninitrd ${iso_initrd_file}\nboot\" | /usr/bin/lockf -s -t0 /tmp/bhyveload.${jname}.lock grub-bhyve -r cd0 -m "${_devicemap}" -M ${grubmem} "${jname}""

iso_site="http://mirror.23media.de/archlinux/iso/2016.05.01/ http://archlinux.limun.org/iso/2016.05.01/ http://archlinux.mirrors.ovh.net/archlinux/iso/2016.05.01/ http://mirrors.abscission.net/archlinux/iso/2016.05.01/"
iso_img="archlinux-2016.05.01-dual.iso"
iso_site="http://mirror.23media.de/archlinux/iso/2016.09.03/ http://archlinux.limun.org/iso/2016.09.03/ http://archlinux.mirrors.ovh.net/archlinux/iso/2016.09.03/ http://mirrors.abscission.net/archlinux/iso/2016.09.03/"
iso_img="archlinux-2016.09.03-dual.iso"

default_jailname="arch"
imgsize="6g"

boot_from_grub=1
#boot_from_grub=0
#vm_efi="uefi_csm"
#boot_from_grub=1
# VNC
vm_vnc_port="0"
vm_efi="uefi"

# disable profile?
active=1

6 changes: 5 additions & 1 deletion etc/defaults/vm-linux-CentOS-7-x86_64.conf
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@ iso_img="CentOS-7-x86_64-Minimal-1511.iso"
default_jailname="centos"

imgsize="6g"
boot_from_grub=1
#boot_from_grub=1
#vm_efi="uefi"

# VNC
vm_vnc_port="0"
vm_efi="uefi"

# disable profile?
active=1
8 changes: 6 additions & 2 deletions etc/defaults/vm-linux-CoreOS.conf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ iso_img="coreos_production_iso_image.iso"

default_jailname="coreos"
imgsize="6g"
boot_from_grub=1
#boot_from_grub=1

# VNC
vm_vnc_port="0"
vm_efi="uefi"

# disable profile?
active=1
active=0
12 changes: 8 additions & 4 deletions etc/defaults/vm-linux-Debian-x86-7.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ iso_vmlinuz_file="/install.amd/vmlinuz"
iso_initrd_file="/install.amd/initrd.gz"

# this is one-string additional info strings in dialogue menu
long_description="Linux Debian 7.10.0 (wheezy) RELEASE x86-64 (64 bit) architecture"
long_description="Linux Debian 7.11.0 (wheezy) RELEASE x86-64 (64 bit) architecture"

# custom settings:
fetch=1
Expand All @@ -16,12 +16,16 @@ grub_boot_cmd="/usr/bin/lockf -s -t0 /tmp/bhyveload.${jname}.lock grub-bhyve -r
# grub-bhyve command to boot from ISO
grub_iso_cmd="/usr/bin/lockf -s -t0 /tmp/bhyveload.${jname}.lock grub-bhyve -r cd0 -m ${_devicemap} -M ${grubmem} ${jname}"

iso_site="http://cdimage.debian.org/mirror/cdimage/archive/7.10.0/amd64/iso-cd/"
iso_img="debian-7.10.0-amd64-CD-1.iso"
iso_site="http://cdimage.debian.org/mirror/cdimage/archive/7.11.0/amd64/iso-cd/"
iso_img="debian-7.11.0-amd64-CD-1.iso"

default_jailname="debian"
imgsize="6g"
boot_from_grub=1
#boot_from_grub=1

# VNC
vm_vnc_port="0"
vm_efi="uefi"

# disable profile?
active=1
12 changes: 8 additions & 4 deletions etc/defaults/vm-linux-Debian-x86-8.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ iso_vmlinuz_file="/install.amd/vmlinuz"
iso_initrd_file="/install.amd/initrd.gz"

# this is one-string additional info strings in dialogue menu
long_description="Linux Debian 8.4.0 ("Jessie") RELEASE x86-64 (64 bit) architecture"
long_description="Linux Debian 8.5.0 ("Jessie") RELEASE x86-64 (64 bit) architecture"

# custom settings:
fetch=1
Expand All @@ -16,12 +16,16 @@ grub_boot_cmd="/usr/bin/lockf -s -t0 /tmp/bhyveload.${jname}.lock grub-bhyve -r
# grub-bhyve command to boot from ISO
grub_iso_cmd="/usr/bin/lockf -s -t0 /tmp/bhyveload.${jname}.lock grub-bhyve -r cd0 -m ${_devicemap} -M ${grubmem} ${jname}"

iso_site="http://cdimage.debian.org/mirror/cdimage/archive/8.4.0/amd64/iso-cd/ http://gemmei.acc.umu.se/debian-cd/8.4.0/amd64/iso-cd/ http://caesar.acc.umu.se/debian-cd/8.4.0/amd64/iso-cd/ http://cdimage.debian.org/debian-cd/8.4.0/amd64/iso-cd/"
iso_img="debian-8.4.0-amd64-CD-1.iso"
iso_site="http://cdimage.debian.org/mirror/cdimage/archive/8.5.0/amd64/iso-cd/ http://gemmei.acc.umu.se/debian-cd/8.5.0/amd64/iso-cd/ http://caesar.acc.umu.se/debian-cd/8.5.0/amd64/iso-cd/ http://cdimage.debian.org/debian-cd/8.5.0/amd64/iso-cd/"
iso_img="debian-8.5.0-amd64-CD-1.iso"

default_jailname="debian"
imgsize="6g"
boot_from_grub=1
#boot_from_grub=1

# VNC
vm_vnc_port="0"
vm_efi="uefi"

# disable profile?
active=1
Loading

0 comments on commit 4e9a48c

Please sign in to comment.