mirror of
https://github.com/kholia/OSX-KVM.git
synced 2026-02-04 04:53:35 +00:00
Batch Update 2 - September 2023
Changes: - Update to OpenCore 0.9.5 - Switch around the emulated video device (required for Ventura) - Change default resolution to 1920x1080 - Include ventura in shortname CLI help - Add notes on 'bridged networking' - Better networking documentation (thomaspaulb) - Support for offline installations (kwadwokyeremeh) - Initial WIP macOS Sonoma support (via 'luchina-gabriel')
This commit is contained in:
committed by
Dhiru Kholia
parent
1184c09bc6
commit
422bb3b713
@@ -30,14 +30,27 @@ MacOS.
|
||||
|
||||
To use this adapter, replace network_adapter with e1000-82545em
|
||||
|
||||
vmxnet3 - An alternative solution to e1000 is to use vmxnet3 instead. Unlike
|
||||
the e1000, vmxnet3 is a paravirtualized NIC, which can allow for better
|
||||
vmxnet3,virtio-net-pci - An alternative solution to e1000. Instead of emulating
|
||||
the e1000, these are paravirtualized NICs, which can allow for better
|
||||
performance (in theory). The only catch is that the you need to have a recent
|
||||
version of MacOS (10.11 or later).
|
||||
|
||||
To use this adapter, replace network_adapter with vmxnet3
|
||||
To use these adapters, replace network_adapter with vmxnet3 or virtio-net-pci.
|
||||
|
||||
|
||||
SSH access in user mode
|
||||
-----------------------
|
||||
|
||||
Although the IP address of the VM is not visible to the outside, it is possible
|
||||
to use port forwarding to access the VM's ports from your host, eg the SSH port.
|
||||
To achieve that:
|
||||
|
||||
- In MacOS, turn on SSH under System Preferences > Sharing > Remote Login.
|
||||
- Modify the startup script to include `-netdev user,id=net0,hostfwd=tcp::10022-:22`
|
||||
- Use `ssh localhost -p10022` to get in.
|
||||
|
||||
You can use the same for VNC.
|
||||
|
||||
-----------------------------------
|
||||
Tap Networking (Better Performance)
|
||||
-----------------------------------
|
||||
@@ -62,6 +75,25 @@ virsh net-autostart default
|
||||
Add "-netdev tap,id=net0,ifname=tap0,script=no,downscript=no -device e1000-82545em,netdev=net0,id=net0,mac=52:54:00:c9:18:27 \"
|
||||
to your qemu-system-x86_64 command.
|
||||
|
||||
|
||||
Using an rc.local startup script
|
||||
--------------------------------
|
||||
|
||||
I have the following commands present in `/etc/rc.local`.
|
||||
|
||||
#!/usr/bin/env bash
|
||||
sudo ip tuntap add dev tap0 mode tap
|
||||
sudo ip link set tap0 up promisc on
|
||||
sudo ip link set dev virbr0 up
|
||||
sudo ip link set dev tap0 master virbr0
|
||||
|
||||
This has been enough for me so far.
|
||||
|
||||
Note: You may need to enable the `rc.local` functionality manually on modern
|
||||
Ubuntu versions. Check out the [notes](notes.md) included in this repository
|
||||
for details.
|
||||
|
||||
|
||||
QEMU networking tip
|
||||
-------------------
|
||||
|
||||
@@ -96,3 +128,30 @@ to work, it needs to be setuid root. This can be accomplished with this command:
|
||||
|
||||
Note that this is sometimes viewed as a security hole. Be careful and understand
|
||||
what you are doing before running this command.
|
||||
|
||||
|
||||
-----------------------
|
||||
Bridged Networking 2023
|
||||
-----------------------
|
||||
|
||||
sudo mkdir -p /etc/qemu
|
||||
|
||||
sudo cp bridge.conf /etc/qemu
|
||||
|
||||
sudo chmod u+s /usr/lib/qemu/qemu-bridge-helper
|
||||
|
||||
sudo ip link add name br0 type bridge
|
||||
|
||||
sudo ip link set dev br0 up
|
||||
|
||||
sudo ip link set enx00e04c680a67 master br0 && sudo dhclient br0
|
||||
|
||||
$ brctl show
|
||||
bridge name bridge id STP enabled interfaces
|
||||
br0 8000.ead0ee60b7c1 yes enx00e04c680a67
|
||||
tap0
|
||||
Use the following network device in scripts:
|
||||
|
||||
-netdev bridge,id=net0,br=br0,"helper=/usr/lib/qemu/qemu-bridge-helper" -device virtio-net-pci,netdev=net0,id=net0,mac=00:16:CB:00:11:34
|
||||
|
||||
Also see https://dortania.github.io/OpenCore-Post-Install/universal/iservices.html to tweak the config.plist file.
|
||||
|
||||
Reference in New Issue
Block a user