how can i attach physical disk ? #360

Open
opened 2025-12-29 00:25:17 +01:00 by adam · 3 comments
Owner

Originally created by @bluesiboy on GitHub (May 7, 2022).

`
OSX_IMAGE="${PWD}/mac_hdd_ng_xcode_bigsur.img"
DISK_TWO="${PWD}/mount_me.img"

docker run -it
--device /dev/kvm
-e "DISPLAY=${DISPLAY:-:0.0}"
-v /tmp/.X11-unix:/tmp/.X11-unix
-e MASTER_PLIST_URL='https://raw.githubusercontent.com/sickcodes/osx-serial-generator/master/config-custom.plist'
-v "${OSX_IMAGE}":/image
-v "${DISK_TWO}":/disktwo
-e EXTRA='-device ide-hd,bus=sata.5,drive=DISK-TWO -drive id=DISK-TWO,if=none,file=/disktwo,format=qcow2'
sickcodes/docker-osx:naked
`

what is the mount_me.img?
how can i create the file, can i attach /dev/sdb1 to macos ?
i understand "EXTRA='do something ...'",
can you give me something documents on internet???

Originally created by @bluesiboy on GitHub (May 7, 2022). ` OSX_IMAGE="${PWD}/mac_hdd_ng_xcode_bigsur.img" DISK_TWO="${PWD}/mount_me.img" docker run -it \ --device /dev/kvm \ -e "DISPLAY=${DISPLAY:-:0.0}" \ -v /tmp/.X11-unix:/tmp/.X11-unix \ -e MASTER_PLIST_URL='https://raw.githubusercontent.com/sickcodes/osx-serial-generator/master/config-custom.plist' \ -v "${OSX_IMAGE}":/image \ -v "${DISK_TWO}":/disktwo \ -e EXTRA='-device ide-hd,bus=sata.5,drive=DISK-TWO -drive id=DISK-TWO,if=none,file=/disktwo,format=qcow2' \ sickcodes/docker-osx:naked ` what is the mount_me.img? how can i create the file, can i attach /dev/sdb1 to macos ? i understand "EXTRA='do something ...'", can you give me something documents on internet???
Author
Owner

@sickcodes commented on GitHub (May 14, 2022):

DISK_TWO=/fullpath/to/disk
FORMAT=qcow2
    -v "${DISK_TWO}:/disktwo" \
    -e EXTRA="-device ide-hd,bus=sata.5,drive=DISKTWO -drive id=DISKTWO,if=none,file=/disktwo,format=${FORMAT}" \

Also try
sata.4
sata.5

Depending if you have other disks

Any existing EXTRA stuff, just keep adding

@sickcodes commented on GitHub (May 14, 2022): ``` DISK_TWO=/fullpath/to/disk FORMAT=qcow2 -v "${DISK_TWO}:/disktwo" \ -e EXTRA="-device ide-hd,bus=sata.5,drive=DISKTWO -drive id=DISKTWO,if=none,file=/disktwo,format=${FORMAT}" \ ``` Also try sata.4 sata.5 Depending if you have other disks Any existing EXTRA stuff, just keep adding
Author
Owner

@rutikthakre commented on GitHub (Nov 27, 2024):

@sickcodes I am trying to open my project in mac os using dev container. But unfortunately I am able to access current project in the arch. Not in VM mac os.

@rutikthakre commented on GitHub (Nov 27, 2024): @sickcodes I am trying to open my project in mac os using dev container. But unfortunately I am able to access current project in the arch. Not in VM mac os.
Author
Owner

@gusbemacbe commented on GitHub (Nov 17, 2025):

Good afternoon, @sickcodes!

Please peruse if this YAML code is correct or wrong. I am trying to attach a BaseImage.img (tahoe.img) and an HDD disk file (tahoe.qcow2). Here is:

services:
  osx:
    image: docker.io/sickcodes/docker-osx:latest
    privileged: true
    devices:
      - /dev/kvm
      - /dev/snd
    ports:
      - 50922:10022
    volumes:
      # - $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY:/tmp/$WAYLAND_DISPLAY
      - /tmp/.X11-unix:/tmp/.X11-unix
      - ./tahoe.img:/image
      - ./tahoe.qcow2:/disktwo
    environment:
      GENERATE_UNIQUE: true
      RAM: 8
      CPU: 'Haswell-noTSX'
      CPUID_FLAGS: 'kvm=on,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on'
      MASTER_PLIST_URL: 'https://raw.githubusercontent.com/sickcodes/osx-serial-generator/master/config-custom-sonoma.plist'
      XDG_RUNTIME_DIR: /tmp
      # WAYLAND_DISPLAY: "${WAYLAND_DISPLAY:-wayland-0}"
      WAYLAND_DISPLAY: "$WAYLAND_DISPLAY"
      QT_QPA_PLATFORM: wayland
      GDK_BACKEND: wayland
      CLUTTER_BACKEND: wayland
      DISPLAY: "${DISPLAY:-:0.0}"
      XDG_SESSION_TYPE: wayland
      SHORTNAME: tahoe
      # WIDTH: 1440
      # HEIGHT: 900
      DISK_IMAGE: /image
      DISK_TWO: /disktwo
      FORMAT: qcow2
      EXTRA: "-display vnc=0.0.0.0:1,password=off -audiodev none,id=noaudio -device ich9-intel-hda -device hda-duplex,audiodev=noaudio -device ide-hd,bus=sata.5,drive=DISKTWO -drive id=DISKTWO,if=none,file=/disktwo,format=${FORMAT}"
@gusbemacbe commented on GitHub (Nov 17, 2025): Good afternoon, @sickcodes! Please peruse if this YAML code is correct or wrong. I am trying to attach a BaseImage.img (`tahoe.img`) and an HDD disk file (`tahoe.qcow2`). Here is: ```yml services: osx: image: docker.io/sickcodes/docker-osx:latest privileged: true devices: - /dev/kvm - /dev/snd ports: - 50922:10022 volumes: # - $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY:/tmp/$WAYLAND_DISPLAY - /tmp/.X11-unix:/tmp/.X11-unix - ./tahoe.img:/image - ./tahoe.qcow2:/disktwo environment: GENERATE_UNIQUE: true RAM: 8 CPU: 'Haswell-noTSX' CPUID_FLAGS: 'kvm=on,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on' MASTER_PLIST_URL: 'https://raw.githubusercontent.com/sickcodes/osx-serial-generator/master/config-custom-sonoma.plist' XDG_RUNTIME_DIR: /tmp # WAYLAND_DISPLAY: "${WAYLAND_DISPLAY:-wayland-0}" WAYLAND_DISPLAY: "$WAYLAND_DISPLAY" QT_QPA_PLATFORM: wayland GDK_BACKEND: wayland CLUTTER_BACKEND: wayland DISPLAY: "${DISPLAY:-:0.0}" XDG_SESSION_TYPE: wayland SHORTNAME: tahoe # WIDTH: 1440 # HEIGHT: 900 DISK_IMAGE: /image DISK_TWO: /disktwo FORMAT: qcow2 EXTRA: "-display vnc=0.0.0.0:1,password=off -audiodev none,id=noaudio -device ich9-intel-hda -device hda-duplex,audiodev=noaudio -device ide-hd,bus=sata.5,drive=DISKTWO -drive id=DISKTWO,if=none,file=/disktwo,format=${FORMAT}" ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Docker-OSX#360