1
0
mirror of https://github.com/foxlet/macOS-Simple-KVM.git synced 2024-06-26 16:38:38 +02:00

[DOCS] Update docs.

This commit is contained in:
Foxlet 2019-04-30 17:48:10 -04:00
parent 9a4fce6739
commit 55064e7a98
4 changed files with 43 additions and 7 deletions

View File

@ -1,13 +1,13 @@
# macOS-Simple-KVM
Documentation to set up a simple Q35 VM based in QEMU, accelerated by KVM.
Documentation to set up a simple macOS VM in QEMU, accelerated by KVM.
Better instructions will be available in the future, but for now, here's how to get started:
Here's how to get started:
## Dependencies
You need to have `qemu`, `python` and the KVM extensions installed for this project.
You'll need a Linux system with `qemu`, `python` and the KVM extensions installed for this project. A Mac is **not** required.
## Step 1
Run `jumpstart.sh` to get some basic installation media for macOS.
Run `jumpstart.sh` to fetch installation media for macOS (internet required). The default installation uses High Sierra.
## Step 2
Create an empty hard disk using `qemu-img`
@ -24,4 +24,7 @@ and add it to the end of `basic.sh`
Then run `basic.sh` to start the machine and install macOS.
## Step 3
Look at the `docs` folder for more information on adding passthrough hardware, set up tunnel networking, and enable sound features.
You're done!
Look in the `docs` folder for more information on adding passthrough hardware (for GPU graphics), set up bridged networking, and enabling sound features.

View File

@ -44,3 +44,10 @@ nmcli connection add type tun \
nmcli connection mod mytap connection.slave-type bridge \
connection.master br1
```
## Attach Bridge to QEMU
Once you have set up the bridge and tun/tap on the host, you'll have to add the following line to `basic.sh`, replacing `-netdev user,id=net0`. Change `tap0` to your corresponding device name.
```
-netdev tap,id=net0,ifname=tap0,script=no,downscript=no \
```

View File

@ -40,6 +40,8 @@ To do this permanently, you can add it to your bootloader. If you're using GRUB,
## Attach card to QEMU
You will need to attach the cards using the BDF IDs for the audio and video controller. The following example shows the config for a card with two devices. The romfile parameter is optional.
**Note:** You may need to run `basic.sh` as sudo for the card to work.
```
-vga none \
-device ioh3420,bus=pcie.0,multifunction=on,port=1,chassis=1,id=port.1 \

24
docs/guide-performance.md Normal file
View File

@ -0,0 +1,24 @@
Guide to Performance Tuning
===========================
The default macOS VM configuration (`basic.sh`) assumes some sane defaults, however this may not reflect the actual topology or peformance capabilities of the underlaying machine.
Here's some tunable parameters to get the most of out QEMU:
## Memory
The following line controls memory allocation. The default is 2GB of RAM.
Increase this as needed (limited to the real amount of memory in your machine).
```
-m 2G \
```
## Cores
The default configuration enables 4 threads, each with 2 cores.
```
-smp 4,cores=2 \
```
The following example describes all possible topology configurations:
```
-smp cores=4,threads=4,sockets=1 \
```