Monterey guest on Catalina host with current VirtualBox = collection of confusing problems

Discussions about using Mac OS X guests (on Apple hardware) in VirtualBox.

Monterey guest on Catalina host with current VirtualBox = collection of confusing problems

Postby vwegert » 10. Aug 2022, 21:15

I have a genuine Mac mini (2018) running macOS 10.15.7 (Catalina) as the host system. I've been using VirtualBox for several years now, mostly running Linux and Windows guests. Now I need to create a macOS guest in order to try something on a clean system. So far, all I've been able to produce is a frustrating collection of error messages.

First, I tried to use the script from the pinned post I can not link to because I just registered to create a bootable ISO image:

Code: Select all   Expand viewCollapse view
$ sudo ./InstallerApp2ISO.sh -i /Applications/Install\ macOS\ Monterey.app -o .

================================================================================
Apple OSX Installer Application to ISO creation tool
================================================================================
Version: 2019-11-27
Copyright (C) 2017-2019, socratis @ VirtualBox forums,
         with help from granada29 @ VirtualBox forums.
All rights reserved.

*** ERROR: The provided application is NOT a valid OSX InstallerApp:
           -> /Applications/Install macOS Monterey.app
           -> /Applications/Install macOS Monterey.app/Contents/SharedSupport/InstallESD.dmg file not found!


Too bad. So, the manual way.

Code: Select all   Expand viewCollapse view
$ hdiutil create -o ./MontereyInstall -size 16384m -volname MontereyInstall -layout SPUD -fs HFS+J
$ hdiutil attach ./MontereyInstall.dmg -noverify -mountpoint /Volumes/MontereyInstall
$ sudo /Applications/Install\ macOS\ Monterey.app/Contents/Resources/createinstallmedia --volume /Volumes/MontereyInstall/
Ready to start.
To continue we need to erase the volume at /Volumes/MontereyInstall.
If you wish to continue type (Y) then press return: y
Erasing disk: 0%... 10%...
Error erasing disk error number (22, 0)
An error occurred erasing the disk.


Great. But that appears to be a known problem, so I recreated the image file using the Festplattendienstprogramm GUI and repeated the last command. This worked, so I was able to proceed with

Code: Select all   Expand viewCollapse view
$ hdiutil detach /Volumes/Install\ macOS\ Monterey/
$ hdiutil convert MontereyInstall.dmg -format UDTO -o MontereyInstall.cdr
$ mv MontereyInstall.cdr MontereyInstall.iso


Fine so far. Now: Using Virtualbox 6.1.36 with the corresponding extension pack, I've created a new machine using the Mac OS X 64-bit template. 4 MB RAM, 50 GB HDD, removed the floppy drive from boot, changed vCPUs to 2 and video memory to 128 MB as well as USB to USB 3.0. For the pre-configured optical drive, I selected the ISO created above. Starting the machine, I get this:

vbox-error-01.png
vbox-error-01.png (100 KiB) Viewed 1424 times


I believe there should be one or multiple lines with (CDROM) in it - at least there is in all the documentation I found online. I'm not seeing anything like it, just the liens above. Consequently, I can not select any file to boot using the boot manager UI. Changing the chipset from ICH9 to PIIX3 does not accomplish anything, neither does changing the SATA adapter type from AHCI to PIIX4, PIIX3 or ICH6.

So the next thing I tried was write the installer to an actual USB flash drive (using the same process as above) and adding the Generic Mass Storage device to the USB list of the virtual machine. Booting the machine gives me this:

vbox-error-02.png
vbox-error-02.png (101.31 KiB) Viewed 1424 times


So at least the device is there. Next I tried exit, Boot Maintenance Manager, Boot from File, HFS+ Volume, System > Library > Core Services > boot.efi

(continued because of the attachment limit...)
Attachments
vbox-logs.zip
(122.96 KiB) Downloaded 7 times
vwegert
 
Posts: 6
Joined: 10. Aug 2022, 20:51

Re: Monterey guest on Catalina host with current VirtualBox = collection of confusing problems

Postby vwegert » 10. Aug 2022, 21:18

The system boots up to this point in about 2.5 seconds:

vbox-error-03b.png
vbox-error-03b.png (120.56 KiB) Viewed 1423 times


It then takes about 35 seconds with the USB drive flashing to load the next steps, continuing rapidly to this point:

vbox-error-04b.png
vbox-error-04b.png (33.5 KiB) Viewed 1423 times


Here again, the VM stops without any apparent action. The USB stick does not show any activity at this point. After about a minute, I get this:

vbox-error-05b.png
vbox-error-05b.png (66.3 KiB) Viewed 1423 times


Waiting longer will not accomplish anything. Occasionally, an empty line is added to the bottom and pushed the garbage up a bit, and that's it.

And that's about all I managed to achieve. I've attached the logs to the original post above as a zip file. I'd really like to know where I went wrong, either creating/using the ISO file or with the USB flash drive.
vwegert
 
