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

Container not responding #69

Closed FaiqOsitech closed 3 years ago

FaiqOsitech commented 4 years ago

After installation when i use the command.

start docker

container_id is printed in the next line and that's it. The container doesn't response.

Cerealkillerway commented 4 years ago

for me the problem were the permissions for the kvm folder; it looks like they are resetted every time so before running the container I always have to sudo chmod 666 /dev/kvm (I run on ubuntu)

then I can docker start <containerID>

FaiqOsitech commented 4 years ago

i do run this command sudo chmod 666 /dev/kvm

and then i start the docker but still nothing happens.

stephane-r commented 4 years ago

I've the same result if i try to run the containerId using docker start <containerID>.

My kvm folder have correct chmod too.

sickcodes commented 4 years ago

Most likely the wrong image being started.

If you don’t want to look for it, use the command in the readme to in the file path of the big .img

Cut and paste it somewhere as root

Start a new container, record the docker ps container id

Stop the container

Paste the img into the new one as root. Find the overlay path using the docker inspect

Or use docker cp if you have disk space

FaiqOsitech commented 4 years ago

Already tried that.

Still same thing happens.

stephane-r commented 4 years ago

Paste the img into the new one as root. Find the overlay path using the docker inspect

Have you more information about this step ?

sickcodes commented 4 years ago

find the right image (usually the big one) sudo find /var/lib/docker -size +10G | grep mac_hdd_ng.img

sudo move it somewhere

start a new docker docker run --privileged -e "DISPLAY=${DISPLAY:-:0.0}" -v /tmp/.X11-unix:/tmp/.X11-unix sickcodes/docker-osx

copy its id into clipboard docker ps

kill it docker kill abc123efg

find your container's root folder docker inspect abc123efg | grep Upper

put the old .img file in there

sudo mv \
/var/lib/docker/overlay2/ajjajajajaja/diff/home/arch/OSX-KVM/mac_hdd_ng.img \
/var/lib/docker/overlay2/yjyjyjyjjyyjy/diff/home/arch/OSX-KVM/mac_hdd_ng.img
c1tt1 commented 4 years ago

I had the same issue and it wasn't a matter of starting the wrong container, sudo chmod 666 /dev/kvm did nothing to help.

After several try failure, started a new container.

sickcodes commented 4 years ago

After you started a new container, you can move the old .img file into the new one and boot up into your previous installation by moving it into the new container’s directory

sickcodes commented 3 years ago

Closing this issue as you've mentioned it was solved in a new container