dashtripledot Posted October 15, 2018 Share Posted October 15, 2018 Hi All. I have successful followed @SpaceInvaderOne's videos, and built my self a kvm mac os machine. Now that i have the mac running is their any way to get docker for mac running? I would like to be able to develop websites, and other programs using a local docker installation. But when i try to install Docker for Mac, an error comes up saying that CPU virtualization and Hyper Visor support is needed. After trying every search term and combination of them, i find that this line might the the cause: <qemu:arg value='Penryn,vendor=GenuineIntel,kvm=on,+invtsc,vmware-cpuid-freq=on,'/> In this video, @SpaceInvaderOne mentions that the Penryn cpu does not support vt-x. now that the video is 1.5 years old, is their any way to change the cpu and still have osx work? Am I even looking in the right direction? Quote Link to comment
SpaceInvaderOne Posted October 15, 2018 Share Posted October 15, 2018 Hi @dashtripledot yes you "should" be able to do this using penryn bu adding the needed features? first, you will have to make sure nested virtualisation is enabled on the Unraid server. I believe it is enabled in the latest Unraid by default. Older versions I am not sure You can check by running for AMD cpus cat /sys/module/kvm_amd/parameters/nested for intel cat /sys/module/kvm_amd/parameters/nested If you get a zero its disabled and if you get a 1 then its enabled If you get a zero then you can enable by unloading the module (also make sure all vms shutdown first) amd modprobe -r kvm_amd or intel modprobe -r kvm_intel then running amd modprobe kvm_amd nested=1 or intel modprobe kvm_intel nested=1 ------------------------------------------ Then you will have to pass through these CPU features to the XML line that you quoted - vmx and rdtscp so that line would look like <qemu:arg value='Penryn,vendor=GenuineIntel,kvm=on,vmx,rdtscp,+invtsc,vmware-cpuid-freq=on,'/> You can add any features to the cpu that the host has in this line to improve the cpu in the MacOS guest. This will improve the performance <qemu:arg value='Penryn,vendor=GenuineIntel,kvm=on,vmx,rdtscp,+invtsc,+avx,+avx2,+aes,+xsave,+xsaveopt,+ssse3,+sse4_2,+popcnt,vmware-cpuid-freq=on,'/> So either of the 2 above should make docker work in the MacOS vm. I 2 Quote Link to comment
dashtripledot Posted October 16, 2018 Author Share Posted October 16, 2018 thanks for the reply. after using the following line: <qemu:arg value='Penryn,vendor=GenuineIntel,kvm=on,vmx,rdtscp,+invtsc,+avx,+avx2,+aes,+xsave,+xsaveopt,+ssse3,+sse4_2,+popcnt,vmware-cpuid-freq=on,'/> "sysctl kern.hv_support" still returns 0. for docker to work it should return 1. (following this page) could this be a clover config problem? I am running an amd fx 8350, if that helps. Is there a list of the cpu features that can be passes through? Quote Link to comment
SpaceInvaderOne Posted October 16, 2018 Share Posted October 16, 2018 Um did a bit of testing tonight. Not good news for us AMD guys. Forgot that AMD virtualisation is svm not vmx. So svm would need to be passed on amd cpus for that to work However, running sysctl machdep.cpu.features on osx it doesnt show svm as present. Strange as if i do the same on a debian vm then run cat /proc/cpuinfo I can see svm passed even through I am running that vm also with emulated penryn same as my osx vm Thing is I dont think that docker will ever work on a vm hackintosh using an AMD cpu. I think it will always look for vmx (not svm) because apple never thinks an AMD cpu and thus SVM will be present. So it will fail and not load complaining about the cpu. I dont have any intel hardware here to test with to see if docker would work on an intel based vm hackintosh with vmx & rdtscp passed. I think it should. Maybe @1812 , please if you have time could you on your intel vm hack try using <qemu:arg value='Penryn,vendor=GenuineIntel,kvm=on,vmx,rdtscp,+invtsc,vmware-cpuid-freq=on,'/> then run sysctl machdep.cpu.features and see if vmx is listed. Then if so check sysctl kern.hv_support and see if you get a 1. If so does docker work on osx? Quote Link to comment
dashtripledot Posted October 16, 2018 Author Share Posted October 16, 2018 Thanks for doing these tests. Though it does still suck that this will not work. Quote Link to comment
1812 Posted October 17, 2018 Share Posted October 17, 2018 23 hours ago, SpaceInvaderOne said: Maybe @1812 , please if you have time could you on your intel vm hack try using <qemu:arg value='Penryn,vendor=GenuineIntel,kvm=on,vmx,rdtscp,+invtsc,vmware-cpuid-freq=on,'/> then run sysctl machdep.cpu.features and see if vmx is listed. Then if so check sysctl kern.hv_support and see if you get a 1. If so does docker work on osx? using Intel® Xeon® CPU E5-1660 v2 @ 3.70GHz <qemu:arg value='Penryn,vendor=GenuineIntel,kvm=on,vmx,rdtscp,+invtsc,+avx,+aes,+xsave,xsaveopt,vmware-cpuid-freq=on,'/> for sysctl machdep.cpu.features shows sysctl machdep.cpu.features machdep.cpu.features: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH MMX FXSR SSE SSE2 SSE3 SSSE3 CX16 SSE4.1 x2APIC AES VMM XSAVE OSXSAVE AVX1.0 no vmx, but still ran the second command, sysctl kern.hv_support kern.hv_support: 0 I did not test to see if docker would run regardless, I may look into it, but it will be next week, (work is super busy for the next 5 days.) Quote Link to comment
Daniel Ehrhardt Posted April 25, 2020 Share Posted April 25, 2020 Are you able to find a Solution. I have the Same Issue currently. Quote Link to comment
dashtripledot Posted April 25, 2020 Author Share Posted April 25, 2020 No sorry. I ended up running a Linux VM, installing docker on that and sshing into it. It works well unless you need something to run on localhost, in which case you have to set up ssh tunnels to the Linux machine. Quote Link to comment
ghost82 Posted April 26, 2020 Share Posted April 26, 2020 Read from here: It should work on our mac os vm. Quote Link to comment
frakman1 Posted September 13, 2020 Share Posted September 13, 2020 (edited) I followed the MacInABox video and created my Mojave VM that way. However, I have the same problem as the OP with not being able to get Docker to run in the VM. I tried enabling Virtualization (from this post) in UnRaid using the boot config parameter kvm-intel.nested=1 and adding this to the VM's xml file under <cpu> <feature policy='require' name='vmx'/> but couldn't get it to work. My Settings: UNRAID: 6.8.3 CPU: Intel® Xeon® CPU E5-2630 v2 @2.60GHz UNRAID kvm_intel setting # cat /sys/module/kvm_intel/parameters/nested Y UNRAID Syslinux configuration: kernel /bzimage append vfio-pci.ids=1b73:1100 kvm-intel.nested=1 initrd=/bzroot MojaveVM XML setting: <cpu mode='custom' match='exact' check='none'> <model fallback='forbid'>qemu64</model> <feature policy='require' name='vmx'/> </cpu> <qemu:arg value='Penryn,vendor=GenuineIntel,kvm=on,vmx,rdtscp,+invtsc,+avx,+avx2,+aes,+xsave,+xsaveopt,+ssse3,+sse4_2,+popcnt,vmware-cpuid-freq=on,'/> Mojave VM: (note that VMX is enabled but hv_support is still 0) $ sysctl machdep.cpu.features machdep.cpu.features: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH MMX FXSR SSE SSE2 SSE3 VMX SSSE3 CX16 SSE4.1 SSE4.2 x2APIC POPCNT AES VMM XSAVE OSXSAVE AVX1.0 $ sysctl kern.hv_support kern.hv_support: 0 I don't know what else to do. I thought this should work since my host is an Intel CPU. Edited September 13, 2020 by frakman1 Quote Link to comment
ghost82 Posted September 13, 2020 Share Posted September 13, 2020 (edited) It shouldn't work with custom arg Penryn. You need to passthrough your Intel cpu. Here and some posts below some more info, also explaining why Penryn doesn't work (ps: amd is not working with nested virtualization): Btw, in syslinux it's kvm_intel.nested=1 not kvm-intel.nested=1 Edited September 13, 2020 by ghost82 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.