mirror of
https://github.com/sickcodes/Docker-OSX.git
synced 2026-01-11 21:10:25 +01:00
Running on a linux headless server #17
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kneelesh48 on GitHub (Jun 7, 2020).
Is it possible to run this on a headless linux server? I'd like to have full 1080p display output when VNCing to the server. I've experienced Linux VNC machines lagging when using the GUI but Windows 10 works perfectly fine even on low bandwidth.
@sickcodes commented on GitHub (Jun 7, 2020):
https://github.com/sickcodes/Docker-OSX/tree/master/vnc-version
@sickcodes commented on GitHub (Jun 7, 2020):
Test it out, let me know if it works.
Has to have hardware virtualization turned on, digital ocean does.
Combine the two Dockerfiles together if you want to change the size of the disk because it uses the first container to do the VNC one.
Let me know if works or issues!
@romancin commented on GitHub (Jun 7, 2020):
In my case it is not working:
@sickcodes commented on GitHub (Jun 7, 2020):
tail /sys/module/kvm_intel/parameters/nestedtail /sys/module/kvm_amd/parameters/nestedOnly works if nested hard ware virt is yes or 1
@romancin commented on GitHub (Jun 7, 2020):
Yes, it is enabled in my case, AMD Ryzen 5 1600. It is supposed to work in AMD? Thank you!
@sickcodes commented on GitHub (Jun 7, 2020):
Are you using the VNC or X11 version?
@romancin commented on GitHub (Jun 7, 2020):
VNC
@andersc commented on GitHub (Jun 7, 2020):
Tried running on a Google cloud machine ..
anders.cedronius@example-nested-vm:~/docker/Docker-OSX/vnc-version$ sudo docker events& [1] 30919 anders.cedronius@example-nested-vm:~/docker/Docker-OSX/vnc-version$ sudo docker run -p 8888:5999 -d --privileged docker-osx-vnc:latest 2020-06-07T20:34:05.448740873Z volume create 109397d57e9b1d2e8fcf295c0d73f11b94e0c79afa4b6459abe1ca22f4ee80b8 (driver=local) 2020-06-07T20:34:05.458726111Z container create 5ea8cf55cff7f42218feda7c17d48e87830e814864a09ebb4a5a4bca0e7790ec (image=docker-osx-vnc:latest, name=sad_bassi) 5ea8cf55cff7f42218feda7c17d48e87830e814864a09ebb4a5a4bca0e7790ec 2020-06-07T20:34:05.500887198Z network connect 68139c83c2af3605d2ee76d860b920195aaedd7440d3f8c2809fa4d9d1005c17 (container=5ea8cf55cff7f42218feda7c17d48e87830e814864a09ebb4a5a4bca0e7790ec, name=bridge, type=bridge) 2020-06-07T20:34:05.506521141Z volume mount 109397d57e9b1d2e8fcf295c0d73f11b94e0c79afa4b6459abe1ca22f4ee80b8 (container=5ea8cf55cff7f42218feda7c17d48e87830e814864a09ebb4a5a4bca0e7790ec, destination=/tmp/.X11-unix, driver=local, propagation=, read/write=true) 2020-06-07T20:34:05.756569562Z container start 5ea8cf55cff7f42218feda7c17d48e87830e814864a09ebb4a5a4bca0e7790ec (image=docker-osx-vnc:latest, name=sad_bassi) anders.cedronius@example-nested-vm:~/docker/Docker-OSX/vnc-version$ 2020-06-07T20:34:09.054319158Z container die 5ea8cf55cff7f42218feda7c17d48e87830e814864a09ebb4a5a4bca0e7790ec (exitCode=1, image=docker-osx-vnc:latest, name=sad_bassi) 2020-06-07T20:34:09.181568287Z network disconnect 68139c83c2af3605d2ee76d860b920195aaedd7440d3f8c2809fa4d9d1005c17 (container=5ea8cf55cff7f42218feda7c17d48e87830e814864a09ebb4a5a4bca0e7790ec, name=bridge, type=bridge) 2020-06-07T20:34:09.195693750Z volume unmount 109397d57e9b1d2e8fcf295c0d73f11b94e0c79afa4b6459abe1ca22f4ee80b8 (container=5ea8cf55cff7f42218feda7c17d48e87830e814864a09ebb4a5a4bca0e7790ec, driver=local)So for me it never starts running.
Machine info ->
@sickcodes commented on GitHub (Jun 8, 2020):
If neither of those commands work, you have to turn on nested virt first:
See https://docs.fedoraproject.org/en-US/quick-docs/using-nested-virtualization-in-kvm/
Not all providers allow nested virt, but you can easily find VPS with nested virt turned on, Digital Ocean does.
Have to have KVM, which you have, as well as nested virt, which you can turn on using modprobe.
@sickcodes commented on GitHub (Jun 8, 2020):
Can you show some more output @romancin?
You got into the QEMU shell so it’s running.
Are you sure you’re running the correct docker run?
Which OS?
@andersc commented on GitHub (Jun 8, 2020):
never mind.. got it working!!
I run that on a 4-core skylake in GCP-Amsterdam. (Ubuntu 18.04)
@sickcodes commented on GitHub (Jun 8, 2020):
@andersc Perfect!
Any tips I can should to the readme?
@romancin commented on GitHub (Jun 8, 2020):
Hi! Finally got it working! Thank you!
It seems that sometimes VNC server is not closed correctly and didn't work when restarting container... Deleted container and in the first run it works fine.
I can see this in the log:
Warning: 29524081a705:99 is taken because of /tmp/.X99-lock
Remove this file if there is no X server 29524081a705:99
A VNC server is already running as :99
Unable to init server: Could not connect: Connection refused
QEMU 5.0.0 monitor - type 'help' for more information
@andersc commented on GitHub (Jun 8, 2020):
@sickcodes, yes. Will write a script getting the machine up and running. Give me some time. BTW.. Great work!
@sickcodes commented on GitHub (Jun 8, 2020):
Thanks for sending that through!
Perhaps I should add remove the file lock.
The container should never two VNC servers running anyway given PID 1 only starts once ever. I will review what I just wrote when I make that change.
@andersc commented on GitHub (Jun 8, 2020):
OK.. There is unnecessary installs and parts of the script.. Will shave off the stuff I detect when I get the time. Also modify the stuff you see..
The following steps will create a plain vanilla Ubuntu18.04 GCP-VM and installs and run all parts to get a VNC connection to your osx-docker image.
sudo docker run -p 8888:5999 -d --privileged docker-osx-vnc:latestAs I said.. just made this up quite fast pulling together the history from my last runs.. So there is room for improvement.
@sickcodes commented on GitHub (Jun 8, 2020):
@andersc fantastic work and thanks for uploading your input! Can I add some of it to the readme?
@andersc commented on GitHub (Jun 9, 2020):
@sickcodes sure.. However the scripts are rough and installs more than you need.. I'm not sure the reboot is needed and so on.. I'll put some time cleaning stuff up that I find later today. But YES.. Use whatever you want you feel benefit your project.
Then since I got your attention, what would be your recommended way of starting the vnc version with 8GB (or more) RAM, and is there a way you know getting osx-docker to benefit from a monster VM with for example 32CPU's?, When I run the container on a skylake (VM) it register core 2 duo CPUs inside OSX.
@matusnovak commented on GitHub (Jun 10, 2020):
I was having this same issue. I am running the VNC version as:
No issue there unless I stop and start the container again:
Then it fails with
gtk initialization failedwhen qemu tries to start. The problem is that thevncservercommand inOpenCore-Boot_custom.shfails with (but does not terminate the bash script):I have found a workaround for it. Adding this before
vncservercommand seems to fix it:@sickcodes commented on GitHub (Jun 14, 2020):
Hey Anders, yes I am adding RAM and CPU cores, socket arguments in the next version!
Regarding the reboot, I believe you should reboot to ensure qemu/kvm kernel module loads correctly.
@sickcodes commented on GitHub (Jun 14, 2020):
Finished adding CPU/SMP cores as args, and SSH for headless mode.
True headless mode, you might like to look at xdotool.