BigSur installed on virtual box does not allow me to install virtual guest addition

Discussions about using Mac OS X guests (on Apple hardware) in VirtualBox.
Post Reply
fxPlus
Posts: 3
Joined: 25. Nov 2020, 23:14

BigSur installed on virtual box does not allow me to install virtual guest addition

Post by fxPlus »

I have installed BigSur on a virtual machine. Now I'm trying to install guest additions on this BigSur virtualized environment. I'm following this guideline: (LINK TO UPDATE IN A DAY) but the command to access recovery mode gives me operation not permitted:

Code: Select all

sudo nvram "recovery-boot-mode=unused"
nvram: Error setting variable: - "recovery-boot-mode": (iokit/common) not permitted.
There is a way to access recovery mode from a virtual box machine maybe simulating

Code: Select all

cmd+r
inserting? Or there is another way to install guest additions?
Thank you.

p.s I cannot link URLs and images because I'm a new user here. I'll update the topic as soon as possible.
Note that I have the iso from where I installed the operating system. I thought retrying to boot from a live cd would be the solution but I was not able to perform this attempt and I got only a primitive shell where I'm able to do nothing from there.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: BigSur installed on virtual box does not allow me to install virtual guest addition

Post by scottgus1 »

Start the guest from full normal shutdown, not save-state. Run until you see the problem happen, then shut down the guest from within the guest OS if possible. If not possible, close the Virtualbox window for the guest with the Power Off option set.

Right-click the guest in the main Virtualbox window's guest list, choose Show Log. Save the far left tab's log, zip it, and post the zip file, using the forum's Upload Attachment tab.
fxPlus
Posts: 3
Joined: 25. Nov 2020, 23:14

Re: BigSur installed on virtual box does not allow me to install virtual guest addition

Post by fxPlus »

scottgus1 wrote:Start the guest from full normal shutdown, not save-state. Run until you see the problem happen, then shut down the guest from within the guest OS if possible. If not possible, close the Virtualbox window for the guest with the Power Off option set.

Right-click the guest in the main Virtualbox window's guest list, choose Show Log. Save the far left tab's log, zip it, and post the zip file, using the forum's Upload Attachment tab.
sorry but I don't understand what this action should be useful for. My problem regards guest additions which to be installed on osx, requires csrutil to be disabled and I cannot perform this action until I don't access recovery mode. I was asking for a method to access recovery mode since with bigsur that command from terminal seems has been disabled.

Update: I managed to disable some protection but the installation of virtual box guest additions still fails because from BigSur the disk is not writable anymore. There is any solution to this?
granada29
Volunteer
Posts: 708
Joined: 3. Mar 2015, 07:27
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: Linux, macOS, Windows

Re: BigSur installed on virtual box does not allow me to install virtual guest addition

Post by granada29 »

@fxPlus

I confirm your problem in attempting to install the Guest Additions into a macOS 11 (Big Sur) guest.

I don't think that disabling SIP on the guest would be anything other than a workaround. During installation of the Guest Additions, ideally you would be prompted in the guests 'Security & Privacy' preferences panel to allow the installation of the kexts. The fact that this doesn't happen is a bug and maybe you could file a bug-report at https://www.virtualbox.org/wiki/Bugtracker

I have never really needed the GA's on a macOS guest, and use the native file/screen sharing instead. Screen sharing also gives you bi-directional copy and paste. I enable screen and file sharing in the guests System Preferences/Sharing, which then makes the guest visible to my host. You can reduce screen clutter on your host by minimizing the VM window while you are using screen sharing.

Even when installed (e.g. on Sierra, High Sierra etc), the macOS GA's do not provide window resizing. To set a reasonable guest display size you need to use the methods described in https://www.virtualbox.org/manual/UserM ... efividmode
erwin9
Posts: 11
Joined: 12. Jun 2016, 18:12

Re: BigSur installed on virtual box does not allow me to install virtual guest addition

Post by erwin9 »

Result of my tries to install Guest Additions on Big Sur 11.0.1:
  • This cannot work unless to disable the SSV (Signed System Volume), which requires first to disable the FileVault.
  • After that, there is no way to reactivate SSV nor FileVault, and you remain unsigned for life, which means not sure you can get further updates from Apple
Why ? There are several things to that ..:
  1. First, you have to get the kext-consent on the Oracle Developer ID, which for some reason on my Catalina upgraded to Big Sur image is not there:

    Code: Select all

    spctl kext-consent add VB5E2TV963
    (in Recovery mode .. that doesn't work in a normal session)
  2. Second, it appears you need to enable the Guest Additions install package to write to /System/Library/Extensions/ (because I presume this is what is needed for the kext mechanism):

    Code: Select all

    sudo mount -uw /
    sudo chown :admin /System/Library/Extensions/
    sudo chmod 775 /System/Library/Extensions/
  3. But Big Sur now makes the whole / filesystem not only "read-ony", but also locked with SSV ... so the above does not work (operation not permitted / denied on chown and chmod).
  4. And disabling SIP (in Recovery mode again)

    Code: Select all

    csrutil disable
    is not sufficient for allowing that, there remains the

    Code: Select all

    csrutil authenticated-root disable
    thing to do, which requires first to disable FileVault, else that second disabling command simply fails.
  5. Once you've done that, you can then mount the volume in write mode to modify it and install GA, and then go on (crossing fingers) to bless it

    Code: Select all

    sudo bless --folder /[mountpath]/System/Library/CoreServices --bootefi --create-snapshot
    to get to something bootable again
  6. But from there SSV and FileVault cannot be reactivated
The whole problem, besides the surprise that 1) is not known by Apple and we have to force it in, is 2) = why does GA install require to write to /System/Library/Extensions/ ?
I guess we can't have the kext mechanism anymore in Big Sur ... or let me know if I am wrong ??

=> Can VBoxDarwinAdditions.pkg switch to System extensions rather than kext ?


Some references:
https://eclecticlight.co/2020/06/25/big ... rotection/
https://stackoverflow.com/questions/416 ... ne-as-host
https://apple.stackexchange.com/questio ... in-big-sur
https://support.apple.com/en-us/HT210999
https://developer.apple.com/documentati ... extensions
fxPlus
Posts: 3
Joined: 25. Nov 2020, 23:14

Re: BigSur installed on virtual box does not allow me to install virtual guest addition

Post by fxPlus »

erwin9 wrote:Result of my tries to install Guest Additions on Big Sur 11.0.1:
[*]First, you have to get the kext-consent on the Oracle Developer ID, which for some reason on my Catalina upgraded to Big Sur image is not there:

Code: Select all

spctl kext-consent add VB5E2TV963
(in Recovery mode .. that doesn't work in a normal session)
[*]Second, it appears you need to enable the Guest Additions install package to write to /System/Library/Extensions/ (because I presume this is what is needed for the kext mechanism):

Code: Select all

sudo mount -uw /
Hi and thanks for your answer.
I did

Code: Select all

 csrutl authenticated-root disabled
(there is a command to check the status too?)
but unfortunately I think that BigSur does not allow to:

Code: Select all

sudo mount -uw /

Anyway I'll make another attempt and I'll notice here. You can check why by this guy who explains it well: https://twitter.com/ebadtweet/status/12 ... 3900971012
Post Reply