[vfio-users] OVMF + Os X

francesco dicarlo evilsephiroth at gmail.com
Wed Oct 28 18:39:43 UTC 2015


Some progress....

Thanks to root at yoshi.dynu.com.

Booted osx yosemite with chameleon with -vga std and installed yosemite...

Then nvidia web driver install and  passthrough of gtx 970 with vga -none
x-vga parameter... I had to patch kernel for i915 vga arbitration...

Everything works out of the box with some flag in chameleon boot loader...
hdmi_audio, nvda_drv=1,smbios tweaked to MacPro3,1. chameleon installed in
mac os hard disk. Network working with user networking for now...

Working with 2 monitors (Dvi-I to Vga cable, hdmi direct cable) with 1080p
resolution on both. Nvidia acceleration working.

Experimenting with usb controller passthrough


My command line :

sudo qemu-system-x86_64 -enable-kvm -M q35 -m 4G -cpu
core2duo,hv_time,hv_relaxed,hv_vapic,hv_spinlocks=0x1fff,kvm=off,hv_vendor_id=badapple
 -smp 2,sockets=1,cores=2,threads=1  \
-drive file=/dev/mapper/vgData-logicMac,id=disco,format=raw \
-device
ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 \
-device
vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on \
-device vfio-pci,host=01:00.1,bus=root.1,addr=00.1 \
-kernel /mnt/archData/virtualMisc/chameleon_svn2510_boot \
-device isa-applesmc,osk="findityourself" \
-device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e \
-device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x1 \
-device piix3-usb-uhci,id=usb,bus=pci.2,addr=0x1 \
-netdev user,id=mynet0,net=192.168.76.0/24,dhcpstart=192.168.76.9 -device
e1000-82545em,mac=DE:AD:BE:EF:AD:3c,netdev=mynet0,id=nic1 \
-smbios type=2 -vga none -device usb-kbd -device usb-mouse -boot d  -vnc :2
-k it

Some questions :

1)Is it possibile to manage this on libvirt? vga none doesn't seem an
acceptable value when editing with virsh. If i remove video tag, next
opening cirrus is there. I would like to use also virtual existing
networks... Libvirt is opening tap device when booting a vm...

2)Progress with OVMF and i440fx with Mac OS? this article
http://blog.will3942.com/qemu-osx-update states that currently OVMF doesn't
support OSX. Would like to avoid i915 and loss of DRI on host...


Thanks in advance




2015-10-27 21:09 GMT+01:00 <root at yoshi.dynu.com>:

> Here you go:
>
> http://pastebin.com/RqsD52hS
>
> (create bridged network br0)
>
> since i don't have integrated GPU i don't use i915 patch.
>
> your problem is because of the GTX 970 not natively supported by OS X.
> here is how you fix it:
>
> start OS X with the bootflag: nv_disable=1
>
> now you should be able to get past the 'missing bluetooth controller
> transport' message and get a visual interface. No acceleration tho. To get
> full acceleration you need a SMBIOS of a MacPro3,1 or younger. When your
> machine is recognized as a MacPro you are able to install the Nvidia Web
> drivers you can download at the nvidia page (choose the correct version for
> your OS version). After installing the webdrivers you need to add the
> bootflag nvda_drv=1 permanently to your chameleon/clover configuration.
>
> Voila.
>
> haven't tried to enable emulated sound yet, i use a shairport server on
> the host and stream the sound via airplay. huge delay but i don't watch any
> videos in OS X. easiest solution would be a usb sound card since OS X
> doesn't like sound cards much (you would have to patch the driver)
>
> Good luck
>
>
> Am , schrieb francesco dicarlo:
>
>> Absolutely yes :D
>>
>> I've trying to do the same thing. I've got an arch linux host, ovmf
>> windows 8 and would like to do a mac os vm to ditch my macbook air and
>> use my dual screens with a gtx 970
>>
>> some info:
>> kernel patches ? (i915?)
>>
>> I've got an headless vga mac os yosemite on this setup (headless
>> server):
>> ubuntu 14.04
>> kernel 3.19 with i915 patch
>> libvirt stack from ppa jacob:virtualisation
>>
>> My target machine is latest archlinux with 4.1.11 vfio enabled kernel
>> without i915,qemu.git
>>
>> same xml dump from my home server won't work on my target setup.
>>
>> tried also using an lvm logical volume as hard disk but with same
>> result.
>>
>> Stuck at "missing bluetooth controller transport" when booting with
>> chameleon
>>
>> reference I've used here.
>>
>> https://macosxvirtualmachinekvm.wordpress.com/guide-mac-os-x-vm-on-unraid/
>> [2]
>>
>>
>> Thanks in advance
>>
>> 2015-10-27 13:04 GMT+01:00 <root at yoshi.dynu.com>:
>>
>> Hi.
>>>
>>> I am running a OS X VM with VGA-Passthrough just fine.
>>>
>>> using seabios and Q35 machine and latest Clover bootloader (start
>>> with the iso, it will detect the correct settings). Interesting
>>> thing is: Performance is even better compared to 'bare metal'
>>> hackintosh.
>>>
>>> If i am correct there is no way to run OS X completely headless. you
>>> could however use emulated VGA and then connect to the machine via
>>> VNC but performance will be really bad.
>>>
>>> People running real MacMinis headless also need to use
>>> dummy-adapters which trick the machine into thinking there is a
>>> monitor attached.
>>>
>>> Problems i encountered:
>>>
>>> when just assigning an image as a hdd you might run into a freeze at
>>> boot of the VM, qemu will tell you that the I/O thread spun for 1000
>>> iterations. Seems to be a problem between OS X and the emulated
>>> SATA-Controller.
>>>
>>> I solved this by assigning an own partition for the VM. It would be
>>> even better to passthrough a complete SATA-controller but mine does
>>> not like that :)
>>>
>>> if you like to i can post my config later
>>>
>>> Cheers
>>>
>>> _______________________________________________
>>> vfio-users mailing list
>>> vfio-users at redhat.com
>>> https://www.redhat.com/mailman/listinfo/vfio-users [1]
>>>
>>
>>
>>
>> Links:
>> ------
>> [1] https://www.redhat.com/mailman/listinfo/vfio-users
>> [2]
>> https://macosxvirtualmachinekvm.wordpress.com/guide-mac-os-x-vm-on-unraid/
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/vfio-users/attachments/20151028/262b83cb/attachment.htm>


More information about the vfio-users mailing list