geerlingguy / geerlingguy/macos-virtualbox-vm
Install Guest Additions on macOS 10.15 Catalina.
- Dominant language
- Shell
- Stars
- 2.6k
- Forks
- 307
- PR merge metrics
- No merged PRs in 30d
Description
On macOS 10.15 Catalina, *Guest Additions* cannot be installed by default. The installation cannot be completed as normal because the OS now require packages to be digitally signed. To get around this security limitation, you need to disable **multiple security features** in order to install the package. I think this applies to macOS 10.14 as well.
I managed to install *Guest Additions* using VirtualBox version 6.1.16 on Windows 7 to share the clipboard values between the host and the guest. If someone else wants to install this, here is the whole process:
# Disable Gatekeeper
1. Be sure to exit *System Preferences* on your Mac.
2. Open a Terminal
3. Enter the command `sudo spctl --master-disable`.
Source: [How to open apps from unidentified developers on Mac in macOS Catalina](https://www.imore.com/how-open-apps-anywhere-macos-catalina-and-mojave)
# Check Gatekeeper is disabled
1. Click on *System Preferences* on your Mac Dock.
2. Choose *Security & Privacy*.
3. Look at *Allow apps download from:*, it should be set to `Anywhere`. If it is, you are done.
4. If not, click the lock icon at the bottom left of the screen.
5. Choose the `Anywhere` option under *Allow apps downloaded from*. Prior to making the change, this option wasn't available.
6. Click the unlocked lock again to keep the change.
# Disable SIP (System Integrity Protection)
1. Restart your computer in *Recovery mode*.
2. Launch *Terminal* from the *Utilities* menu.
3. Run the command `csrutil disable` .
4. Restart your computer.
I tried pressing `F12`, `F8` and even `ESC` key in order to configure VirtualBox to boot into the EFI shell but was not able to do so. In the end, [this comment from issue 46](https://github.com/geerlingguy/macos-virtualbox-vm/issues/46#issuecomment-647807097) had the solution:
1. In your VM's terminal enter the following command to reboot in *recovery mode*:
`sudo nvram recovery-boot-mode=unused && sudo shutdown -r now`
2. Once in recovery mode open a terminal in `Utilities`->`Terminal`.
3. Run the commands you want like:
`csrutil disable`
`spctl kext-consent add VB5E2TV963`
(note the last command is explained in steps below)
4. Enter the following command to exit *recovery mode*:
`nvram -d recovery-boot-mode && shutdown -r now`
5. And you'll get back into normal macOS.
# Check SIP is disabled
You can verify that SIP is disabled with the command:
`csrutil status`
which should display:
`System Integrity Protection status: disabled.`.
# Allow Oracle identifier for kext
1. Restart your computer in *Recovery mode*. Refer to previous section to know how to do this.
2. Launch *Terminal* from the *Utilities* menu.
3. Run the command `spctl kext-consent add VB5E2TV963` .
4. Restart your computer.
*VB5E2TV963* is the code for oracle.
Source: [Install problem 10.14.5 vBox 6.0](https://forums.virtualbox.org/viewtopic.php?f=8&t=93133#p448593)
# Change ownership and permissions on filesystem
Enable writing to `/System/Library/Extensions/`.
In your VM's terminal enter the following commands:
```
sudo mount -uw /
sudo chown :admin /System/Library/Extensions/
sudo chmod 775 /System/Library/Extensions/
```
Source: [Guest Additions not installing on macOS 10.15 Catalina guests](https://www.virtualbox.org/ticket/19047#comment:6)
# Install Guest Additions
At this point, the installation of *Guest Addition* should succeed. Proceed with normal installation instructions.
1. On VirtualBox emulation window, click on `Devices` menu.
2. Select `Insert Guest Additions CD image...`.
3. In your VM, click on the new CD image on the desktop.
4. Click on `VBoxDarwinAdditions.pkg`.
5. Follow the instructions on screen.
6. A reboot is required after the installation.
# Check clipboard sharing is working
Check that clipboard is shared between the host and the guest.
1. On VirtualBox emulation window, click on `Devices` menu.
2. Select menu `Shared Clipboard`, `Bidirectional`.
3. In your VM, open a terminal.
4. Select text.
5. Right-click on the selected text and select `Copy`.
6. On your host, open a note taking appplication.
7. Right-click and select `Paste`.
# Revert disabled security features
## Enable Gatekeeper
1. Be sure to exit *System Preferences* on your Mac.
2. Open a Terminal
3. Enter the command `sudo spctl --master-enable`.
## Enable SIP
1. Restart your computer in *Recovery mode*.
2. Launch *Terminal* from the *Utilities* menu.
3. Run the command `csrutil enable` .
4. Restart your computer.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.