Tested on macOS 10.13 with VirtualBox 5.2
Download ISO image of the OpenBSD installer.
Select from the menu Machine > New...
In Name and operating system:
Version: OpenBSD (64-bit)
In Memory size select at least 2048 MB.
In Hard disk select Create a virtual hard disk now.
In Hard disk file type select VDI.
In Storage on physical hard disk select Dynamically allocated.
In File location and size keep default file location (
VMs/foo/foo.vdi) and size (16 GB). OpenBSD fits into 1GB, but
you'll need some space for your programs and data.
Select from the menu Machine > Settings...
Select Storage, then select Storage Devices >Controller: IDE > Empty.
In corresponding Attributes click on CD icon near Optical Drive: IDE Secondary Master and select Choose Virtual Optical Disk File....
Pick the previously downloaded OpenBSD installer ISO image.
Select from the menu Machine > Start > Normal Start. OpenBSD installer boots in a new window...