Posts: 6
Joined: 10. Aug 2022, 20:51

Re: Monterey guest on Catalina host with current VirtualBox = collection of confusing problems

Postby multiOS » 10. Aug 2022, 21:35

if you've loaded a prepared macOS installation ISO, then at the Shell prompt, type EXIT and press RETURN, which should take you into the UEFI menu where you can choose the 'CD' boot option.
multiOS
Volunteer
 
Posts: 623
Joined: 14. Sep 2019, 16:51
Location: United Kingdom
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: WIN11,10, 7, Linux (various)

Re: Monterey guest on Catalina host with current VirtualBox = collection of confusing problems

Postby vwegert » 10. Aug 2022, 21:57

multiOS wrote:if you've loaded a prepared macOS installation ISO, then at the Shell prompt, type EXIT and press RETURN, which should take you into the UEFI menu where you can choose the 'CD' boot option.


That takes me to this menu which does not have a "CD boot option".

vbox-error-06.png
vbox-error-06.png (70.87 KiB) Viewed 1421 times


In the Boot Manager Menu, I can choose the UEFI VBOX CD-ROM, but if I press Enter, the window flickers once rapidly - way too fast for me to see any error message.
vwegert
 
Posts: 6
Joined: 10. Aug 2022, 20:51

Re: Monterey guest on Catalina host with current VirtualBox = collection of confusing problems

Postby multiOS » 10. Aug 2022, 22:27

It's some time since I've run through the full EFI install procedure but, if I remember correctly, after you select the CD ROM boot option you press RETURN once, then ESCAPE to take you back to the main EFI Screen shown in your screenshot, then DOWN ARROW to the 'Continue' option and then press ENTER again to proceed.

By the way, to get back into the EFI screen from an installed OS you have to rapidly press the ESC key during the boot process. This is worth remembering, as the VM will continue trying to boot from the installation 'CD' until the 'Hard Drive' option is reselected.
multiOS
Volunteer
 
Posts: 623
Joined: 14. Sep 2019, 16:51
Location: United Kingdom
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: WIN11,10, 7, Linux (various)

Re: Monterey guest on Catalina host with current VirtualBox = collection of confusing problems

Postby vwegert » 10. Aug 2022, 23:39

multiOS wrote:after you select the CD ROM boot option you press RETURN once, then ESCAPE to take you back to the main EFI Screen shown in your screenshot, then DOWN ARROW to the 'Continue' option and then press ENTER again to proceed.


That just takes me straight back to the countdown to the shell prompt again.
vwegert
 
Posts: 6
Joined: 10. Aug 2022, 20:51

Re: Monterey guest on Catalina host with current VirtualBox = collection of confusing problems

Postby multiOS » 12. Aug 2022, 20:25

The only VM configuration issue I see in the Log(s) concerns the RAM allocation, but I don't see how that could affect the EFI boot process. however, that the issue does need to be dealt with if you are to get any VM working reliably.

Example: The LaTeX-macOS-2022-08-10-20-32-13 Log shows:

00:00:01.101853 Host RAM: 8192MB (8.0GB) total, 2104MB (2.0GB) available


but VM allocations show

00:00:01.175121 RamSize <integer> = 0x0000000100000000 (4 294 967 296, 4 096 MB, 4.0 GB)

00:00:01.175341 VRamSize <integer> = 0x0000000008000000 (134 217 728, 128 MB)


You have allocated significantly more RAM to the VM than is actually available, so you need to either limit the RAM usage by both the Host and Guest systems to a remain below 8GB, or consider upgrading the RAM to at least 16GB.

With regard to the EFI installation problem, the only further testing option I can personally think of is to try creating an ISO installer by a different method to see if the same problem is still encountered. For example, you could try creating the ISO using a purpose built 'freeware' utility such as https://www.whatroute.net/installerapp2iso.html or https://macdaddy.io/install-disk-creator/ both of which seem to have been tested against recent versions of macOS.

Otherwise, we need someone to come along with more direct knowledge of successfully creating Monterey/Big Sur macOS ISOs and VMs, as I've never seen this EFI issue when creating Windows 10/11 or Linux VMs.
multiOS
Volunteer
 
Posts: 623
Joined: 14. Sep 2019, 16:51
Location: United Kingdom
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: WIN11,10, 7, Linux (various)

Re: Monterey guest on Catalina host with current VirtualBox = collection of confusing problems

Postby vwegert » 16. Aug 2022, 21:12

multiOS wrote:You have allocated significantly more RAM to the VM than is actually available, so you need to either limit the RAM usage by both the Host and Guest systems to a remain below 8GB, or consider upgrading the RAM to at least 16GB.


Yes, thanks for the reminder - I was apparently confusing my two systems. I've upgraded the Mac mini in the meantime, so that shouldn't be a problem any more.

multiOS wrote:For example, you could try creating the ISO using a purpose built 'freeware' utility such as https://www.whatroute.net/installerapp2iso.html


