macos icon indicating copy to clipboard operation
macos copied to clipboard

A writeable disk is required (-69722)

Open varadins opened this issue 1 year ago • 8 comments

Operating system

Ubuntu 24.04

Description

When attempting to erase the largest VirtIO Block Media I receive the error that the disk is not writeable.

Files are owned by docker:docker and chmod 766

Docker compose

GNU nano 7.2                                       docker-compose.yml                                                 
services:
  macos:
    image: dockurr/macos
    container_name: macos
    environment:
      VERSION: "13"
      RAM_SIZE: "16G"
      CPU_CORES: "4"
    devices:
      - /dev/kvm
      - /dev/net/tun
    cap_add:
      - NET_ADMIN
    ports:
      - 8006:8006
      - 5900:5900/tcp
      - 5900:5900/udp
    volumes:
      - /home/docker/docker/macos/macos:/storage
    restart: always
    stop_grace_period: 2m

Docker log

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

varadins avatar Sep 08 '25 16:09 varadins

I never seen that error before. Can you please test again using the new version of the container (v2.16)? Maybe it works better.

kroese avatar Sep 18 '25 16:09 kroese

I'm on Windows 11 (trying to make it work in WSL2) and I experience the same issue (v2.17):

docker compose up
[+] Running 8/8
 ✔ macos Pulled                                                                                                                                         32.6s
   ✔ 2c46bbfbcd68 Pull complete                                                                                                                         30.0s
   ✔ 96349ba7ba87 Pull complete                                                                                                                         30.0s
   ✔ bf975a33ef07 Pull complete                                                                                                                         30.1s
   ✔ 826c3ca90433 Pull complete                                                                                                                         30.1s
   ✔ 4865b46a9ca5 Pull complete                                                                                                                         30.2s
   ✔ 859a90b6e796 Pull complete                                                                                                                         30.2s
   ✔ cc3847659ea6 Pull complete                                                                                                                         30.3s
[+] Running 2/2
 ✔ Network macos_default  Created                                                                                                                        0.1s
 ✔ Container macos        Created                                                                                                                        0.2s
Attaching to macos
macos  | ❯ Starting macOS for Docker v2.17...
macos  | ❯ For support visit https://github.com/dockur/macos
macos  | ❯ CPU: Intel Core i7 1270P | RAM: 15/16 GB | DISK: 873 GB (ext4) | KERNEL: 6.6.87.2-microsoft-standard-WSL2...
macos  |
macos  | ❯ Downloading macOS 13 recovery image...
macos  |
macos  |      0K ........ ........ ........ ........  4%  654K 16m51s
macos  |  32768K ........ ........ ........ ........  9%  674K 15m47s
macos  |  65536K ........ ........ ........ ........ 14% 1023K 13m13s
macos  |  98304K ........ ........ ........ ........ 18%  488K 14m11s
macos  | 131072K ........ ........ ........ ........ 23%  900K 12m39s
macos  | 163840K ........ ........ ........ ........ 28%  909K 11m25s
macos  | 196608K ........ ........ ........ ........ 33% 1.14M 10m5s
macos  | 229376K ........ ........ ........ ........ 37% 2.78M 8m31s
macos  | 262144K ........ ........ ........ ........ 42% 3.93M 7m11s
macos  | 294912K ........ ........ ........ ........ 47% 2.86M 6m9s
macos  | 327680K ........ ........ ........ ........ 51% 5.27M 5m11s
macos  | 360448K ........ ........ ........ ........ 56% 4.66M 4m22s
macos  | 393216K ........ ........ ........ ........ 61% 7.89M 3m38s
macos  | 425984K ........ ........ ........ ........ 66% 7.48M 3m0s
macos  | 458752K ........ ........ ........ ........ 70% 17.0M 2m25s
macos  | 491520K ........ ........ ........ ........ 75% 10.4M 1m55s
macos  | 524288K ........ ........ ........ ........ 80% 8.97M 88s
macos  | 557056K ........ ........ ........ ........ 84% 8.11M 64s
macos  | 589824K ........ ........ ........ ........ 89% 7.64M 42s
macos  | 622592K ........ ........ ........ ........ 94% 6.84M 22s
macos  | 655360K ........ ........ ........ ........ 99% 4.20M 3s
macos  | 688128K .....                              100% 5.00M=6m21s
macos  |
macos  | ❯ Creating a 64 GB growable disk image in raw format...
macos  | ❯ Building boot image...
macos  | ❯
macos  | ❯ Model: iMacPro1,1
macos  | ❯ Rom: 0016cb606322
macos  | ❯ Serial: C02DHNZTHX87
macos  | ❯ Board: C02040300GUJG36FB
macos  | ❯
macos  | ❯ Booting macOS using QEMU v10.0.3...
macos  |
BdsDxe: failed to load Boot0001 "UEFI Misc Device" from PciRoot(0x0)/Pci(0xA,0x0): Not Found
macos  | BdsDxe: loading Boot0002 "UEFI Misc Device 2" from PciRoot(0x0)/Pci(0x5,0x0)
macos  | BdsDxe: starting Boot0002 "UEFI Misc Device 2" from PciRoot(0x0)/Pci(0x5,0x0)
macos  | #[EB|LOG:EXITBS:END] _
macos  | #[EB.BST.FBS|-]
macos  | #[EB|B:BOOT]
macos  | #[EB|LOG:HANDOFF TO XNU] _
macos  | ======== End of efiboot serial output. ========

I'd like to add that the container does run when this happens, I can connect via VNC but what I see is that it's stuck at the recovery screen, giving the option to re-install MacOS, but when I click that (obviously) it doesn't find a suitable disk because it couldn't create it in the first place. It could be related to this: https://stackoverflow.com/a/71685427 (I'd like to avoid running it using --privileged as highlighted before in a previous comment).

rm0d1s avatar Sep 23 '25 08:09 rm0d1s

Tested with --privileged (2.23), the same error. Any news about this issue ?

stelara avatar Oct 15 '25 16:10 stelara

Tested with --privileged (2.23), the same error. Any news about this issue ?

The problem is on Linux host systems, when running docker with non root user. If you specify volume as ./your_storage:/storage, then docker put system files into ./your_storage/{VERSION} with root permissions only. Quick fix : just chown -R {user}:{user} ./your_storage/{VERSION} before disk erase.

stelara avatar Oct 21 '25 15:10 stelara

@stelara Thanks for your research! I now created a new version (v2.27) which automaticly sets the owner of the subdirectory to be the same as the parent folder /storage. Could you please test for me if this fixes your issue (without you manually running chmod)?

kroese avatar Oct 22 '25 02:10 kroese

@kroese Your latest update fixed the issue. Thank you!

varadins avatar Oct 22 '25 02:10 varadins

@kroese I still have this issue with v2.27 although it seems to have written my storage folder with full permission for me:

drwxrwxrwx+ 1 nick users 138 Oct 23 15:05 14

The largest VirtIO Block Media shows as not writeable and gives me the same 'A writeable disk is required' message when I try to erase.

Any suggestions?

diddlysquibbly avatar Oct 23 '25 15:10 diddlysquibbly

@diddlysquibbly No, I have no idea. But its very hard to figure out what could be wrong without any info about your OS/docker log files/etc. So please create a new issue with all relevant information so that we can figure out what could be wrong.

kroese avatar Oct 23 '25 15:10 kroese