[CONF] Setup simplification.

Setup simplification
This commit is contained in:
Foxlet 2019-06-19 21:23:28 -04:00 committed by GitHub
commit 5dd33000e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 34 additions and 7 deletions

View file

@ -27,14 +27,22 @@ Create an empty hard disk using `qemu-img`, changing the name and size to prefer
qemu-img create -f qcow2 MyDisk.qcow2 64G qemu-img create -f qcow2 MyDisk.qcow2 64G
``` ```
and add it to the end of `basic.sh`: Then run `basic.sh` to start the machine and install macOS, setting the
``` `SYSTEM_DISK` environment variable to the path to your freshly created
-drive id=SystemDisk,if=none,file=MyDisk.qcow2 \ system disk image:
-device ide-hd,bus=sata.4,drive=SystemDisk \
```
> Note: If you're running on a headless system (such as on Cloud providers), you will need `-nographic` and `-vnc :0 -k en-us` for VNC support.
Then run `basic.sh` to start the machine and install macOS. Remember to partition in Disk Utility first! ```
SYSTEM_DISK=MyDisk.qcow2 ./basic.sh
```
If you're running on a headless system (such as on Cloud providers), set
the `HEADLESS` environment variable to 1:
```
SYSTEM_DISK=MyDisk.qcow2 HEADLESS=1 ./basic.sh
```
Remember to partition in Disk Utility first!
## Step 2a (Virtual Machine Manager) ## Step 2a (Virtual Machine Manager)
If instead of QEMU, you'd like to import the setup into Virt-Manager for further configuration, just run `make.sh --add`. If instead of QEMU, you'd like to import the setup into Virt-Manager for further configuration, just run `make.sh --add`.

View file

@ -6,6 +6,22 @@ OVMF=$VMDIR/firmware
#export QEMU_AUDIO_DRV=pa #export QEMU_AUDIO_DRV=pa
#QEMU_AUDIO_DRV=pa #QEMU_AUDIO_DRV=pa
[[ -z "$SYSTEM_DISK" ]] && {
echo "Please set the SYSTEM_DISK environment variable"
exit 1
}
[[ -r "$SYSTEM_DISK" ]] || {
echo "Can't read system disk image: $SYSTEM_DISK"
exit 1
}
MOREARGS=()
[[ "$HEADLESS" = "1" ]] && {
MOREARGS+=(-nographic -vnc :0 -k en-us)
}
qemu-system-x86_64 \ qemu-system-x86_64 \
-enable-kvm \ -enable-kvm \
-m 2G \ -m 2G \
@ -26,3 +42,6 @@ qemu-system-x86_64 \
-device ide-hd,bus=sata.2,drive=ESP \ -device ide-hd,bus=sata.2,drive=ESP \
-drive id=InstallMedia,format=raw,if=none,file=BaseSystem.img \ -drive id=InstallMedia,format=raw,if=none,file=BaseSystem.img \
-device ide-hd,bus=sata.3,drive=InstallMedia \ -device ide-hd,bus=sata.3,drive=InstallMedia \
-drive id=SystemDisk,if=none,file="${SYSTEM_DISK}" \
-device ide-hd,bus=sata.4,drive=SystemDisk \
${MOREARGS[@]}