Directions for getting windows 10 to work with virtualbox 6.0.12.
- virtualbox-bootcamp
- Tech Tip: How to Use Boot Camp on an External Drive
- Install Windows on the external SSD/HDD for your Mac
- About Startup Security Utility
- Install Windows 10 to External Drive from Mac
- macOS Mojave 10.14
- Windows 10 x64 Enterprise
- VirtualBox 6.1.2
- VirtualBox 6.1.2 Oracle VM VirtualBox Extension Pack
- Terminal
- Boot Camp Support Software
- Samsung T5 - 500 GB
- USB flash drive 4 GB or greater
- USB keyboard and mouse
- USB-C hub (for newer Macs with USB-C)
- Go to Applications --> Utilities --> Boot Camp Assistant (or use Spotlight)
- In the Finder menu, go to Action --> Download Windows Support Software
- You can save this WindowsSupport folder locally to the Downloads folder
- This folder contains the Apple drivers to be installed after Windows is installed
- You will need this folder copied to a separate USB flash drive; in order for installation to be successful, the Windows Support Software assumes it is located on the D: drive, not the same drive to which Windows was installed.
- Install VirtualBox and the matching VirtualBox Oracle VM VirtualBox Extension Pack for your version of Virtualbox
- You can also use Homebrew to install VirtualBox
# Install Virtualbox and the extension pack via Homebrew
brew cask install virtualbox virtualbox-extension-pack
In order to use your external drive with VirtualBox it will need to be formatted first.
-
Open Disk Utility (Applications --> Utilities --> Disk Utility, or use Spotlight)
-
Go to View --> Show All Devices
-
Erase the external drive (the entire drive, not just a partition) using the following settings:
- Name:
BOOTCAMP
- Format:
MS-DOS (FAT)
- Scheme:
GUID Partition Map
- Name:
If you do not see Scheme, go to View --> Show All Devices and make sure to select the device instead of a single partition.
After you have formatted the external drive, open Terminal/iTerm2 and find the identifier for your external drive using the commands below:
# Lists all connected disks, their names, and identifiers
# Mine appeared as "disk2"; you will need this later
diskutil list
# This is the same as ejecting the external drive from Finder
diskutil unmount /Volumes/BOOTCAMP <--- this is the name of the BOOTCAMP volume
If your external drive volume doesn't have a name for some reason, use /Volumes/Untitled
.
To create an image that represents an entire physical hard disk (which will not contain any actual data, as this will all be stored on the physical BOOTCAMP partition). You will need the previous information from diskutil list
for the external drive:
/dev/disk2 (external, physical):
mkdir ~/virtualbox
# Elevated privileges are required for access to the external drive (/dev/disk2)
# The external drive may need to be ejected/unmounted for this to work
sudo vboxmanage internalcommands createrawvmdk -rawdisk /dev/disk2 -filename ~/virtualbox/bootcamp.vmdk
# The $(whoami) should input your username for the command
sudo chown $(whoami) ~/virtualbox/*.vmdk
Please note that vboxmanage internalcommands
is an internal tool and is completely unsupported and may change in compatible ways without warning.
This command will create an image that will reference the EFI and BOOTCAMP partitions on our internal hard drive. If this command fails, then you may need to disable System Integrity Protection. This requires you to boot into Recovery Mode and execute the following command csrutil disable
:
-bash-3.2# csrutil status
System Integrity Protection status: enabled.
-bash-3.2# csrutil disable
Successfully disabled System Integrity Protection. Please restart the machine for the changes to take effect.
Documentation on configuring System Integrity Protection can be found here and here.
While you are in Recovery mode, you may also need to configure the Startup Security Utility to allow booting from external removable devices.
Because sudo
is required to create the VirtualBox raw disk image (*.vmdk), you
have to open VirtualBox using sudo
as well in order to create a virtual
machine that have the permissions necessary to access the image:
# Open Virtualbox with sudo
sudo /Applications/VirtualBox.app/Contents/MacOS/VirtualBox
- In the Finder menu for Virtualbox, go to Machine --> New.
- Click Expert Mode to continue.
- Name:
WIN10
- Machine Folder:
/Users/UserName/virtualbox
- Type:
Microsoft Windows
- Version:
Windows 10 (64-bit)
- Memory Size:
4096 MB
- Use an existing virtual hard disk file:
~/virtualbox/bootcamp.vmdk
Click Create.
If you cannot successfully choose
bootcamp.vmdk
as your virtual hard disk file, make sure you successfully opened VirtualBox using sudo. If you did, eject the external drive using Disk Utility but leave it connected to your computer, and try again.
In the main application window, select the WIN10
VM and click Settings.
- Boot Order: Only check
Hard Disk
andOptical
; moveHard Disk
up beforeOptical
- Enable EFI (special OSes only): checked
- Enable I/O APIC: checked
- Processors:
4
- Execution Cap:
100%
- Enable PAE/NX:
Checked
- Controller: SATA: Check the
Use Host I/O Cache
option
Attached to this SATA controller should be two devices: bootcamp.vmdk
and
an optical drive that may appear as "Empty". Select the optical drive to
then click the CD icon and choose your Windows 10 ISO.
Click OK to save these settings. Your virtual machine should now be ready so that you can install Windows 10 onto your external drive.
- If you start VirtualBox normally, you won't see the VM that you created when
running under
sudo
- If you attempt to run the VM and it fails to run, try unmounting/ejecting the drive and then starting the VM again.
- Before starting the VM, double-check that Enable EFI (special OSes only) is checked! The EFI partition on your external drive is required for macOS to select your external drive as a startup disk. Do NOT format the EFI partition!
- Start the
WIN10
VM. When the Windows 10 installer begins and you are asked Which type of installation do you want? chooseCustom: Install Windows only (advanced)
- You will see two partitions, EFI and BOOTCAMP. Delete the BOOTCAMP partition. Once you have just the EFI and unallocated space, click the unallocated space (without making a partition) and then you should be able to click Next to start installing Windows. If you still cannot click Next, double-check that Enable EFI (special OSes only) is checked in the VM settings. The Windows installer will automatically create the needed NTFS partition. This method is used to avoid the issue where some external drives hang when attempting to format the BOOTCAMP partition as NTFS.
- You may get the error: Windows cannot be installed to this disk. The selected disk is of the GPT partition style. If so, try reformatting the external drive using the instructions for Disk Utility before and try again.
- Pay attention to the installation! Before the installation reboots to continue, quickly power off the VM by clicking the red X on the VM window and choosing Power off the machine.
- Close VirtualBox and restart your Mac. Hold the right Option key once the screen goes black until the Apple logo appears to see the list of available bootable drives. If you do not see your drive, you may have a newer Mac and may need to use the Startup Security Utility to allow booting from external devices.
- You will need a standard USB keyboard and mouse to complete the installation process as the Boot Camp drivers are required for Apple's hardware to be recognized by Windows.
- Use the WindowsSupport on the USB flash drive to install the drivers for Windows and restart the computer.
Help After I start - Start the virtual machine, I get: - bootcamp.vmdk' in read-write mode (VERR_RESOURCE_BUSY).