Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support - macOS 10.15 Catalina installer #38

Closed
egandro opened this issue Jun 7, 2019 · 26 comments
Closed

Support - macOS 10.15 Catalina installer #38

egandro opened this issue Jun 7, 2019 · 26 comments
Milestone

Comments

@egandro
Copy link
Contributor

egandro commented Jun 7, 2019

I will do a go/nogo installation with this

@egandro
Copy link
Contributor Author

egandro commented Jun 7, 2019

Iso won't boot in Vmware...

@milch
Copy link

milch commented Jun 7, 2019

I tried the installation with the following options, using the latest VMware 11:

sudo macinbox --short catalina-test --full User --password 123456 --installer /Applications/Install\ macOS\ 10.15\ Beta.app --use-qemu

Got this log output:

• Checking macOS versions...
  + Warning: host OS version (10.14.5) and installer OS version (10.15) do not match
• Creating image from installer...
  + Creating and attaching wrapper disk image...
  + Creating and attaching a new blank disk image...
  + Installing macOS...
    - installer: 100% done

• Cleaning up...
Traceback (most recent call last):
        11: from ~/.rbenv/versions/2.6.3/bin/macinbox:23:in `<main>'
        10: from ~/.rbenv/versions/2.6.3/bin/macinbox:23:in `load'
         9: from ~/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/macinbox-3.3.0/exe/macinbox:5:in `<top (required)>'
         8: from ~/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/macinbox-3.3.0/lib/macinbox/cli.rb:19:in `run!'
         7: from ~/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/macinbox-3.3.0/lib/macinbox/cli.rb:122:in `start'
         6: from ~/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/macinbox-3.3.0/lib/macinbox/cli.rb:122:in `chdir'
         5: from ~/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/macinbox-3.3.0/lib/macinbox/cli.rb:128:in `block in start'
         4: from ~/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/macinbox-3.3.0/lib/macinbox/logger.rb:17:in `info'
         3: from ~/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/macinbox-3.3.0/lib/macinbox/cli.rb:129:in `block (2 levels) in start'
         2: from ~/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/macinbox-3.3.0/lib/macinbox/actions/create_image_from_installer.rb:49:in `run'
         1: from ~/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/macinbox-3.3.0/lib/macinbox/actions/create_image_from_installer.rb:112:in `create_rc_vagrant'
~/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/macinbox-3.3.0/lib/macinbox/actions/create_image_from_installer.rb:112:in `write': No such file or directory @ rb_sysopen - /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/create_image_from_installer.ZAEvtMe6/scratch_mountpoint/private/etc/rc.installer_cleanup (Errno::ENOENT)

@egandro
Copy link
Contributor Author

egandro commented Jun 8, 2019

I tried just the ISO not via macinbox.

At this point the VM didn't start, yet - just the Installer was called to write the content to a disk.

So could be the same issue. So VMWare needs to solve this :)

@bacongravy
Copy link
Owner

Thanks, @egandro, for looking into this and sharing your findings. I haven't had a chance to dig into Catalina support. I did find this thread which has some workarounds for getting Catalina to work in Fusion:

https://communities.vmware.com/thread/611961

The error that macinbox reported:

