Get AppleVirtIONetwork working? #257

Open
opened 2025-12-29 00:21:53 +01:00 by adam · 4 comments
Owner

Originally created by @jpmorrison on GitHub (Oct 10, 2021).

I changed NETWORKING=virtio-net-pci to try the Apple virtio driver. The kext loads but I don't get an address.

image

Seems to be the same issue as this https://www.insanelymac.com/forum/topic/340797-virtio-net-support-added-in-catalina

Originally created by @jpmorrison on GitHub (Oct 10, 2021). I changed `NETWORKING=virtio-net-pci` to try the Apple virtio driver. The kext loads but I don't get an address. ![image](https://user-images.githubusercontent.com/1448696/136676775-be4cdf07-61e0-4910-bd3c-b15996126ae0.png) Seems to be the same issue as this https://www.insanelymac.com/forum/topic/340797-virtio-net-support-added-in-catalina
Author
Owner

@sickcodes commented on GitHub (Oct 15, 2021):

This is above my head but did anything cool happen?

@sickcodes commented on GitHub (Oct 15, 2021): This is above my head but did anything cool happen?
Author
Owner

@jpmorrison commented on GitHub (Oct 15, 2021):

I wasn't able to test - I think I'll need to switch to virt-manager/virsh so I can hotplug devices and filesystems. @Leoyzen got about 20 Gbps performance out of it though. My vmxnet3 is getting "only" 2 Gbps so I'd like to see if virtIO is better. Maybe it'll work better as a second nic.

I'm not sure if +hypervisor is needed or not for the Apple guest kexts to work. Right now I have CPU=kvm64 and added +hypervisor,+pcid,+pdpe1gb,+pclmulqdq,+vmx,+rdtscp,,+tsc-deadline,+ss. I tried copying as many flags from an old mini that matched my ancient xeon. +vmx-unrestricted-guest seems to figure it out too.

VirtIO disk works too. Performance seems ok. I removed the ich9-ahci,id=sata device and set everything to virtio: -drive id=MacHDD,if=virtio

image

I ran Atto benchmark with the virtio disk - seems OK but I need to redo with the original settings.

One problem with VirtIO disk is that opencore doesn't remember to boot MacHDD so have to select manually.
And without the ahci device, there's still a default dvd drive installed - I just click ignore in macOS and it seems fine.
If virtio disk is better for anyone there are probably simple fixes/workarounds for this.

image

Qemu has virtio 9P and there's an Apple 9P virtio kext so that seems like a good thing to test next.

@jpmorrison commented on GitHub (Oct 15, 2021): I wasn't able to test - I think I'll need to switch to virt-manager/virsh so I can hotplug devices and filesystems. @Leoyzen got about 20 Gbps performance out of it though. My vmxnet3 is getting "only" 2 Gbps so I'd like to see if virtIO is better. Maybe it'll work better as a second nic. I'm not sure if +hypervisor is needed or not for the Apple guest kexts to work. Right now I have CPU=kvm64 and added +hypervisor,+pcid,+pdpe1gb,+pclmulqdq,+vmx,+rdtscp,,+tsc-deadline,+ss. I tried copying as many flags from an old mini that matched my ancient xeon. +vmx-unrestricted-guest seems to figure it out too. VirtIO disk works too. Performance seems ok. I removed the ich9-ahci,id=sata device and set everything to virtio: -drive id=MacHDD,if=virtio ![image](https://user-images.githubusercontent.com/1448696/137520309-4d94370d-e9f1-4723-9862-6bacf711966e.png) I ran Atto benchmark with the virtio disk - seems OK but I need to redo with the original settings. One problem with VirtIO disk is that opencore doesn't remember to boot MacHDD so have to select manually. And without the ahci device, there's still a default dvd drive installed - I just click ignore in macOS and it seems fine. If virtio disk is better for anyone there are probably simple fixes/workarounds for this. ![image](https://user-images.githubusercontent.com/1448696/137521784-00125766-d2dc-4a82-9747-a194aba206fd.png) Qemu has virtio 9P and there's an Apple 9P virtio kext so that seems like a good thing to test next.
Author
Owner

@jpmorrison commented on GitHub (Oct 16, 2021):

Looks like virtio-net and balloon need Big Sur

Lots of good mac settings here: https://github.com/wimpysworld/quickemu

qxl video is integrated with System settings
virtio-9p file sharing works

@jpmorrison commented on GitHub (Oct 16, 2021): Looks like virtio-net and balloon need Big Sur Lots of good mac settings here: https://github.com/wimpysworld/quickemu qxl video is integrated with System settings virtio-9p file sharing works
Author
Owner

@sickcodes commented on GitHub (Oct 18, 2021):

Thanks @jpmorrison, I'll check some of the settings on there

@sickcodes commented on GitHub (Oct 18, 2021): Thanks @jpmorrison, I'll check some of the settings on there
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Docker-OSX#257