sickcodes / Docker-OSX

Run macOS VM in a Docker! Run near native OSX-KVM in Docker! X11 Forwarding! CI/CD for OS X Security Research! Docker mac Containers.
https://hub.docker.com/r/sickcodes/docker-osx
GNU General Public License v3.0
46.45k stars 2.5k forks source link

how can i attach physical disk ? #493

Open bluesiboy opened 2 years ago

bluesiboy commented 2 years ago

` 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???

sickcodes commented 2 years ago
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