Skip to content

Instantly share code, notes, and snippets.

@slykar
Last active March 26, 2024 18:52
Show Gist options
  • Save slykar/e92732be9bf81a71e08068245656d70e to your computer and use it in GitHub Desktop.
Save slykar/e92732be9bf81a71e08068245656d70e to your computer and use it in GitHub Desktop.
Docker and Docker Compose on AMD OSX Hackintosh via Docker Machine

Introduction

Docker.app will complain about incompatible processor, so we will use Docker Machine.

Instalation

Download Docker for Mac (Docker.app). It contains some binaries that are necessary.

brew install virtualbox docker-machine

# Normally, those links are created automatically by running Docker.app,
# but it quits on us too early, so we need to do this manually
ln -s "/Applications/Docker.app/Contents//Resources/bin/docker-compose" /usr/local/bin/docker-compose
ln -s "/Applications/Docker.app/Contents//Resources/bin/docker-credential-desktop" /usr/local/bin/docker-credential-desktop
ln -s "/Applications/Docker.app/Contents//Resources/bin/docker-credential-osxkeychain" /usr/local/bin/docker-credential-osxkeychain

You can also use brew to install docker and doccker-compose and it should work without linking above.

Running

docker-machine create
eval $(docker-machine env)
docker run hello-world
docker-compose up
@ashleyconnor
Copy link

ashleyconnor commented Sep 8, 2020

brew cask install virtualbox instead of brew install virtualbox

Docker was also missing from the path for me:

ln -s "/Applications/Docker.app/Contents//Resources/bin/docker /usr/local/bin/docker

@rodmccutcheon
Copy link

Does anyone have connection issues between docker containers using docker-compose?

I tested running 2 alpine containers with docker run, and I was able to ping each other by container name. But when I try the following docker-compose file I get connection refused:

version: "3.8"
​
services:
​
  zookeeper:
    image: zookeeper:3.4.9
    restart: unless-stopped
    hostname: zookeeper
    container_name: zookeeper
    ports:
      - "2181:2181"
    environment:
      ZOO_MY_ID: 1
      ZOO_PORT: 2181
      ZOO_SERVERS: server.1=zookeeper:2888:3888
    volumes:
      - ./zookeeper/data:/data
      - ./zookeeper/datalog:/datalog
    networks:
      - my_network
​
  kafka:
    image: confluentinc/cp-kafka:5.1.0
    hostname: kafka
    container_name: kafka
    ports:
      - "9092:9092"
      - "29092:29092"
    environment:
      KAFKA_BROKER_ID: 1
      KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
      ALLOW_PLAINTEXT_LISTENER: "yes"
      KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
      KAFKA_LISTENERS: PLAINTEXT://:9092,PLAINTEXT_HOST://:29092
      KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,PLAINTEXT_HOST://localhost:29092
      KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
    volumes:
      - ./kafka/data:/var/lib/kafka/data
    depends_on:
      - zookeeper
    networks:
      - my_network
​
  kafka-connect:
    image: confluentinc/cp-kafka-connect:5.1.0
    hostname: kafka-connect
    container_name: kafka-connect
    ports:
      - "8083:8083"
    environment:
      CONNECT_BOOTSTRAP_SERVERS: "kafka:9092"
      CONNECT_REST_ADVERTISED_HOST_NAME: connect
      CONNECT_REST_PORT: 8083
      CONNECT_GROUP_ID: compose-connect-group
      CONNECT_CONFIG_STORAGE_TOPIC: docker-connect-configs
      CONNECT_OFFSET_STORAGE_TOPIC: docker-connect-offsets
      CONNECT_STATUS_STORAGE_TOPIC: docker-connect-status
      CONNECT_KEY_CONVERTER: org.apache.kafka.connect.json.JsonConverter
      CONNECT_VALUE_CONVERTER: org.apache.kafka.connect.json.JsonConverter
      CONNECT_INTERNAL_KEY_CONVERTER: "org.apache.kafka.connect.json.JsonConverter"
      CONNECT_INTERNAL_VALUE_CONVERTER: "org.apache.kafka.connect.json.JsonConverter"
      CONNECT_CONFIG_STORAGE_REPLICATION_FACTOR: "1"
      CONNECT_OFFSET_STORAGE_REPLICATION_FACTOR: "1"
      CONNECT_STATUS_STORAGE_REPLICATION_FACTOR: "1"
      CONNECT_PLUGIN_PATH: '/usr/share/java,/etc/kafka-connect/jars'
      CONNECT_CONFLUENT_TOPIC_REPLICATION_FACTOR: 1
    volumes:
      - ./kafka-connect/confluentinc-kafka-connect-mqtt-1.2.4/lib:/etc/kafka-connect/jars
    depends_on:
      - zookeeper
      - kafka
      - mosquitto
    networks:
      - my_network
​
  kafdrop:
    image: obsidiandynamics/kafdrop:3.27.0
    restart: "no"
    ports:
      - "9000:9000"
    environment:
      KAFKA_BROKERCONNECT: "kafka:9092"
      JVM_OPTS: "-Xms16M -Xmx48M -Xss180K -XX:-TieredCompilation -XX:+UseStringDeduplication -noverify"
    depends_on:
      - "kafka"
    networks:
      - my_network
​
networks: 
  my_network:
    driver: bridge
kafka            | [main-SendThread(zookeeper:2181)] INFO org.apache.zookeeper.ClientCnxn - Opening socket connection to server zookeeper/172.18.0.2:2181. Will not attempt to authenticate using SASL (unknown error)```

@chikko80
Copy link

chikko80 commented Dec 5, 2020

Hello guys,
docker working perfectly on my hackintosh. But i am facing one problem.
The com.apple.nfs prevents my hackintosh from going into sleepmode.
The 'pmset -g assertions' gives me:
pid 3439(nfsd): [0x0000013e000182e1] 00:03:30 PreventUserIdleSystemSleep named: "com.apple.nfsd"
Is there any workaround for that?
If i unload nfsd the container won't start, so thats not the solution.

@iam4x
Copy link

iam4x commented Dec 8, 2020

None of this worked for me :(

Another approach would be to use dinghy with Virtualbox (https://github.com/codekitchen/dinghy) and create your dinghy docker-machine something like that:

$ dinghy create --provider virtualbox --disk 20000 --cpus 2 --memory 2048

@sergeycherepanov
Copy link

Hi @chikko80
Yes, known issue, your machine can't go to sleep automatically if the NFS daemon runs

@chikko80
Copy link

Hey @sergeycherepanov,
okay i unterstand.
But i am facing another problem with docker on virtualbox. If i start my docker-machine everything works fine - and if i use it consistently it also works fine.
But if its in idle mode for longer than 2-4 minutes, i cant reach the docker-machine and i get a timeout.
Its really annoying because i have to restart the docker-machine every time.

The output if i try to start a docker-compose with different containers:

ERROR: for mongo HTTPSConnectionPool(host='192.168.99.102', port=2376): Read timed out. (read timeout=60)

ERROR: for frontend  HTTPSConnectionPool(host='192.168.99.102', port=2376): Read timed out. (read timeout=60)
ERROR: An HTTP request took too long to complete. Retry with --verbose to obtain debug information.
If you encounter this issue regularly because of slow network conditions, consider setting COMPOSE_HTTP_TIMEOUT to a higher value (current value: 60)

With Verbose stuck on here:

compose.cli.verbose_proxy.proxy_callable: docker containers <- (all=False, filters={'label': ['com.docker.compose.project=docker', 
'com.docker.compose.oneoff=False']})
urllib3.connectionpool._make_request: https://192.168.99.102:2376 "GET /v1.40/containers/json?limit=-1&all=0&size=0&trunc_cmd=0&filters=%7B%22label%22%3A+%5B%22com.docker.compose.project%3Ddocker%22%2C+%22com.docker.compose.oneoff%3DFalse%22%5D%7D HTTP/1.1" 200 3
compose.cli.verbose_proxy.proxy_callable: docker containers -> (list with 0 items)
compose.cli.verbose_proxy.proxy_callable: docker containers <- (all=False, filters={'label': ['com.docker.compose.project=docker', 'com.docker.compose.oneoff=False']})
urllib3.connectionpool._make_request: https://192.168.99.102:2376 "GET /v1.40/containers/json?limit=-1&all=0&size=0&trunc_cmd=0&filters=%7B%22label%22%3A+%5B%22com.docker.compose.project%3Ddocker%22%2C+%22com.docker.compose.oneoff%3DFalse%22%5D%7D HTTP/1.1" 200 3
compose.cli.verbose_proxy.proxy_callable: docker containers -> (list with 0 items)
compose.cli.verbose_proxy.proxy_callable: docker containers <- (all=True, filters={'label': ['com.docker.compose.project=docker', 'com.docker.compose.oneoff=False']})
urllib3.connectionpool._make_request: https://192.168.99.102:2376 "GET /v1.40/containers/json?limit=-1&all=1&size=0&trunc_cmd=0&filters=%7B%22label%22%3A+%5B%22com.docker.compose.project%3Ddocker%22%2C+%22com.docker.compose.oneoff%3DFalse%22%5D%7D HTTP/1.1" 200 None
compose.cli.verbose_proxy.proxy_callable: docker containers -> (list with 5 items)
compose.cli.verbose_proxy.proxy_callable: docker inspect_container <- ('6c9d4eba84ed6827d100a1454ea5a63229b4e0bb43cb365b59f5524208851f42')
ERROR: compose.cli.errors.log_timeout_error: An HTTP request took too long to complete. Retry with --verbose to obtain debug information.
If you encounter this issue regularly because of slow network conditions, consider setting COMPOSE_HTTP_TIMEOUT to a higher value (current value: 60).

@sergeycherepanov
Copy link

sergeycherepanov commented Jan 19, 2021

hi @chikko80
Looks like a VM issue, you need to verify the vm directly in the vbox ui

if its responses to your actions just check the dmesg

@mortensassi
Copy link

@ALL after struggling with this approach and being unhappy i finally decided to install Ubuntu on my System AND then macOS via KVM. Works perfect now and with the help of OVMF you can passthrough your GPU if you need more graphical power!

@ashleyconnor
Copy link

I gave up too. Running Windows 10 with WSL2.

@sergeycherepanov
Copy link

sergeycherepanov commented Jan 24, 2021

@mortensassi Yes, it's a possible workaround. Also, I recommend trying the Proxmox VE with the guides by Nick Sherlock. In this case, you will be able to install docker on the neighbor VM or directly on the host system.

@alexwiedermann
Copy link

alexwiedermann commented Apr 20, 2021

I don't know why... But sometimes docker-machine get a disk corruption when building large images, even after recreate docker-machine the problem still there.
Soo now i use just a Ubuntu on VirtualBox and connect to him using DOCKER_HOST + ssh

Share the host ssh-key with VM, install docker, put user in docker group and add DOCKER_HOST in bash_profile

echo 'export DOCKER_HOST="ssh://user@host"' >> ~/.bash_profile

@jakoritarleite
Copy link

Since docker-machine is deprecated and archived, I recommend using minikube with virtualbox driver instead.

Installing minikube and docker:

brew install minikube docker

Creating the kubernets cluster using the virtualbox driver:

minikube start --driver=virtualbox --keep-context

Configures the Docker CLI in your current shell to use the minikube's docker:

eval $(minikube docker-env)

To use docker-compose just install it via homebrew:

brew install docker-compose

If you want to access a served application on a container (localhost:8080/route), you'll need the minikube IP to access it, using localhost won't work. And to retrieve the IP is just like that:

minikube ip

You can set this IP on /etc/hosts to access applications without typing the IP.

sudo echo "$(minikube ip) minikube" >> /etc/hosts

Now you can use docker without any problems on your Ryzentosh.

@Avi0n
Copy link

Avi0n commented Apr 12, 2022

Since docker-machine is deprecated and archived, I recommend using minikube with virtualbox driver instead...

This worked perfectly for me. Thank you @jakoritarleite!!

@djonko
Copy link

djonko commented May 22, 2022

thanks a lot @jakoritarleite

@jorbs
Copy link

jorbs commented Aug 23, 2022

@jakoritarleite I am getting

docker-compose up
Error response from daemon: Client sent an HTTP request to an HTTPS server.

Any idea why?

@oordnave
Copy link

Dude, THANK YOU! This solves the problem here!

@johnalbert-dot-py
Copy link

I'm getting the error when running the minikube start command:
image

@brorbw
Copy link

brorbw commented Oct 26, 2022

Im running into the same issue as @johnalbert-dot-py. I suspect that virtualbox 7 have some breaking changes.

Edit: As I suspected virtualbox have made some breaking changes by deprecating the host-only network driver.

Here is a VERY hacky fix (hacky because brew does not support installing a specific version)

  1. Uninstall virtualbox
brew uninstall virtualbox
  1. Clone the homebrew-cask repo
git clone https://github.com/Homebrew/homebrew-cask /tmp/homebrew-cask && cd /tmp/homebrew-cask
  1. checkout the version just before the upgrade to virtualbox 7
git checkout aa3c55951fc9d687acce43e5c0338f42c1ddff7b
  1. Install the old version
brew install Casks/virtualbox.rb

Now you just need to force virtualbox to stay at version 6 until the issue is resolved.
Check this link https://apple.stackexchange.com/a/436413
Or add these two lines to your zshrc, bash_profile w/e

export HOMEBREW_NO_AUTO_UPDATE=1
export HOMEBREW_NO_INSTALL_UPGRADE=1

@kareemlukitomo
Copy link

kareemlukitomo commented Nov 20, 2022

Since docker-machine is deprecated and archived, I recommend using minikube with virtualbox driver instead.

Installing minikube and docker:

brew install minikube docker

Creating the kubernets cluster using the virtualbox driver:

minikube start --driver=virtualbox --keep-context

Configures the Docker CLI in your current shell to use the minikube's docker:

eval $(minikube docker-env)

To use docker-compose just install it via homebrew:

brew install docker-compose

If you want to access a served application on a container (localhost:8080/route), you'll need the minikube IP to access it, using localhost won't work. And to retrieve the IP is just like that:

minikube ip

You can set this IP on /etc/hosts to access applications without typing the IP.

sudo echo "$(minikube ip) minikube" >> /etc/hosts

Now you can use docker without any problems on your Ryzentosh.

Following up on this comment: I once tried updating my brew packages (via brew upgrade ) and accidentally upgraded my Virtualbox installation as well to latest version v7.0.4. Then I noticed that my local Docker commands stopped working. It seems that this latest version of Virtualbox deprecates host-only adapter in the networking part of a virtual machine (minikube seem to require this exact networking option); resulting in an error similar to https://gist.github.com/slykar/e92732be9bf81a71e08068245656d70e?permalink_comment_id=4334542#gistcomment-4334542 cc @johnalbert-dot-py

These helped me:

  1. Uninstalled Virtualbox using the VirtualBox_uninstall.cmd tool in the installation DMG
  2. Restarted my mac
  3. Download & install Virtualbox version 6.1.40 (where the host-only adapter is not yet deprecated)
  4. Making sure that in the System Preferences > Security & Privacy we allow Oracle when prompted
  5. Restarted my mac once again
  6. Voila, able to minikube start again and don't forget to eval $(minikube docker-env)

Hope this helps!

Large image

image

@gtrucollo
Copy link

Has anyone tested these settings in Ventura?

@dnartysh
Copy link

dnartysh commented Jan 8, 2023

Has anyone tested these settings in Ventura?

Yes, it works for me on Ventura. But only on version VB 6.1.40. I did it according to the scheme described by @kareemlukitomo

@MuttakinHasib
Copy link

Since docker-machine is deprecated and archived, I recommend using minikube with virtualbox driver instead.

Installing minikube and docker:

brew install minikube docker

Creating the kubernets cluster using the virtualbox driver:

minikube start --driver=virtualbox --keep-context

Configures the Docker CLI in your current shell to use the minikube's docker:

eval $(minikube docker-env)

To use docker-compose just install it via homebrew:

brew install docker-compose

If you want to access a served application on a container (localhost:8080/route), you'll need the minikube IP to access it, using localhost won't work. And to retrieve the IP is just like that:

minikube ip

You can set this IP on /etc/hosts to access applications without typing the IP.

sudo echo "$(minikube ip) minikube" >> /etc/hosts

Now you can use docker without any problems on your Ryzentosh.

Showing this error @kareemlukitomo help me

image

@brorbw
Copy link

brorbw commented Jan 14, 2023

@fsegouin
Copy link

Thanks for all the pointers. Here's what I had to do, as unfortunately in Ventura 13.1, VirtualBox 6.1.40 kexts do not load, which means no luck when creating a host-only network adapter.

In order to fix this, you need to edit your config.plist file and disable kext signing from SIP as indicated at https://caizhiyuan.gitee.io/opencore-install-guide/troubleshooting/extended/post-issues.html#disabling-sip.

After doing so, proceed to reinstall VirtualBox 6.1.40, kexts will now load at startup and should enable minikube to create the host-only network adapter.

@johnalbert-dot-py
Copy link

I still can't make docker run using minikube, I already try @fsegouin solution but still not working (gets the same error about host-only network adapter)

@brorbw
Copy link

brorbw commented Jan 30, 2023

@johnalbert-dot-py can you confirm that you are running a version of VirtualBox that supports the host-only network adapter and that you have Kext Signing disabled.

~ VBoxManage --version
6.1.38r153438

~ csrutil status
System Integrity Protection status: unknown (Custom Configuration).

Configuration:
	Apple Internal: disabled
	Kext Signing: disabled #<--------- ( this on in particular )
	Filesystem Protections: disabled
	Debugging Restrictions: disabled
	DTrace Restrictions: enabled
	NVRAM Protections: enabled
	BaseSystem Verification: enabled

This is an unsupported configuration, likely to break in the future and leave your machine in an unknown state.

@sunkeunchoi
Copy link

sunkeunchoi commented Feb 13, 2023

~VBoxManage --version
6.1.42r155177
~csrutil status
System Integrity Protection status: enabled.

I get following errors.
VBoxManage: error: AMD-V is disabled in the BIOS (or by the host OS) (VERR_SVM_DISABLED)

I also tried
~VBoxManage modifyvm "minikube" --hwvirtex=off --nested-hw-virt=off

@brorbw
Copy link

brorbw commented Feb 13, 2023

@sunkeunchoi you should enable AMD-V in your bios settings if it's not enabled. Refer to the manual for a guide on how to turn it on.

@sunkeunchoi
Copy link

sunkeunchoi commented Feb 13, 2023

Enabling SVM in BIOS setting solved issue
Thank you

@namchuai
Copy link

namchuai commented Feb 26, 2023

Thanks for all the pointers. Here's what I had to do, as unfortunately in Ventura 13.1, VirtualBox 6.1.40 kexts do not load, which means no luck when creating a host-only network adapter.

In order to fix this, you need to edit your config.plist file and disable kext signing from SIP as indicated at https://caizhiyuan.gitee.io/opencore-install-guide/troubleshooting/extended/post-issues.html#disabling-sip.

After doing so, proceed to reinstall VirtualBox 6.1.40, kexts will now load at startup and should enable minikube to create the host-only network adapter.

This works for me. Tested with Ventura 13.2.1 (22D68). Virtual Box 6.1.40. Disabled SIP.
Screenshot 2023-02-26 at 15 33 14

@dheerajv4855
Copy link

dheerajv4855 commented Feb 27, 2023

Dinghy is working for me on my ryzentosh without any issue
https://jetstudy.net/docker/install-docker-in-amd-hackintosh-ryzentosh-system/

@alexoxte
Copy link

Dinghy is working for me on my ryzentosh without any issue https://jetstudy.net/docker/install-docker-in-amd-hackintosh-ryzentosh-system/

I tried it, but always return an error, when run the command to create an vm.

@brorbw
Copy link

brorbw commented Feb 28, 2023

@dheerajv4855 you can also use the official https://github.com/docker/machine for that

@dheerajv4855
Copy link

Dinghy is working for me on my ryzentosh without any issue https://jetstudy.net/docker/install-docker-in-amd-hackintosh-ryzentosh-system/

I tried it, but always return an error, when run the command to create an vm.

Hi,
can you share what error you are getting ?

@alexoxte
Copy link

alexoxte commented Mar 2, 2023

Dinghy is working for me on my ryzentosh without any issue https://jetstudy.net/docker/install-docker-in-amd-hackintosh-ryzentosh-system/

I tried it, but always return an error, when run the command to create an vm.

Hi, can you share what error you are getting ?

image
The solucion is
image
But that option is not showing up. I use Mac Os Ventura

@dheerajv4855
Copy link

Dinghy is working for me on my ryzentosh without any issue https://jetstudy.net/docker/install-docker-in-amd-hackintosh-ryzentosh-system/

I tried it, but always return an error, when run the command to create an vm.

Hi, can you share what error you are getting ?

image The solucion is image But that option is not showing up. I use Mac Os Ventura

you should allow virtualbox from security at time of installation
make sure you are using version 6.1.26
Uninstall and install again virtualbox and see if that works

@dheerajv4855
Copy link

one thing i would like to mention is SIP is disabled in my system
@namchuai has also a working virtualbox in ventura with SIP disabled
maybe that could be a reason

@evenlee
Copy link

evenlee commented Apr 7, 2023

@mam

This works for me. Tested with Ventura 13.2.1 (22D68). Virtual Box 6.1.40. Disabled SIP. Screenshot 2023-02-26 at 15 33 14
@namchuai , were you enable to create an vm and start it with no errors?

@namchuai
Copy link

namchuai commented Apr 7, 2023

@evenlee yes, I can

@evenlee
Copy link

evenlee commented Apr 8, 2023

@evenlee yes, I can

Thanks for confirming, it's wired I cannot run any vm even minikube vm by start button in VM window, but I can use 'minikube start' to start the minikube vm. my value to disable sip is 6F020000(I also tried many values, same result, but this one seems perfect), and i am just upgraded to 13.3 from 12.6.
image

@namchuai
Copy link

namchuai commented Apr 8, 2023

@evenlee sorry, I misunderstood your question. I tried with windows VM but got same error as your.

Edit: I can use Genymotion (which is a VM for Android) normally.

@evenlee
Copy link

evenlee commented Apr 9, 2023

@evenlee sorry, I misunderstood your question. I tried with windows VM but got same error as your.

Edit: I can use Genymotion (which is a VM for Android) normally.

Thanks, it seems i have to stay on Monterey for now, maybe I will upgrade my build to 13900 when I got time to rebuild :).

@brorbw
Copy link

brorbw commented Apr 17, 2023

Let me add that you can now use

brew tap homebrew/cask-versions
brew install --cask virtualbox6

To install the correct version of Virtualbox

@phtmgt
Copy link

phtmgt commented Jul 19, 2023

Thanks for the guide. It works here (ryzentosh Ventura). However, there's an issue with VirtualBox 6.1.40 - it uses double the amount of RAM (e.g., if you allocate 4.0 GB, you can check Activity Monitor where you'll see ~8.0 GB used). The issue is documented here - https://www.virtualbox.org/ticket/19726

Not a deal breaker, but might be problematic for some. An older version - 6.1.2 r135662 - does not have the double memory issue, I am not sure, if it will work in this case. If someone tries it, please share feedback.

@adesheddie
Copy link

@phtmgt @dheerajv4855
Have you guys tried running an android emulator using Virtual Box?

@adesheddie
Copy link

Thanks for the guide. It works here (ryzentosh Ventura). However, there's an issue with VirtualBox 6.1.40 - it uses double the amount of RAM (e.g., if you allocate 4.0 GB, you can check Activity Monitor where you'll see ~8.0 GB used). The issue is documented here - https://www.virtualbox.org/ticket/19726

Not a deal breaker, but might be problematic for some. An older version - 6.1.2 r135662 - does not have the double memory issue, I am not sure, if it will work in this case. If someone tries it, please share feedback.

the double RAM issue is real, and 6.1.2 r135662 doesn't work on Ventura/Sonoma.
So we are stuck with this virtualbox version having double RAM issue.

@phtmgt
Copy link

phtmgt commented Oct 14, 2023

@phtmgt @dheerajv4855
Have you guys tried running an android emulator using Virtual Box?

I have not tried. If you find a way, though, please share, as it would be useful.

@coderpradp
Copy link

coderpradp commented Oct 16, 2023

@johnalbert-dot-py did you manage to work it out? I'm in similar situation as you were.

Disabled KEXT signing in SIP
❯
./csrstat
csrstat v2.0 Copyright (c) 2015-2017 by Pike R. Alpha, 2017-2023 by Joss Brown
System Integrity Protection status: enabled (0x00000003) (Custom Configuration).

Current Configuration:
	Apple Internal                  disabled
	Kext Signing                    disabled
	Debugging Restrictions          enabled
	Filesystem Protections          disabled
	Kernel Debugging Restrictions   enabled
	DTrace Restrictions             enabled
	NVRAM Protections               enabled
	Device Configuration            disabled
	BaseSystem Verification         enabled
	Unapproved Kexts Restrictions   enabled
	Executable Policy               enabled

Boot into Recovery Mode and modify with: 'csrutil enable [arguments]'
<Note: some flags are not accessible using the csrutil CLI.>

This is an unsupported configuration, likely to break in the future and leave your machine in an unknown state.
❯
csrutil status
System Integrity Protection status: unknown (Custom Configuration).

Configuration:
	Apple Internal: disabled
	Kext Signing: disabled
	Filesystem Protections: disabled
	Debugging Restrictions: enabled
	DTrace Restrictions: enabled
	NVRAM Protections: enabled
	BaseSystem Verification: enabled

This is an unsupported configuration, likely to break in the future and leave your machine in an unknown state.
Installed VB 6.1.40
❯
VBoxManage --version
6.1.40r154048

When running minikube start --driver=virtualbox --keep-context I get following error:

❯
minikube start --driver=virtualbox --keep-context
😄  minikube v1.31.2 on Darwin 14.0
✨  Using the virtualbox driver based on user configuration
❗  Due to changes in macOS 13+ minikube doesn't currently support VirtualBox. You can use alternative drivers such as docker or hyperkit.
    https://minikube.sigs.k8s.io/docs/drivers/docker/
    https://minikube.sigs.k8s.io/docs/drivers/hyperkit/

    For more details on the issue see: https://github.com/kubernetes/minikube/issues/15274

👍  Starting control plane node minikube in cluster minikube
🔥  Creating virtualbox VM (CPUs=2, Memory=4000MB, Disk=20000MB) ...
🔥  Deleting "minikube" in virtualbox ...
🤦  StartHost failed, but will try again: creating host: create: creating: Error setting up host only network on machine start: The host-only adapter we just created is not visible. This is a well known VirtualBox bug. You might want to uninstall it and reinstall at least version 5.0.12 that is is supposed to fix this issue
🔥  Creating virtualbox VM (CPUs=2, Memory=4000MB, Disk=20000MB) ...
😿  Failed to start virtualbox VM. Running "minikube delete" may fix it: creating host: create: creating: Error setting up host only network on machine start: The host-only adapter we just created is not visible. This is a well known VirtualBox bug. You might want to uninstall it and reinstall at least version 5.0.12 that is is supposed to fix this issue

❌  Exiting due to IF_VBOX_NOT_VISIBLE: Failed to start host: creating host: create: creating: Error setting up host only network on machine start: The host-only adapter we just created is not visible. This is a well known VirtualBox bug. You might want to uninstall it and reinstall at least version 5.0.12 that is is supposed to fix this issue
💡  Suggestion: Reboot to complete VirtualBox installation, verify that VirtualBox is not blocked by your system, and/or use another hypervisor
📘  Documentation: https://stackoverflow.com/questions/52277019/how-to-fix-vm-issue-with-minikube-start
🍿  Related issues:
    ▪ https://github.com/kubernetes/minikube/issues/3614
    ▪ https://github.com/kubernetes/minikube/issues/4222
    ▪ https://github.com/kubernetes/minikube/issues/5817

@coderpradp
Copy link

I managed to solve this issue by clicking Allow button under Privacy & Security section in Settings after the installation of Virtualbox6 and restarting.

After that minikube start --driver=virtualbox --keep-context without issue

@adesheddie
Copy link

@phtmgt @dheerajv4855
Have you guys tried running an android emulator using Virtual Box?

I have not tried. If you find a way, though, please share, as it would be useful.

I actually managed to install VB6.xxx something version. The performance was at par, really good.
But it was full of bugs, whenever I tried to launch a VM, the host PC would just freeze itself. I had to restart the PC, then launch the VM again, worked fine.
But when I stop the VM, and relaunch, it would freeze the host PC again.

In short, Ryzentosh is really bad for virtualisation.

@namchuai
Copy link

Is there anyone have experience with Sonoma? Does this method still working?

@AlphaNecron
Copy link

Just figured out a way to load VBox@6 kexts on Ventura+ without SIP off. Just reboot to recovery and execute spctl kext-consent add VB5E2TV963, reboot and voila, the kext would be able to load without issues.

@evenlee
Copy link

evenlee commented Jan 6, 2024

@AlphaNecron thanks for the update, i tried from 12.6.8 to 13.6.3, virtual box cannot start correctly, i also tried re-installe virtual box, still no luck, with the settings, were you able to start a windows virtual machine or just linux vm for docker?

@AlphaNecron
Copy link

@AlphaNecron thanks for the update, i tried from 12.6.8 to 13.6.3, virtual box cannot start correctly, i also tried re-installe virtual box, still no luck, with the settings, were you able to start a windows virtual machine or just linux vm for docker?

You must allow the kext manually in Settings > Privacy and Settings, this hack only does disable signature check.

@evenlee
Copy link

evenlee commented Jan 6, 2024

@AlphaNecron thanks for the update, i tried from 12.6.8 to 13.6.3, virtual box cannot start correctly, i also tried re-installe virtual box, still no luck, with the settings, were you able to start a windows virtual machine or just linux vm for docker?

You must allow the kext manually in Settings > Privacy and Settings, this hack only does disable signature check.

hmm, I do allow in the privacy page and did a restart, still cannot run minikube, can you create a windows vm in virtualbox 6 and run it without error?

@AlphaNecron
Copy link

Do kextstat | grep VBox, if VBox kexts are loaded properly, they should be shown there.

@mawanx
Copy link

mawanx commented Jan 12, 2024

Do kextstat | grep VBox, if VBox kexts are loaded properly, they should be shown there.

Is it because apple only allow their own hypervisor, and it's disguised as wrapper within VirtualBox? Also facing this problem (MachineWrap) info thingy when using Virtualbox on ventura, but I'll try to reinstall the older version again...

@AlphaNecron
Copy link

VBox 6 does not use AppleHV under the hood so it should be able to run without issues. Double check whether the kexts are loaded properly though.

@mawanx
Copy link

mawanx commented Jan 12, 2024

@evenlee yes, I can

Thanks for confirming, it's wired I cannot run any vm even minikube vm by start button in VM window, but I can use 'minikube start' to start the minikube vm. my value to disable sip is 6F020000(I also tried many values, same result, but this one seems perfect), and i am just upgraded to 13.3 from 12.6. image

Hi @AlphaNecron, what I'm trying to say is is that I also face this problem, Installed virtualbox 6.1.46a if I'm not mistaken and got error like that...

@AlphaNecron
Copy link

Haven't tested with Windows, minikube runs flawlessly anyways.

@mawanx
Copy link

mawanx commented Jan 12, 2024

Haven't tested with Windows, minikube runs flawlessly anyways.

What macOS version you're on right now?

@AlphaNecron
Copy link

Using Sonoma for the time being, should work on other versions.

@mawanx
Copy link

mawanx commented Jan 12, 2024

Okayy, I'll try again. Thanks for your info

@johnalbert-dot-py
Copy link

Is there any proper alternative for using docker on ryzentosh? (It's been months since the last time I use hacktintosh lol)

@AlphaNecron
Copy link

Is there any proper alternative for using docker on ryzentosh? (It's been months since the last time I use hacktintosh lol)

Wdym by "alternative", another app similar to Docker that works properly on Ryzentosh or something?

@dheerajv4855
Copy link

dheerajv4855 commented Feb 17, 2024 via email

@AlphaNecron
Copy link

do not waste time in making it work in ryzentosh, no alternative will work either use linux for docker and mac for other work with dual boot or switch to intel processor at all

On Sat, Feb 17, 2024 at 2:58 PM Nguyen Thanh Quang @.> wrote: @.* commented on this gist. ------------------------------ Is there any proper alternative for using docker on ryzentosh? (It's been months since the last time I use hacktintosh lol) Wdym by "alternative", another app similar to Docker that works properly on Ryzentosh or something? — Reply to this email directly, view it on GitHub https://gist.github.com/slykar/e92732be9bf81a71e08068245656d70e#gistcomment-4908770 or unsubscribe https://github.com/notifications/unsubscribe-auth/ALSHMCYAZG6SMZNYSVBCBPLYUBZ4JBFKMF2HI4TJMJ2XIZLTSKBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJDHNFZXJJDOMFWWLK3UNBZGKYLEL52HS4DFVRZXKYTKMVRXIX3UPFYGLK2HNFZXIQ3PNVWWK3TUUZ2G64DJMNZZDAVEOR4XAZNEM5UXG5FFOZQWY5LFVEYTAMBQGY4TIMZQU52HE2LHM5SXFJTDOJSWC5DF . You are receiving this email because you commented on the thread. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

Or use another OS, or even host Docker on another machine 👀 Much better.

@AlphaNecron
Copy link

Intel hackintoshes for laptops are retiring, there's absolutely no point in getting 2020 rigs just to install Hackintosh lol. Recent new-gen desktop ones also pose performance issues due to asshole CPU architecture aka "bigLITTLE" as well as lack of proper scheduling driver though. Apple is gonna put an end to x86 MacOS so better forget about Hackintoshing and get a real Mac instead of wasting time on this shit lol.

@evenlee
Copy link

evenlee commented Feb 19, 2024

@johnalbert-dot-py per my experiences, you can stay on 12.0(Monterey) to use virtual box and Minikube, both docker and vm still work on it, or switch to other OS as others suggested, no need to consume any time on a solution as Hacktiontosh is retiring even in intel build. in my M1 Max macbook, I can say the experience is better now as you can use orbstack to run both arm and x64 docker images.

@AlphaNecron
Copy link

@johnalbert-dot-py per my experiences, you can stay on 12.0(Monterey) to use virtual box and Minikube, both docker and vm still work on it, or switch to other OS as others suggested, no need to consume any time on a solution as Hacktiontosh is retiring even in intel build. in my M1 Max macbook, I can say the experience is better now as you can use orbstack to run both arm and x64 docker images.

In fact, you can still use Minikube on Ventura and Sonoma, however, the performance is a bit uhhh as the only provider for Minikube on Ryzentosh is VirtualBox cuz AppleHV is not supported at all lol.

@evenlee
Copy link

evenlee commented Feb 23, 2024

@AlphaNecron can you run windows vm without error on Sonama/Ventura with virtual box 6.x?

@williamcorney
Copy link

@AlphaNecron can you run windows vm without error on Sonama/Ventura with virtual box 6.x?

I am also interested in answer to this . I was not aware there was a way to successfully run virtual box vms on an amd hackintosh due to osx not supporting AMD/SVM. Of course intel works fine as it used vt-d and osx is programmed to work on intel.

I think i might have seen / got working a non svm method of running a virtual machine but performance was poor. Is it this what we are taking about ? Sorry if I don’t use precisely the right technical terms as a these matters are at the limit of my understanding.

@sergeycherepanov
Copy link

I guess Proxmox as host and Macos as guest with a gpu passthrough, currently is the better way to setup ryzentosh. For the docker in this case use separate vm with any linux distro and just mount folder over nfs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment