Skip to content

Commit

Permalink
Initial FreeBSD 14 config added.
Browse files Browse the repository at this point in the history
  • Loading branch information
ladar committed Oct 23, 2023
1 parent 888cd95 commit 604f564
Show file tree
Hide file tree
Showing 26 changed files with 1,148 additions and 7 deletions.
10 changes: 10 additions & 0 deletions check/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,11 @@ generic-freebsd13-libvirt/
generic-freebsd13-parallels/
generic-freebsd13-virtualbox/
generic-freebsd13-vmware/
generic-freebsd14-hyperv/
generic-freebsd14-libvirt/
generic-freebsd14-parallels/
generic-freebsd14-virtualbox/
generic-freebsd14-vmware/
generic-gentoo-hyperv/
generic-gentoo-libvirt/
generic-gentoo-parallels/
Expand Down Expand Up @@ -1081,6 +1086,11 @@ roboxes-freebsd13-libvirt/
roboxes-freebsd13-parallels/
roboxes-freebsd13-virtualbox/
roboxes-freebsd13-vmware/
roboxes-freebsd14-hyperv/
roboxes-freebsd14-libvirt/
roboxes-freebsd14-parallels/
roboxes-freebsd14-virtualbox/
roboxes-freebsd14-vmware/
roboxes-gentoo-hyperv/
roboxes-gentoo-libvirt/
roboxes-gentoo-parallels/
Expand Down
11 changes: 11 additions & 0 deletions check/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ function generic-virtualbox() {
O=( "${O[@]}" "generic" ); B=( "${B[@]}" "freebsd11" ); P=( "${P[@]}" "virtualbox" );
O=( "${O[@]}" "generic" ); B=( "${B[@]}" "freebsd12" ); P=( "${P[@]}" "virtualbox" );
O=( "${O[@]}" "generic" ); B=( "${B[@]}" "freebsd13" ); P=( "${P[@]}" "virtualbox" );
O=( "${O[@]}" "generic" ); B=( "${B[@]}" "freebsd14" ); P=( "${P[@]}" "virtualbox" );
O=( "${O[@]}" "generic" ); B=( "${B[@]}" "gentoo" ); P=( "${P[@]}" "virtualbox" );
O=( "${O[@]}" "generic" ); B=( "${B[@]}" "hardenedbsd11" ); P=( "${P[@]}" "virtualbox" );
O=( "${O[@]}" "generic" ); B=( "${B[@]}" "hardenedbsd12" ); P=( "${P[@]}" "virtualbox" );
Expand Down Expand Up @@ -469,6 +470,7 @@ function generic-libvirt() {
O=( "${O[@]}" "generic" ); B=( "${B[@]}" "freebsd11" ); P=( "${P[@]}" "libvirt" );
O=( "${O[@]}" "generic" ); B=( "${B[@]}" "freebsd12" ); P=( "${P[@]}" "libvirt" );
O=( "${O[@]}" "generic" ); B=( "${B[@]}" "freebsd13" ); P=( "${P[@]}" "libvirt" );
O=( "${O[@]}" "generic" ); B=( "${B[@]}" "freebsd14" ); P=( "${P[@]}" "libvirt" );
O=( "${O[@]}" "generic" ); B=( "${B[@]}" "gentoo" ); P=( "${P[@]}" "libvirt" );
O=( "${O[@]}" "generic" ); B=( "${B[@]}" "hardenedbsd11" ); P=( "${P[@]}" "libvirt" );
O=( "${O[@]}" "generic" ); B=( "${B[@]}" "hardenedbsd12" ); P=( "${P[@]}" "libvirt" );
Expand Down Expand Up @@ -568,6 +570,7 @@ function generic-vmware() {
O=( "${O[@]}" "generic" ); B=( "${B[@]}" "freebsd11" ); P=( "${P[@]}" "vmware" );
O=( "${O[@]}" "generic" ); B=( "${B[@]}" "freebsd12" ); P=( "${P[@]}" "vmware" );
O=( "${O[@]}" "generic" ); B=( "${B[@]}" "freebsd13" ); P=( "${P[@]}" "vmware" );
O=( "${O[@]}" "generic" ); B=( "${B[@]}" "freebsd14" ); P=( "${P[@]}" "vmware" );
O=( "${O[@]}" "generic" ); B=( "${B[@]}" "gentoo" ); P=( "${P[@]}" "vmware" );
O=( "${O[@]}" "generic" ); B=( "${B[@]}" "hardenedbsd11" ); P=( "${P[@]}" "vmware" );
O=( "${O[@]}" "generic" ); B=( "${B[@]}" "hardenedbsd12" ); P=( "${P[@]}" "vmware" );
Expand Down Expand Up @@ -668,6 +671,7 @@ function generic-hyperv() {
O=( "${O[@]}" "generic" ); B=( "${B[@]}" "freebsd11" ); P=( "${P[@]}" "hyperv" );
O=( "${O[@]}" "generic" ); B=( "${B[@]}" "freebsd12" ); P=( "${P[@]}" "hyperv" );
O=( "${O[@]}" "generic" ); B=( "${B[@]}" "freebsd13" ); P=( "${P[@]}" "hyperv" );
O=( "${O[@]}" "generic" ); B=( "${B[@]}" "freebsd14" ); P=( "${P[@]}" "hyperv" );
O=( "${O[@]}" "generic" ); B=( "${B[@]}" "gentoo" ); P=( "${P[@]}" "hyperv" );
O=( "${O[@]}" "generic" ); B=( "${B[@]}" "hardenedbsd11" ); P=( "${P[@]}" "hyperv" );
O=( "${O[@]}" "generic" ); B=( "${B[@]}" "hardenedbsd12" ); P=( "${P[@]}" "hyperv" );
Expand Down Expand Up @@ -771,6 +775,7 @@ function generic-parallels() {
O=( "${O[@]}" "generic" ); B=( "${B[@]}" "freebsd11" ); P=( "${P[@]}" "parallels" );
O=( "${O[@]}" "generic" ); B=( "${B[@]}" "freebsd12" ); P=( "${P[@]}" "parallels" );
O=( "${O[@]}" "generic" ); B=( "${B[@]}" "freebsd13" ); P=( "${P[@]}" "parallels" );
O=( "${O[@]}" "generic" ); B=( "${B[@]}" "freebsd14" ); P=( "${P[@]}" "parallels" );
O=( "${O[@]}" "generic" ); B=( "${B[@]}" "gentoo" ); P=( "${P[@]}" "parallels" );
O=( "${O[@]}" "generic" ); B=( "${B[@]}" "hardenedbsd11" ); P=( "${P[@]}" "parallels" );
O=( "${O[@]}" "generic" ); B=( "${B[@]}" "hardenedbsd12" ); P=( "${P[@]}" "parallels" );
Expand Down Expand Up @@ -873,6 +878,7 @@ function robox-virtualbox() {
O=( "${O[@]}" "roboxes" ); B=( "${B[@]}" "freebsd11" ); P=( "${P[@]}" "virtualbox" );
O=( "${O[@]}" "roboxes" ); B=( "${B[@]}" "freebsd12" ); P=( "${P[@]}" "virtualbox" );
O=( "${O[@]}" "roboxes" ); B=( "${B[@]}" "freebsd13" ); P=( "${P[@]}" "virtualbox" );
O=( "${O[@]}" "roboxes" ); B=( "${B[@]}" "freebsd14" ); P=( "${P[@]}" "virtualbox" );
O=( "${O[@]}" "roboxes" ); B=( "${B[@]}" "gentoo" ); P=( "${P[@]}" "virtualbox" );
O=( "${O[@]}" "roboxes" ); B=( "${B[@]}" "hardenedbsd11" ); P=( "${P[@]}" "virtualbox" );
O=( "${O[@]}" "roboxes" ); B=( "${B[@]}" "hardenedbsd12" ); P=( "${P[@]}" "virtualbox" );
Expand Down Expand Up @@ -972,6 +978,7 @@ function robox-libvirt() {
O=( "${O[@]}" "roboxes" ); B=( "${B[@]}" "freebsd11" ); P=( "${P[@]}" "libvirt" );
O=( "${O[@]}" "roboxes" ); B=( "${B[@]}" "freebsd12" ); P=( "${P[@]}" "libvirt" );
O=( "${O[@]}" "roboxes" ); B=( "${B[@]}" "freebsd13" ); P=( "${P[@]}" "libvirt" );
O=( "${O[@]}" "roboxes" ); B=( "${B[@]}" "freebsd14" ); P=( "${P[@]}" "libvirt" );
O=( "${O[@]}" "roboxes" ); B=( "${B[@]}" "gentoo" ); P=( "${P[@]}" "libvirt" );
O=( "${O[@]}" "roboxes" ); B=( "${B[@]}" "hardenedbsd11" ); P=( "${P[@]}" "libvirt" );
O=( "${O[@]}" "roboxes" ); B=( "${B[@]}" "hardenedbsd12" ); P=( "${P[@]}" "libvirt" );
Expand Down Expand Up @@ -1071,6 +1078,7 @@ function robox-vmware() {
O=( "${O[@]}" "roboxes" ); B=( "${B[@]}" "freebsd11" ); P=( "${P[@]}" "vmware" );
O=( "${O[@]}" "roboxes" ); B=( "${B[@]}" "freebsd12" ); P=( "${P[@]}" "vmware" );
O=( "${O[@]}" "roboxes" ); B=( "${B[@]}" "freebsd13" ); P=( "${P[@]}" "vmware" );
O=( "${O[@]}" "roboxes" ); B=( "${B[@]}" "freebsd14" ); P=( "${P[@]}" "vmware" );
O=( "${O[@]}" "roboxes" ); B=( "${B[@]}" "gentoo" ); P=( "${P[@]}" "vmware" );
O=( "${O[@]}" "roboxes" ); B=( "${B[@]}" "hardenedbsd11" ); P=( "${P[@]}" "vmware" );
O=( "${O[@]}" "roboxes" ); B=( "${B[@]}" "hardenedbsd12" ); P=( "${P[@]}" "vmware" );
Expand Down Expand Up @@ -1171,6 +1179,7 @@ function robox-hyperv() {
O=( "${O[@]}" "roboxes" ); B=( "${B[@]}" "freebsd11" ); P=( "${P[@]}" "hyperv" );
O=( "${O[@]}" "roboxes" ); B=( "${B[@]}" "freebsd12" ); P=( "${P[@]}" "hyperv" );
O=( "${O[@]}" "roboxes" ); B=( "${B[@]}" "freebsd13" ); P=( "${P[@]}" "hyperv" );
O=( "${O[@]}" "roboxes" ); B=( "${B[@]}" "freebsd14" ); P=( "${P[@]}" "hyperv" );
O=( "${O[@]}" "roboxes" ); B=( "${B[@]}" "gentoo" ); P=( "${P[@]}" "hyperv" );
O=( "${O[@]}" "roboxes" ); B=( "${B[@]}" "hardenedbsd11" ); P=( "${P[@]}" "hyperv" );
O=( "${O[@]}" "roboxes" ); B=( "${B[@]}" "hardenedbsd12" ); P=( "${P[@]}" "hyperv" );
Expand Down Expand Up @@ -1274,6 +1283,7 @@ function robox-parallels() {
O=( "${O[@]}" "roboxes" ); B=( "${B[@]}" "freebsd11" ); P=( "${P[@]}" "parallels" );
O=( "${O[@]}" "roboxes" ); B=( "${B[@]}" "freebsd12" ); P=( "${P[@]}" "parallels" );
O=( "${O[@]}" "roboxes" ); B=( "${B[@]}" "freebsd13" ); P=( "${P[@]}" "parallels" );
O=( "${O[@]}" "roboxes" ); B=( "${B[@]}" "freebsd14" ); P=( "${P[@]}" "parallels" );
O=( "${O[@]}" "roboxes" ); B=( "${B[@]}" "gentoo" ); P=( "${P[@]}" "parallels" );
O=( "${O[@]}" "roboxes" ); B=( "${B[@]}" "hardenedbsd11" ); P=( "${P[@]}" "parallels" );
O=( "${O[@]}" "roboxes" ); B=( "${B[@]}" "hardenedbsd12" ); P=( "${P[@]}" "parallels" );
Expand Down Expand Up @@ -1733,6 +1743,7 @@ function cleanup() {
rm --recursive --force $BASE/{generic,roboxes}-freebsd11-{hyperv,libvirt,parallels,virtualbox,vmware}
rm --recursive --force $BASE/{generic,roboxes}-freebsd12-{hyperv,libvirt,parallels,virtualbox,vmware}
rm --recursive --force $BASE/{generic,roboxes}-freebsd13-{hyperv,libvirt,parallels,virtualbox,vmware}
rm --recursive --force $BASE/{generic,roboxes}-freebsd14-{hyperv,libvirt,parallels,virtualbox,vmware}
rm --recursive --force $BASE/{generic,roboxes}-gentoo-{hyperv,libvirt,parallels,virtualbox,vmware}
rm --recursive --force $BASE/{generic,roboxes}-hardenedbsd11-{hyperv,libvirt,parallels,virtualbox,vmware}
rm --recursive --force $BASE/{generic,roboxes}-hardenedbsd12-{hyperv,libvirt,parallels,virtualbox,vmware}
Expand Down
45 changes: 45 additions & 0 deletions check/freebsd14.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure(2) do |config|

config.ssh.shell = 'sh'
config.vm.box = "generic/freebsd14"
config.vm.network :private_network, :auto_config => false, :autostart => false, :libvirt__network_name => "vagrant-libvirt", :libvirt__always_destroy => false

config.vm.provider :libvirt do |v, override|
v.qemu_use_session = false
v.video_vram = 256
v.memory = 2048
v.cpus = 2
v.management_network_name = "vagrant-libvirt"
v.management_network_keep = true
v.management_network_autostart = false
v.nic_model_type = "e1000"
end

config.vm.provider :hyperv do |v, override|
v.maxmemory = 2048
v.memory = 2048
v.cpus = 2
end

config.vm.provider :virtualbox do |v, override|
v.gui = false
v.functional_vboxsf = false
v.check_guest_additions = false
v.customize ["modifyvm", :id, "--memory", 2048]
v.customize ["modifyvm", :id, "--cpus", 2]
end

["vmware_fusion", "vmware_workstation", "vmware_desktop"].each do |provider|
config.vm.provider provider do |v, override|
v.gui = false
v.functional_hgfs = false
v.vmx["memsize"] = "2048"
v.vmx["numvcpus"] = "2"
v.vmx["cpuid.coresPerSocket"] = "1"
end
end

end
72 changes: 72 additions & 0 deletions generic-hyperv-x64.json
Original file line number Diff line number Diff line change
Expand Up @@ -3300,6 +3300,29 @@
"generic-ubuntu2310-hyperv-x64"
]
},
{
"type": "shell",
"timeout": "120m",
"scripts": [
"scripts/freebsd14/pkg.sh",
"scripts/freebsd14/hostname.sh",
"scripts/freebsd14/kernel.sh",
"scripts/freebsd14/firstboot.sh",
"scripts/freebsd14/motd.sh",
"scripts/freebsd14/vagrant.sh",
"scripts/freebsd14/virtualbox.sh",
"scripts/freebsd14/parallels.sh",
"scripts/freebsd14/vmware.sh",
"scripts/freebsd14/qemu.sh",
"scripts/freebsd14/cleanup.sh"
],
"start_retry_timeout": "45m",
"expect_disconnect": "true",
"execute_command": "{{.Vars}} /usr/local/bin/bash {{ .Path }}",
"only": [
"generic-freebsd14-hyperv-x64"
]
},
{
"type": "shell",
"timeout": "120m",
Expand Down Expand Up @@ -7212,6 +7235,55 @@
"enable_dynamic_memory": false,
"guest_additions_mode": "disable",
"enable_virtualization_extensions": false
},
{
"type": "hyperv-iso",
"name": "generic-freebsd14-hyperv-x64",
"vm_name": "generic-freebsd14-hyperv-x64",
"temp_path": "output/",
"output_directory": "output/generic-freebsd14-hyperv-x64",
"boot_wait": "1s",
"boot_keygroup_interval": "1s",
"boot_command": [
"<esc><wait><esc><wait><esc><wait><esc><wait>",
"<esc><wait><esc><wait><esc><wait><esc><wait>",
"<esc><wait><esc><wait><esc><wait><esc><wait>",
"<esc><wait><esc><wait><esc><wait><esc><wait>",
"<esc><wait><esc><wait><esc><wait><esc><wait>",
"<esc><wait><esc><wait><esc><wait><esc><wait>",
"<esc><wait><esc><wait><esc><wait><esc><wait>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"boot -s<enter>",
"<wait10><wait10><wait10>",
"/bin/sh<enter><wait10>",
"mdmfs -s 100m md1 /tmp<enter><wait5>",
"mdmfs -s 100m md2 /mnt<enter><wait5>",
"dhclient -l /tmp/dhclient.lease.hn0 hn0<enter><wait5>",
"fetch -o /tmp/installerconfig http://{{ .HTTPIP }}:{{ .HTTPPort }}/generic.freebsd14.vagrant.cfg<enter><wait10>",
"bsdinstall script /tmp/installerconfig && reboot<wait><enter>"
],
"disk_size": 131072,
"memory": 2048,
"cpus": 2,
"http_directory": "http",
"iso_url": "http://ftp.freebsd.org/pub/FreeBSD/releases/ISO-IMAGES/14.0/FreeBSD-14.0-RC2-amd64-disc1.iso",
"iso_checksum": "sha256:743a6015fe1b9525343fb4b9ce1abba8727ca58d230372ce66f8a4b592cfafb4",
"ssh_username": "root",
"ssh_password": "vagrant",
"ssh_port": 22,
"ssh_handshake_attempts": 1000,
"ssh_timeout": "7200s",
"shutdown_command": "shutdown -p now",
"generation": 1,
"headless": true,
"communicator": "ssh",
"skip_compaction": false,
"enable_secure_boot": false,
"enable_mac_spoofing": false,
"enable_dynamic_memory": false,
"guest_additions_mode": "disable",
"enable_virtualization_extensions": false
}
],
"post-processors": [
Expand Down
72 changes: 72 additions & 0 deletions generic-libvirt-x64.json
Original file line number Diff line number Diff line change
Expand Up @@ -3300,6 +3300,29 @@
"generic-ubuntu2310-libvirt-x64"
]
},
{
"scripts": [
"scripts/freebsd14/pkg.sh",
"scripts/freebsd14/hostname.sh",
"scripts/freebsd14/kernel.sh",
"scripts/freebsd14/firstboot.sh",
"scripts/freebsd14/motd.sh",
"scripts/freebsd14/vagrant.sh",
"scripts/freebsd14/virtualbox.sh",
"scripts/freebsd14/parallels.sh",
"scripts/freebsd14/vmware.sh",
"scripts/freebsd14/qemu.sh",
"scripts/freebsd14/cleanup.sh"
],
"type": "shell",
"timeout": "120m",
"start_retry_timeout": "15m",
"expect_disconnect": "true",
"execute_command": "{{.Vars}} /usr/local/bin/bash {{ .Path }}",
"only": [
"generic-freebsd14-libvirt-x64"
]
},
{
"scripts": [
"scripts/common/motd.sh",
Expand Down Expand Up @@ -7198,6 +7221,55 @@
"ssh_handshake_attempts": 1000,
"ssh_timeout": "3600s",
"shutdown_command": "echo 'vagrant' | sudo -S shutdown -P now"
},
{
"type": "qemu",
"name": "generic-freebsd14-libvirt-x64",
"vm_name": "generic-freebsd14-libvirt-x64",
"output_directory": "output/generic-freebsd14-libvirt-x64",
"qemu_binary": "qemu-system-x86_64",
"boot_wait": "1s",
"boot_keygroup_interval": "1s",
"boot_command": [
"<esc><wait><esc><wait><esc><wait><esc><wait>",
"<esc><wait><esc><wait><esc><wait><esc><wait>",
"<esc><wait><esc><wait><esc><wait><esc><wait>",
"<esc><wait><esc><wait><esc><wait><esc><wait>",
"<esc><wait><esc><wait><esc><wait><esc><wait>",
"<esc><wait><esc><wait><esc><wait><esc><wait>",
"<esc><wait><esc><wait><esc><wait><esc><wait>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"boot -s<enter>",
"<wait10><wait10><wait10>",
"/bin/sh<enter><wait10>",
"mdmfs -s 100m md1 /tmp<enter><wait>",
"mdmfs -s 100m md2 /mnt<enter><wait>",
"dhclient -l /tmp/dhclient.lease.vtnet0 vtnet0<enter><wait5>",
"fetch -o /tmp/installerconfig http://{{ .HTTPIP }}:{{ .HTTPPort }}/generic.freebsd14.vagrant.cfg<enter><wait5>",
"bsdinstall script /tmp/installerconfig && reboot<enter><wait>"
],
"format": "qcow2",
"disk_size": "131072",
"disk_discard": "unmap",
"disk_detect_zeroes": "on",
"disk_cache": "unsafe",
"disk_image": false,
"disk_compression": true,
"disk_interface": "virtio-scsi",
"net_device": "virtio-net",
"cpus": 2,
"memory": 2048,
"http_directory": "http",
"headless": true,
"iso_url": "http://ftp.freebsd.org/pub/FreeBSD/releases/ISO-IMAGES/14.0/FreeBSD-14.0-RC2-amd64-disc1.iso",
"iso_checksum": "sha256:743a6015fe1b9525343fb4b9ce1abba8727ca58d230372ce66f8a4b592cfafb4",
"ssh_username": "root",
"ssh_password": "vagrant",
"ssh_port": 22,
"ssh_handshake_attempts": 1000,
"ssh_timeout": "3600s",
"shutdown_command": "shutdown -p now"
}
],
"post-processors": [
Expand Down
Loading

0 comments on commit 604f564

Please sign in to comment.