-
-
Notifications
You must be signed in to change notification settings - Fork 6
Virtual Machines
MidnightBSD 3.2+
For mouse integration: Install misc/utouch-kmod first then in Promoxmox go to Options, and uncheck Use Tablet for the pointer option.
MidnightBSD is known to work with VMWare ESXI 7.x and 8.x, VMWare Fusion, and VMWare Workstation products.
This has been tested with MidnightBSD 2.0, 2.1, 2.2, and 3.0. We recommend you use the following settings:
Disk space: at least 30GB. For desktops, 100GB is recommended.
You can run on much less, but it limits installing packages, etc.
RAM Recommended: 3GB on i386, 4GB+ on amd64. Again, you can run on much less, but desktop use and package installs go a lot smoother with more. RAM Minimum: 1G?
For MidnightBSD 2.x, use the "FreeBSD 11" setting for the appropriate architecture. For MidnightBSD 3.x, use the "FreeBSD 12" setting for the appropriate architecture. Older versions can use the "FreeBSD 10" setting.
VirtualBox is touchy with MidnightBSD. It can work, but you might need to tinker with settings to get the best experience. MidnightBSD 2.2.x and 3.x will run on VirtualBox 6.1.
Example settings: (freebsd 64bit) RAM: 1024MB Chipset: ICH9 EFI: enabled Acceleration: VT-x/AMDV, Nested Paging Audio: ICH AC97 IDE controller: sata (16GB or more) Network: Intel PRO/1000MT desktop (NAT) USB: OCHI Video: VMSVGA 16GB (legacy) or 32MB (EFI)
MidnightBSD will boot in bhyve on MidnightBSD hosts or FreeBSD 12.x/13.x hosts. It is extremely touchy about disk configuration, though since FreeBSD doesn't know about MidnightBSD GPT partitions. We recommend MBR/UFS2 disks.
Learn more about bhyve at https://bhyve.org/
bhyve requires a CPU that supports Intel® Extended Page Tables (EPT), AMD® Rapid Virtualization Indexing (RVI), or Nested Page Tables (NPT). Linux® guests or FreeBSD guests with multiple vCPUs require VMX unrestricted mode support (UG).
Example MidnightBSD i386 client config for vm-bhyve:
loader="bhyveload"
cpu=3
memory=4096M
network0_type="virtio-net"
network0_switch="public"
disk0_type="virtio-blk"
disk0_name="disk0.img"
uuid="a uuid here"
network0_mac="a value here"
vm-bhyve is the recommended management software, although other solutions like cbsd should work. (untested though)
https://github.com/churchers/vm-bhyve
vm-bhyve is in mports on MidnightBSD and FreeBSD ports.
MidnightBSD 2.x and 3.x have been widely tested on bhyve with success. 1.2.x is also known to work but can be touchy.
FreeBSD 11.x and 12.x have been booted with success. Newer versions also likely work.
On FreeBSD hosts, many additional operating systems have been tested, including Linux, OpenBSD, etc. They may work on MidnightBSD, although they have not been tested by the author. FreeBSD has a guide on setting up Linux on their virtualization docs https://docs.freebsd.org/en/books/handbook/virtualization/#virtualization-host-bhyve
Change nic below (ix0) with your nic
kldload vmm
ifconfig tap0 create
sysctl net.link.tap.up_on_open=1
ifconfig bridge0 create
ifconfig bridge0 addm ix0 addm tap0
ifconfig bridge0 up
Create a guest
truncate -s 32G guest.img
fetch https://midnightbsd.org/ftp/MidnightBSD/releases/amd64/ISO-IMAGES/3.1.0/MidnightBSD-3.1.0--amd64-disc1.iso
sh /usr/share/examples/bhyve/vmrun.sh -c 1 -m 1024M -t tap0 -d guest.img -i -I MidnightBSD-3.1.0--amd64-disc1.iso midnightguest
Restart the guest as needed
sh /usr/share/examples/bhyve/vmrun.sh -c 4 -m 1024M -t tap0 -d guest.img midnightguest
View running guests
ls -al /dev/vmm
Kill Guest
bhyvectl --destroy --vm=midnightguest
To persist across reboots
Edit /etc/sysctl.conf and add this
net.link.tap.up_on_open=1
Add the following to /etc/rc.conf
cloned_interfaces="bridge0 tap0"
ifconfig_bridge0="addm ix0 addm tap0"
kld_list="nmdm vmm"