create_image_from_installer.rb:112:in `write': No such file or directory @ rb_sysopen - /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/create_image_from_installer.ZAEvtMe6/scratch_mountpoint/private/etc/rc.installer_cleanup (Errno::ENOENT)

...is probably because Catalina changes how the root filesystem works, and it is no longer okay to create files in /private/etc. I'm hopeful that once I learn more about how Catalina works that I'll be able to identify a workaround.

@bacongravy
Copy link
Owner

I have reproduced this issue. The following directories do not exist on the volume created by the Catalina installer:

/private/etc
/private/etc/sudoers.d
/Library/Preferences

The script fails when it tries to write files to these locations.

@epackorigan
Copy link

There appears to be "templates" for a lot of the files around this path, inside the image:
/System/Library/Templates/Data

@egandro
Copy link
Contributor Author

egandro commented Jun 25, 2019

Someone managed to get this working with VMWare:

macOS 10.15 Catalina Installer (Beta 1 19A471t)

@bacongravy
Copy link
Owner

I hacked on macinbox to add a /System/Library/Templates/Data prefix to all the relevant paths and was able to create a box, but when I boot the box with VMware it gets about 80% through the startup progress bar and then the VM spontaneously powers off. I tried booting verbosely but didn't see any relevant messages before the VM stopped.

@egandro
Copy link
Contributor Author

egandro commented Jun 27, 2019

We have to figure out how to create / patch a specific nvram file :( This issue can be solved with a -v boot arg parameter.

@adamwolf
Copy link

I think we can borrow some things from here! https://github.com/AlexanderWillner/runMacOSinVirtualBox

@bacongravy
Copy link
Owner

@adamwolf Contributions are welcome! However, I'm not sure what we can borrow from that project that I haven't already. The difficultly here isn't in getting macOS to boot in a VM, but in getting that VM automatically configured to be a valid vagrant box.

The macinbox tool is somewhat unique in that it attempts to perform the installation of the OS on the host, rather than inside of a VM. In order to configure the installed OS to be usable by vagrant the tool needs to lay down some files in locations projected by SIP, which is very hard to do once the installed OS is running. You'll note that runMacOSinVirtualBox doesn't automate the installation of the OS or the creation of user accounts at all. You have to manually click through the installer after the VM boots for the first time!

@egandro
Copy link
Contributor Author

egandro commented Aug 27, 2019

Someone tried a new beta?

@egandro
Copy link
Contributor Author

egandro commented Aug 30, 2019

I got Beta7 booting with this "trick":

https://communities.vmware.com/thread/611961

But the installed OS still does not boot :(

@egandro
Copy link
Contributor Author

egandro commented Sep 17, 2019

Officially announced: https://blogs.vmware.com/teamfusion/2019/08/vmworld-2019-fusion-and-workstation-announcements.html

Fusion 11.5 comes with macOS 10.15 Catalina

I guess we have to wait for a few weeks...

@egandro
Copy link
Contributor Author

egandro commented Sep 20, 2019

@bacongravy
Copy link
Owner

Thanks, @egandro ! I haven't had a chance to try the new Fusion yet, or the latest Catalina, but I will soon.

I did see that AutoDMG needed to make a change for Catalina: MagerValp/AutoDMG@c55bbcf

...which looks like it addresses: MagerValp/AutoDMG#234

@bacongravy
Copy link
Owner

I did some more testing with the latest Catalina and Fusion using a Mojave host. I can install and run Catalina in Fusion if I create the VM using Fusion from the Catalina installer app. However, if I create a box with a hacked (that is, with paths prefixed with /System/Library/Templates/Data) version of macinbox it powers off part way through booting in Fusion. According to the logs it seems that the Data volume isn't getting mounted. I'm starting to wonder if the Mojave installer actually knows how to install Catalina properly. The next thing to try is to use the hacked macinbox from a Catalina host and see if the created box behaves differently.

@bacongravy
Copy link
Owner

I tested with Catalina 19A582a as both the host and installer version, and macinbox mostly works as-is. The box is created and boots fine, but the VMware guest kernel extensions don't get loaded properly.

@bacongravy
Copy link
Owner

I was able to boot Catalina with Parallels and VirtualBox, too, using an unmodified macinbox to create the boxes from a Catalina host.

I then recreated a VMWare box and it started hanging at the end of the boot process. My suspicion is that the broken VMWare tools kernel extensions were somehow blocking the boot process. (I don't know why sometimes they are reported as broken after booting, whereas other times they apparently just cause a hang.) I was able to work around the issue by re-creating the Catalina VMWare box again, this time without the tools installed or the KextPolicy file updated.

@bacongravy
Copy link
Owner

bacongravy commented Oct 6, 2019

I am also observing that the HiDPI setting is not preserved when vagrant brings up the VMWare box. When you try to bring up a VMWare box and then inspect the virtual machine with VMWare Fusion the HiDPI setting is not enabled. The setting appears properly in the original VMX file in the box, but the cloned VMX file has the setting lowercased, and it is not respected. If you power off the VM and change the setting with VMWare Fusion it updates the VMX and puts the capitalization of the setting correctly again. If you power the VM back on with VMWare Fusion the setting is preserved. However, if you run vagrant up again, then the setting gets lowercased again, and the VM boots without HiDPI support.

Works: gui.fitGuestUsingNativeDisplayResolution = "TRUE"
Does not work: gui.fitguestusingnativedisplayresolution = "TRUE"

This appears to be long-standing vagrant behavior so I think this may be a regression introduced by VMWare Fusion 11.5.

@bacongravy
Copy link
Owner

Confirmed, the HiDPI issue does not occur with 11.1.0. I have filed #44 to track the issue.

@bacongravy
Copy link
Owner

Here's my current thinking for how to resolve this issue:

  • Prevent pre-Catalina hosts from attempting to create a Catalina-or-later box
  • Don't install the VMWare tools into Catalina-or-later guests
  • Set the virtualHW and guestOS values in the VMX based on the installer OS version

@bacongravy
Copy link
Owner

It also turns out the Catalina hosts cannot create Mojave (or earlier) boxes, so we'll need to prevent that, too.

@bacongravy
Copy link
Owner

I've begun to address this on a catalina branch. I'm targeting this for the v4.0.0 milestone.

@bacongravy bacongravy added this to the v4.0.0 milestone Oct 7, 2019
@bacongravy
Copy link
Owner

I have addressed this with 019c999.

@bacongravy
Copy link
Owner

v4.0.0 has been released. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants