macos icon indicating copy to clipboard operation
macos copied to clipboard

Takes 4hrs to install any MacOS

Open Usalabs opened this issue 1 year ago • 5 comments

Operating system

Ubuntu 22.04.4

Description

After going to bed while waiting for the default MacOS to install (shows estimated time 3hs 45m) I wake to find an error updating, and asking what disk to start, and no selection just an empty box, I tried with all MacOS images listed, so I tried a container restart, and it went back to attempting an update which showed as estimated time 3hrs 30m.

Installing any MacOS into a container is far to slow, the dockur/windows is much faster.

Docker compose

The deault docker-compose.yml as shown on the 'Code' section of this site.

Docker log

The macos log only show the boot loading and nothing else.

❯ Starting macOS for Docker v2.15...
❯ For support visit https://github.com/dockur/macos
❯ CPU: Intel Xeon E5530 | RAM: 6/8 GB | DISK: 68 GB (ext4) | KERNEL: 5.15.0-153...
❯ Building boot image...
❯ 
❯ Model: iMacPro1,1
❯ Rom: 0016cbb80e3e
❯ Serial: C02FT0DYHX87
❯ Board: C02123902GUJG36A8
❯ 
❯ Booting macOS using QEMU v10.0.0...
3h3h3hBdsDxe: failed to load Boot0080 "Mac OS X" from PciRoot(0x0)/Pci(0xA,0x0)/VenMedia(BE74FCF7-0B7C-49F3-9147-01F4042E6842,38A9ABBE30848D438F552A6907F08EFA)/\6BD8EC19-78D1-4C73-B8BF-AE16C603BA78\com.apple.installer\boot.efi: Not Found

BdsDxe: failed to load Boot0001 "UEFI Misc Device" from PciRoot(0x0)/Pci(0xA,0x0): Not Found
BdsDxe: loading Boot0002 "UEFI Misc Device 2" from PciRoot(0x0)/Pci(0x5,0x0)
BdsDxe: starting Boot0002 "UEFI Misc Device 2" from PciRoot(0x0)/Pci(0x5,0x0)

#[EB|LOG:EXITBS:END] _
#[EB.BST.FBS|-]
#[EB|B:BOOT]
#[EB|LOG:HANDOFF TO XNU] _
======== End of efiboot serial output. ========

Screenshots (optional)

No response

Usalabs avatar Sep 09 '25 13:09 Usalabs

If your hardware is actually a Xeon E5530 with 8G of ram that makes sense. It can take an hour to install on a Ryzen 5800X when I set the environment variables to 4 vCPU and 16G memory and everything is on a nvme drive. After it boots the OS is usable, but not something that I would want to use for more than a few minutes.

piaccarino avatar Sep 18 '25 11:09 piaccarino

If your hardware is actually a Xeon E5530 with 8G of ram that makes sense. It can take an hour to install on a Ryzen 5800X when I set the environment variables to 4 vCPU and 16G memory and everything is on a nvme drive. After it boots the OS is usable, but not something that I would want to use for more than a few minutes.

Yes, the CPU's are Xeon E5530's, the machine is a fully loaded Dell PowerEdge T710 with 2x Xeon E5530's and 576GB ECC RAM, running headless Ubuntu 22.04.4 server on 8x 3GB SSD RAID drives.

I even tried to set the memory amount of the container to 32GB, and vCPU to 12, (each CPU as 8 cores), it still took around 3 1/2 hours to install the mac OS.

Usalabs avatar Sep 18 '25 16:09 Usalabs

Very strange. I test the container myself using an Intel N100 cpu, which is very low-budget. I dont know exactly how its performance compares to the E5530, but it does take only 20 minutes or so to install (not 3.5 hours).

Maybe that Xeon is missing some instruction set (like AVX that the N100 has) which makes it so slow in macOS?

kroese avatar Sep 18 '25 17:09 kroese

E5530 is a 15 years old 4c8t processor. If you're not running this container in a VM on that host, it thinks you only have 8G of memory. That may just be a kernel issue but here is what my system shows as a headless arch server install -

❯ Starting macOS for Docker v2.16...
❯ For support visit https://github.com/dockur/macos
❯ CPU: AMD Ryzen 7 5800X | RAM: 92/126 GB | DISK: 580 GB (ext4) | KERNEL: 6.16.4-arch1-1...

It is probably a combination of macos being a pig and your hardware being very old. Even on more recent hardware it isn't great.

piaccarino avatar Sep 18 '25 20:09 piaccarino

If it is 15 years old it will be missing lots of CPU instruction sets (like AVX) that macOS heavily relies on. It is possible that QEMU will emulate those, but they will be far slower than their hardware implementations. Also running this VM inside another VM (what seems to be the case) will only make things worse.

I will be closing this issue, because on recent hardware (even very cheap ones like the Intel N100) it performs normally.

kroese avatar Sep 18 '25 20:09 kroese