Skip to content

Commit 47b509d

Browse files
author
vesper
committed
new: 增加win mac os 配置
1 parent 82d4259 commit 47b509d

3 files changed

Lines changed: 76 additions & 0 deletions

File tree

osx/README.MD

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
## command
2+
3+
```bash
4+
sudo apt update && sudo apt install -y qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils
5+
sudo adduser $USER kvm
6+
sudo adduser $USER libvirt
7+
sudo chmod 666 /dev/kvm
8+
qemu-img create -f qcow2 ./data/mac_hdd_ng.img 128G
9+
10+
lsmod | grep kvm
11+
12+
```
13+
14+
在 宿主机(运行 VMware 的那台 Windows 或 Mac) 上修改虚拟机设置。
15+
16+
关闭该 Ubuntu 虚拟机。
17+
18+
进入虚拟机设置:设置 (Settings) -> 处理器 (Processors)。
19+
20+
勾选 “虚拟化 Intel VT-x/EPT 或 AMD-V/RVI” (Virtualize Intel VT-x/EPT or AMD-V/RVI)。
21+
22+
勾选 “虚拟化 CPU 性能计数器” (Virtualize CPU performance counters)。
23+
24+
保存并重新启动 Ubuntu。

osx/docker-compose.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
version: '3'
2+
services:
3+
osx:
4+
container_name: osx
5+
image: sickcodes/docker-osx:latest
6+
privileged: true
7+
restart: always
8+
environment:
9+
- DISPLAY=${DISPLAY:-:0.0}
10+
- GENERATE_UNIQUE=true
11+
- SHORTNAME=sonoma # 选一个,建议 sonoma
12+
# - CPU=Haswell-noTSX
13+
# - CPU=Penryn
14+
- CPU=host
15+
- CPUID_FLAGS=kvm=on,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on
16+
# - EXTRA=-display none -vnc :0
17+
- EXTRA=-display none -vnc :1
18+
# 暂时删掉 MASTER_PLIST_URL,让它用内置模板
19+
# network_mode: "host"
20+
ports:
21+
- "5901:5901"
22+
- "10022:22"
23+
cap_add:
24+
- ALL
25+
devices:
26+
- /dev/kvm
27+
volumes:
28+
- /tmp/.X11-unix:/tmp/.X11-unix
29+
# 只挂载你需要持久化的核心文件
30+
- ./data/BaseSystem.img:/home/arch/OSX-KVM/BaseSystem.img
31+
- ./data/mac_hdd_ng.img:/home/arch/OSX-KVM/mac_hdd_ng.img
32+

windows/docker-compose.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
services:
2+
windows:
3+
image: dockurr/windows:5.14
4+
container_name: windows
5+
environment:
6+
VERSION: "11"
7+
devices:
8+
- /dev/kvm
9+
- /dev/net/tun
10+
cap_add:
11+
- NET_ADMIN
12+
ports:
13+
- 8006:8006
14+
- 3389:3389/tcp
15+
- 3389:3389/udp
16+
volumes:
17+
- ./windows:/storage
18+
restart: always
19+
stop_grace_period: 2m
20+

0 commit comments

Comments
 (0)