Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question]: How can i run with more than one CPU core instead of just 1 core on Linux with and AMD processor? #61

Open
2 tasks done
Santosl2 opened this issue Aug 14, 2024 · 9 comments
Labels
question Further information is requested

Comments

@Santosl2
Copy link

Santosl2 commented Aug 14, 2024

Is your question not already answered in the FAQ?

  • I made sure the question is not listed in the FAQ.

Is this a general question and not a technical issue?

  • I am sure my question is not about a technical issue.

Question

So i'm trying run on Linux, my PC config is:

  • AMD Ryzen 7 5800H
  • GPU RTX 3050 4GB
  • 32GB RAM

However, when i try to use more than one CPU core, macOS doesn't boot and gets stuck on this screen:

image

When i change CPU_CORES to ONE works fine

My docker.compose.yml

services:
  macos:
    image: dockurr/macos
    container_name: macos
    environment:
      DISK_SIZE: "64G"
      RAM_SIZE: "8G"
      CPU_CORES: "4"
      DEBUG: "yes"
      VERSION: "sonoma"
    devices:
      - /dev/kvm
    cap_add:
      - NET_ADMIN
      
    ports:
      - 8006:8006
      - 5900:5900/tcp
      - 5900:5900/udp
    stop_grace_period: 2m
    volumes:
    - ~/santosl2c/Documents/Macos/volumes/mac/shared:/shared
    - ~/santosl2c/Documents/Macos/volumes/mac/storage:/storage
@Santosl2 Santosl2 added the question Further information is requested label Aug 14, 2024
@SoNotMC
Copy link

SoNotMC commented Aug 16, 2024

I get this same issue, however, I have never managed to get this to boot even with default docker compose.

@Santosl2
Copy link
Author

up

@jeffmo
Copy link

jeffmo commented Sep 16, 2024

For what it's worth I'm able to see more than 1 CPU core on my end (at least, according to "System Report" within Sonoma):

System Report
Screenshot 2024-09-15 at 9 49 25 PM

"About This Mac"
Screenshot 2024-09-15 at 9 59 50 PM

Host system

  • CPU: AMD Ryzen 9 5950X 16-Core
  • Mem: 64G
  • OS: Ubuntu 22.04.4 LTS

Docker Compose Config

    image: dockurr/macos
    cap_add:
      - NET_ADMIN
    devices:
      - /dev/kvm
    environment:
      CPU_CORES: "16"
      RAM_SIZE: "8G"
      VERSION: "sonoma"
    ports:
      - 8006:8006
    restart: unless-stopped
    stop_grace_period: 2m
    volumes:
      - type: bind
        source: /data/osx-storage
        target: /storage

@Santosl2
Copy link
Author

Santosl2 commented Sep 16, 2024

For what it's worth I'm able to see more than 1 CPU core on my end (at least, according to "System Report" within Sonoma):

System Report Screenshot 2024-09-15 at 9 49 25 PM

"About This Mac" Screenshot 2024-09-15 at 9 59 50 PM

Host system

  • CPU: AMD Ryzen 9 5950X 16-Core
  • Mem: 64G
  • OS: Ubuntu 22.04.4 LTS

Docker Compose Config

    image: dockurr/macos
    cap_add:
      - NET_ADMIN
    devices:
      - /dev/kvm
    environment:
      CPU_CORES: "16"
      RAM_SIZE: "8G"
      VERSION: "sonoma"
    ports:
      - 8006:8006
    restart: unless-stopped
    stop_grace_period: 2m
    volumes:
      - type: bind
        source: /data/osx-storage
        target: /storage

Didn't work here... I got the same error:
image

@kroese
Copy link
Contributor

kroese commented Oct 12, 2024

Are you using nested virtualization by any chance?

@Santosl2
Copy link
Author

Are you using nested virtualization by any chance?

How can i check this?

@kroese
Copy link
Contributor

kroese commented Oct 16, 2024

@Santosl2 If you are running your OS (and the container) inside a Virtual Machine or bare metal.

@Santosl2
Copy link
Author

@Santosl2 If you are running your OS (and the container) inside a Virtual Machine or bare metal.

Ooo, no

@esoternic89
Copy link

esoternic89 commented Nov 13, 2024

i've found that it's all about clock sources. For me (Ryzen 5 4500u), it's only TSC that works. nested virtualization with kvm clocksource or other sources like HPET does not work.

If anyone wondering, you can check your clock source using
cat /sys/devices/system/clocksource/clocksource0/current_clocksource

Manually switching to TSC with grub's setting GRUB_CMDLINE_LINUX="tsc=reliable clocksource=tsc" fixed multiple cores issue for me. It was HPET before thou. And be careful with boot settings!

Keep in mind that it won't work in nested virtualization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants