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.2k stars 2.47k forks source link

How to open qemu console in headless image? #753

Open recsater opened 6 months ago

recsater commented 6 months ago

after docker run

(qemu) vnc change password
# password setting...
# at this point, I could connect with VNC viewer.
(qemu) q # exit qemu console

container stopped.

docker start <headless container>

container started.

and.. how can I access the qemu console? It seems that the VNC password gets reset upon exiting the qemu console.

recsater commented 6 months ago

Ah, I meant to kill the container, not exit the qemu console.

But even if the container is killed, how do I return to the qemu console?

recsater commented 6 months ago

I tried docker exec -i <contianer name> qemu-system-x86_64 -monitor stdio

But

image

recsater commented 6 months ago

Solved :+1:

docker start <container name>
docker attach <container name>
sickcodes commented 5 months ago

Awesome, you can also do docker start -ai which attaches to the container upon starting it