mirror of
https://github.com/foxlet/macOS-Simple-KVM
synced 2024-11-24 20:23:05 +00:00
[DOCS] Update docs.
This commit is contained in:
parent
9a4fce6739
commit
55064e7a98
4 changed files with 43 additions and 7 deletions
15
README.md
15
README.md
|
@ -1,15 +1,15 @@
|
|||
# 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
|
||||
## Step 2
|
||||
Create an empty hard disk using `qemu-img`
|
||||
```
|
||||
qemu-img create -f qcow2 MyDisk.qcow2 64G
|
||||
|
@ -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.
|
||||
|
|
|
@ -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 \
|
||||
```
|
||||
|
|
|
@ -38,7 +38,9 @@ iommu=pt intel_iommu=on vfio-pci.ids=1002:66af,1002:ab20
|
|||
To do this permanently, you can add it to your bootloader. If you're using GRUB, for example, edit `/etc/default/grub` and add the previous lines to the `GRUB_CMDLINE_LINUX_DEFAULT` section, then run `sudo update-grub` and reboot.
|
||||
|
||||
## 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.
|
||||
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 \
|
||||
|
|
24
docs/guide-performance.md
Normal file
24
docs/guide-performance.md
Normal 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 \
|
||||
```
|
Loading…
Reference in a new issue