


Pay attention to the disk identifier as you will need it in Step 2. You will get a message that looks similar to the one below. Next, mount the image hdiutil mount ~/macos-installation-media.sparseimage Using hdiutil create a sparse (expanding) disk image with a size of 6GB hdiutil create -size 6GB -fs HFS+ -volname "macos-installation-media" -type SPARSE ~/macos-installation-media In the steps below, assume the working directory is the user's home ( ~/). For this we are going to use VB's ability to access a "raw" drive through a VMDK which will act as a pass-through device that VB can recognize and mount. However, there's nothing that says it must be a physical USB device and not a disk image instead.

We are going to use the createinstallmedia utility included with the macOS Install App to create a USB image. Newly created macOS VM created with standard settings (EFI, blank 60GB SSD, 128M video memory, 3D acceleration, 4GB RAM).VirtualBox 5.0+ (may work with older versions, but not tested).Installer for for macOS (El Capitan, Sierra, High Sierra, etc.).These instructions will guide you through the process of creating and using bootable media to install macOS in a VirtualBox VM.