That was the one I was referring to in the first post - at least that's the GUI for the script I was using. The GUI frontend produces the same error message.



I have not been able to find out how to create an ISO image with this app. I'll use it to recreate the USB stick and report the results.
vwegert
 
Posts: 6
Joined: 10. Aug 2022, 20:51

Re: Monterey guest on Catalina host with current VirtualBox = collection of confusing problems

Postby vwegert » 19. Aug 2022, 21:53

vwegert wrote:
multiOS wrote:For example, you could try creating the ISO using a purpose built 'freeware' utility such as https://www.whatroute.net/installerapp2iso.html


That was the one I was referring to in the first post - at least that's the GUI for the script I was using. The GUI frontend produces the same error message.


I've deleted and re-downloaded the Monterey installer from Apple and tried to create the ISO with the GUI again. No luck:

Code: Select all   Expand viewCollapse view
Command: "/private/var/folders/hw/d_z4rltd4d905p9tktkfc0q40000gp/T/AppTranslocation/E918AB21-2000-47EC-80F9-E32DD86B4BED/d/InstallerApp2ISO.app/Contents/Resources/InstallerApp2ISO.sh" -i "/Applications/Install macOS Monterey.app" -o "/Users/vwegert/nobackup" -t "/var/folders/hw/d_z4rltd4d905p9tktkfc0q40000gp/T/TemporaryItems/(A Document Being Saved By InstallerApp2ISO)" -p "/private/var/folders/hw/d_z4rltd4d905p9tktkfc0q40000gp/T/AppTranslocation/E918AB21-2000-47EC-80F9-E32DD86B4BED/d/InstallerApp2ISO.app/Contents/MacOS/privileged" -y -v 3
================================================================================
Apple OSX Installer Application to ISO creation tool
================================================================================
Version: 2020-09-25
Copyright (C) 2017-2020, socratis @ VirtualBox forums,
         with help from granada29 @ VirtualBox forums.
All rights reserved.

--------------------------------------------------------------------------------
VERBOSE OUTPUT
--------------------------------------------------------------------------------
MY_HOST_OSX   = 10.15.7 (19H1323)
MY_COMMAND    = /private/var/folders/hw/d_z4rltd4d905p9tktkfc0q40000gp/T/AppTranslocation/E918AB21-2000-47EC-80F9-E32DD86B4BED/d/InstallerApp2ISO.app/Contents/Resources/InstallerApp2ISO.sh
MY_INSTAPP    = /Applications/Install macOS Monterey.app
MY_DESTDIR    = /Users/vwegert/nobackup
MY_TEMPDIR    = /var/folders/hw/d_z4rltd4d905p9tktkfc0q40000gp/T/TemporaryItems/(A Document Being Saved By InstallerApp2ISO)
MY_DRYRUN     = 0
MY_VERBOSE    = 3
MY_OSXVERSION =
--------------------------------------------------------------------------------

*** ERROR: The provided application is NOT a valid OSX InstallerApp:
           -> /Applications/Install macOS Monterey.app
           -> /Applications/Install macOS Monterey.app/Contents/SharedSupport/InstallESD.dmg file not found!



Out of curiosity, I tried to create an APFS VDI and ran into the following error:
Code: Select all   Expand viewCollapse view
Command: "/private/var/folders/hw/d_z4rltd4d905p9tktkfc0q40000gp/T/AppTranslocation/E918AB21-2000-47EC-80F9-E32DD86B4BED/d/InstallerApp2ISO.app/Contents/Resources/apfsvdi.sh" -i "/Applications/Install macOS Monterey.app" -o "/Users/vwegert/nobackup" -t "/var/folders/hw/d_z4rltd4d905p9tktkfc0q40000gp/T/TemporaryItems/(A Document Being Saved By InstallerApp2ISO)" -y --name "LaTeX-macOS" --size "50"
DESTDIR: /Users/vwegert/nobackup
VDI: /Users/vwegert/nobackup/LaTeX-macOS.vdi
TMPDIR: /var/folders/hw/d_z4rltd4d905p9tktkfc0q40000gp/T/TemporaryItems/(A Document Being Saved By InstallerApp2ISO)
Attempt to mount:
hdiutil attach "" | awk -F \t /Apple_HFS/ {print $3}
hdiutil: attach: cannot convert "" to URL
hdiutil: attach failed - Ungültiges Argument
Error: Cannot attach Base System Image:

Script is exiting ...
Deleted sparse bundle: /var/folders/hw/d_z4rltd4d905p9tktkfc0q40000gp/T/TemporaryItems/(A Document Being Saved By InstallerApp2ISO)/LaTeX-macOS.sparsebundle


vwegert wrote:


I have not been able to find out how to create an ISO image with this app. I'll use it to recreate the USB stick and report the results.


Got the same results, unfortunately. It appears I'm no closer to a solution...
vwegert
 
Posts: 6
Joined: 10. Aug 2022, 20:51


Return to Mac OS X Guests

Who is online

Users browsing this forum: No registered users and 2 guests