Skip to content

Commit

Permalink
DarwinKVM Docs Base Guide finished!
Browse files Browse the repository at this point in the history
  • Loading branch information
royalgraphx committed Jun 26, 2023
1 parent ce96314 commit 09b5c5c
Show file tree
Hide file tree
Showing 10 changed files with 381 additions and 8 deletions.
25 changes: 24 additions & 1 deletion docs/docs/06-InstallingmacOS/00-ImportingXML.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,27 @@ layout: default
title: Part 0 - Importing XML
parent: Installing macOS
nav_order: 1
---
---

# Importing XML
#### This imports a blank Virtual Machine titled "DarwinKVM" ready to be used for macOS Guests.

Run the following command in the root directory of DarwinKVM:

``virsh --connect qemu:///system define DarwinKVM.xml``

Which will now allow you to view it in Virt-Manager.

<p align="center">
<img src="../../assets/VManTemplateImport.png">
</p>

Notice this template is missing a few things you must set up.

- Has no default Display
- Has no drives configured
- Has no NIC configured

Let's go through these steps quickly.

## You can now continue to the next <a href="01-ConfigDisplay.html">page</a>.
19 changes: 18 additions & 1 deletion docs/docs/06-InstallingmacOS/01-ConfigDisplay.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,21 @@ layout: default
title: Part 1 - Configure Display for recoveryOS
parent: Installing macOS
nav_order: 2
---
---

# Configuring Virtio Display
#### This is required to have a display.

Select the "Add Hardware" button and navigate to Graphics. Select the ``Listen Type:`` to None. then select the "Finish" button.

<p align="center">
<img src="../../assets/VManAddRecoveryDisplay1.png">
</p>

Select the Video tab on the left-hand side, and choose the ``Virtio`` model.

<p align="center">
<img src="../../assets/VManAddRecoveryDisplay2.png">
</p>

## You can now continue to the next <a href="02-ConfigDrives.html">page</a>.
36 changes: 35 additions & 1 deletion docs/docs/06-InstallingmacOS/02-ConfigDrives.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,38 @@ layout: default
title: Part 2 - Configure Storage Drives
parent: Installing macOS
nav_order: 3
---
---

# Configure VirtIO Drives
#### This is required to boot OpenCore.

## Adding OpenCore Drive

Select the "Add Hardware" button to bring up the Storage prompt. Select the OpenCore image via the "Manage..." button. The ``Bus type:`` should be set to VirtIO. Cache mode set to none, and Discard mode is set to unmap.

<p align="center">
<img src="../../assets/VManAddVirtIOInstallation2.png">
</p>


<p align="center">
<img src="../../assets/VManAddOpenCore1.png">
</p>

Don't forget to set it as your boot drive.

<p align="center">
<img src="../../assets/VManAddOpenCore2.png">
</p>

## Creating a Virtual SSD for installation

If you're not going to passthrough an NVME drive to install macOS on, then this is the step to make a disk image. You can choose any size you'd like but I suggest the standard 128G, 256GB, 500GB, 1000GB.

Here you can see me creating the disk image I'll be installing macOS on.

<p align="center">
<img src="../../assets/VManAddVirtIOInstallation.png">
</p>

## You can now continue to the next <a href="03-ConfigNIC.html">page</a>.
19 changes: 18 additions & 1 deletion docs/docs/06-InstallingmacOS/03-ConfigNIC.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,21 @@ layout: default
title: Part 3 - Configure NIC for Virtual Machine
parent: Installing macOS
nav_order: 4
---
---

# Configure Virtual Machine NIC
#### This is required to download macOS via RecoveryOS, as well as will be the general ethernet connection in the Virtual Machine.

## Using the Bridge Interface

Select the "Add Hardware" button and choose the Network category on the left-hand side. You can now see your network source can be set to Bridge device. The device name given by the script is ``br0``. Of course don't forget to set the Device model as ``VirtIO``.

<p align="center">
<img src="../../assets/VManAddBridgeNIC.png">
</p>

## Using the Default Network

If you didn't choose to set up a Bridge Interface, you can still use the regular NAT type default network created by libvirt in your Virtual Machine! Follow the same steps but select the defaults.

## You can now continue to the next <a href="04-Review.html">page</a>.
11 changes: 10 additions & 1 deletion docs/docs/06-InstallingmacOS/04-Review.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,13 @@ layout: default
title: Part 4 - Finished Example
parent: Installing macOS
nav_order: 5
---
---

# Review
#### Notice the display, drives, and NIC added.

<p align="center">
<img src="../../assets/VManExampleReadyToInstall.png">
</p>

## You can now continue to the next <a href="05-Installation.html">page</a>.
83 changes: 83 additions & 0 deletions docs/docs/06-InstallingmacOS/05-Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,87 @@ parent: Installing macOS
nav_order: 6
---

# Installing macOS via recoveryOS
#### You should now be ready to install macOS!

OpenCore Menu, shows RecoveryOS detected.

<p align="center">
<img src="../../assets/OpenCoreVMBootRecovery.png">
</p>

macOS Ventura RecoveryOS booting

<p align="center">
<img src="../../assets/BootingRecovery.png">
</p>

macOS Ventura Disk Utility showing OpenCore drive.

<p align="center">
<img src="../../assets/macOSRecoveryDiskUtility.png">
</p>

{: .highlight }
From here on out, the screenshots will show macOS Sonoma because I had the USB prepared nearby and wanted to test everything working still even in Sonoma. This won't make a difference for you, it's the same for macOS Ventura.

<p align="center">
<img src="../../assets/OpenCoreSonomaRecoveryBoot.png">
</p>

Open Disk Utility, and format the target drive to APFS.

<p align="center">
<img src="../../assets/macOSRecoveryFormatInstallTarget.png">
</p>

<p align="center">
<img src="../../assets/macOSRecoveryFormatInstallTarget2.png">
</p>

<p align="center">
<img src="../../assets/macOSRecoveryFormatInstallTarget3.png">
</p>

You are now ready to proceed to the installation!

<p align="center">
<img src="../../assets/OpenCoreSonomaRecoveryInstallation1.png">
</p>

<p align="center">
<img src="../../assets/OpenCoreSonomaRecoveryInstallation2.png">
</p>

Second Boot Phase

<p align="center">
<img src="../../assets/OpenCoreSonomaSecondBootPhase.png">
</p>

Third Boot Phase, further unpacking.

<p align="center">
<img src="../../assets/OpenCoreSonomaThirdBootPhase.png">
</p>

{: .note }
You may get a fourth reboot, if not, eventually, you will the proper name of your drive:

<p align="center">
<img src="../../assets/OpenCoreSonomaInstallationComplete.png">
</p>

Here we are at the desktop of our Virtual Machine.

<p align="center">
<img src="../../assets/macOSSonomaDesktop.png">
</p>

Our OpenCore image is mounted easily and recognized by macOS. Allowing easy modification within and out of the Virtual Machine. Any changes made here, can easily be viewed by mounting on the host. This can be useful for moving small files.

<p align="center">
<img src="../../assets/macOSSonomaNoMountEFIneeded.png">
</p>

<h1>You can now proceed to the <a href="../07-SingleGPUPassthrough/">Single GPU Passthrough</a> section! You can also follow the <a href="../08-DualGPUPassthrough/">Dual GPU Passthrough</a> section.</h1>
9 changes: 8 additions & 1 deletion docs/docs/06-InstallingmacOS/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,11 @@ has_children: true

<p align="center">
<img width="650" height="200" src="../../assets/HeaderInstallingmacOS.png">
</p>
</p>

# Installing macOS via recoveryOS

{: .note }
This example will show the installation of macOS Sonoma. This applies for Monterey and Ventura as well, you can follow it just the same.

## You can now continue to the next <a href="00-ImportingXML.html">page</a>.
43 changes: 42 additions & 1 deletion docs/docs/07-SingleGPUPassthrough/01-Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,45 @@ layout: default
title: Part 1 - Script Installation
parent: Single GPU Passthrough
nav_order: 1
---
---

# Installation of Scripts
#### Script Installation thanks to RisingPrism!

{: .important }
If the <a href="">RisingPrism</a> scripts do not work, use the <a href="">akshaycodes</a> scripts instead.

We'll start by doing a ``git clone`` command to fetch the scripts.

``git clone https://gitlab.com/risingprismtv/single-gpu-passthrough.git``

In the newly created single-gpu-passthrough folder, run the installation as root:

``sudo chmod +x install_hooks.sh``

``sudo ./install_hooks.sh``

Verify that the files are installed correctly. You should have files in the following location:

```
/etc/systemd/system/[email protected]
/bin/vfio-startup.sh
/bin/vfio-teardown.sh
/etc/libvirt/hooks/qemu
```

Because we previously set logs to output, you can find them here:

```
DarwinKVM.log => /var/log/libvirt/qemu
custom_hooks.log => /var/log/libvirt/
libvirtd.log => /var/log/libvirt/
```

But if the RisingPrism scripts aren't working well for you and you end up using akshaycodes, you can find the logs at:

```
custom_hooks.log => /var/tmp/vfio-script.log
```

## You can now continue to the next <a href="02-HookModification.html">page</a>.
19 changes: 18 additions & 1 deletion docs/docs/07-SingleGPUPassthrough/02-HookModification.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,21 @@ layout: default
title: Part 2 - Hook Modification
parent: Single GPU Passthrough
nav_order: 2
---
---

# Hook Modification
#### Use your favorite terminal text editor!

Modify the following file to add `` $OBJECT == "DarwinKVM" `` to the if statement. This will allow the hook to now pay attention to the DarwinKVM Virtual Machine. If for any reason you need to use the Virtual Machine without GPU passthrough, you should remove this modification to allow proper usage of the VirtIO Display when not doing passthrough willingly or for debugging reasons.

```
sudo nano /etc/libvirt/hooks/qemu
```

Example modified file:

<p align="center">
<img src="../../assets/QEMUHookModification.png">
</p>

## You can now continue to the next <a href="03-VManUpdate.html">page</a>.
Loading

0 comments on commit 09b5c5c

Please sign in to comment.