Skip to content

Commit 7fc3cac

Browse files
committed
macos13: flesh out clean image process (#3)
1 parent 249f74a commit 7fc3cac

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

README.md

+17-2
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ macOS 13 runner (wip)
147147
To build the base vm, first build a clean image:
148148

149149
- Clone the OSX-KVM repo: `git clone https://github.com/kholia/OSX-KVM.git /var/lib/libvirt/images/OSX-KVM`
150+
- Download the BaseSystem.dmg for macOS Ventura: `( cd /var/lib/libvirt/images/OSX-KVM; ./fetch-macOS-v2.py )`
151+
- Convert it to BaseSystem.img: `dmg2img -i /var/lib/libvirt/images/OSX-KVM/BaseSystem.{dmg,img}`
150152
- Create zvol and libvirt guest with random UUID and MAC address
151153
- `zfs create -V 90G tank/base/servo-macos13.clean`
152154
- `virsh define macos13/guest.xml`
@@ -165,8 +167,14 @@ To build the base vm, first build a clean image:
165167
- Shut down the guest when you see **Select Your Country or Region**: `virsh shutdown servo-macos13.clean`
166168
- Take a snapshot: `zfs snapshot tank/base/servo-macos13.clean@fresh-install`
167169
- Boot base vm guest: `virsh start servo-macos13.clean`
170+
- If latency is high:
171+
- Press **Command**+**Option**+**F5**, then click **Full Keyboard Access**, then press **Enter**
172+
- You can now press **Shift**+**Tab** to get to the buttons at the bottom of the wizard
168173
- **Select Your Country or Region** = United States
169174
- **Migration Assistant** = Not Now
175+
- If latency is high, **Accessibility** > **Cognitive** then:
176+
- > **Reduce Transparency** = Reduce Transparency
177+
- > **Reduce Motion** = Reduce Motion
170178
- **Sign In with Your Apple ID** = Set Up Later
171179
- **Full name** = `servo`
172180
- **Account name** = `servo`
@@ -176,16 +184,23 @@ To build the base vm, first build a clean image:
176184
- Uncheck **Share Mac Analytics with Apple**
177185
- **Screen Time** = Set Up Later
178186
- Quit the **Keyboard Setup Assistant**
187+
- If latency is high:
188+
- Press **Cmd**+**Space**, type `full keyboard access`, turn it on, then press **Cmd**+**Q**
179189
- Once installed, shut down the guest: `virsh shutdown servo-macos13.clean`
180190
- Take another snapshot: `zfs snapshot tank/base/servo-macos13.clean@oobe`
181191
- Start the base guest: `virsh start servo-macos13.clean`
182192
- Log in with the password above
183193
- Press **Cmd**+**Space**, type `full disk access`, press **Enter**
184-
- Click the plus, type the password above, select **Applications** > **Utilities** > **Terminal**
194+
- Click the plus, type the password above, type `/System/Applications/Utilities/Terminal.app`, press **Enter** twice, press **Cmd**+**Q**
185195
- Press **Cmd**+**Space**, type `terminal`, press **Enter**
186-
- Type `curl https://ci0.servo.org/static/macos13.sh | sudo sh` and press **Enter**
196+
- Type `curl https://ci0.servo.org/static/macos13.sh | sudo sh`, press **Enter**, type the password above, press **Enter**
197+
- When the script finishes, press **Cmd**+**Q**
187198
- Shut down the guest: `virsh shutdown servo-macos13.clean`
188199
- Take another snapshot: `zfs snapshot tank/base/servo-macos13.clean@automated`
200+
- Clone the clean zvol/guest to create the base zvol/guest:
201+
- `zfs clone tank/base/servo-macos13{.clean@automated,}`
202+
- `virt-clone --preserve-data --check path_in_use=off -o servo-macos13.clean -n servo-macos13 --nvram /var/lib/libvirt/images/OSX-KVM/OVMF_VARS.servo-macos13.fd -f /var/lib/libvirt/images/OSX-KVM/OpenCore/OpenCore.qcow2 -f /dev/zvol/tank/base/servo-macos13 -f /var/lib/libvirt/images/OSX-KVM/BaseSystem.img`
203+
- `cp /var/lib/libvirt/images/OSX-KVM/OVMF_VARS.servo-macos13{.clean,}.fd`
189204

190205
Baking new images after deployment
191206
----------------------------------

server/nixos/configuration.nix

+1
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
environment.systemPackages = with pkgs; [
6767
cdrkit # for genisoimage
6868
clang
69+
dmg2img
6970
gh
7071
git
7172
hivex

0 commit comments

Comments
 (0)