16 ms·
OS X-KVM: Running Mac OS X El Capitan on KVM and QEMU
- g0atbutt 10y agoDoes this support 3D hardware acceleration? That seems to be a common problem for these types of setups.
- ShinyCyril 10y agoHardware acceleration can be done using PCI passthrough to pass your graphics card on to the guest OS. IOMMU and VFIO are two terms I commonly see associated with this, but having never done it myself I am not sure what the difference between them is - perhaps someone can chime in?
- virtuallynathan 10y agoVT-d = Virtualization Technology for Directed I/O which basically means the CPU has an IOMMU, the IOMMU is a piece of hardware for doing PCIe DMA re-mapping to provide VM isolation. VFIO is the linux driver for passing through IOMMU devices.
- grw_ 10y agoAFAIK the only way to achieve this is to pass-through a GPU via VT-d. This config does not appear to support this though. If you search github for this line, you will find other configs that support doing this- https://github.com/kholia/OSX-KVM/blob/master/macOS-libvirt.xml#L55 https://github.com/kholia/OSX-KVM/blob/master/macOS-libvirt.... Edit: It's relatively easy- blacklist (or uninstall) GPU drivers from host machine, and pass the PCI address to qemu. Performance is not perceptibly different from native. Other things you probably want to do are enable hugepages, pin virtual cpus to physical cores, and use vfio for network- https://github.com/pmj/virtio-net-osx https://github.com/pmj/virtio-net-osx. It's also possible to run boot OSX using UEFI mode, which removes the need for the binary blobs in this repo.
- creshal 10y agoThe script seems to use qemu's default VGA graphics chip. I'm not sure whether you can get anything faster to work, given Apple's limited graphics driver support.
- Keyframe 10y agoIs it possible to run several OS' on a single machine with fast switching between them, access to all hardware, and at full or almost full speed?
- stuaxo 10y agoUsing Vmware, and passthrough for the videocard you can achieve this with Linux as the host and Windows as the guest. Not sure if it's possible with OSX. What we really need are video drivers for OSX, for virtualbox and/or other virtualisation solutons, so OSX as a guest can work really well.
- creshal 10y agoAnd you can't easily switch between several virtualized machines like that. Windows will bluescreen if you remove a graphics card while in use, and I'm not sure OSX/Linux guests will fare better. Passthrough only really works reliably if you only have one guest active at a time and never try to use the graphics card from the host.
- chrisper 10y agoOS X has official Nvidia drivers.
- aruggirello 10y agoVGA passthrough is also possible with KVM. I wonder if Oracle has any plans to add it to VirtualBox? It seems they have made room for KVM support, so in theory they could. I have seen all OSX versions from Leopard to El Capitan successfully running as a VB guest, but the graphics support has always been bad, since there are no Guest Additions for OSX (BTW this also means no bidirectional clipboard, drag & drop of files, etc..)
- mastax 10y agoThere's some support: https://www.virtualbox.org/manual/ch09.html#pcipassthrough https://www.virtualbox.org/manual/ch09.html#pcipassthrough
- ShinyCyril 10y agoI tried doing this the other day, hoping that I would finally be able to get a working OSX setup on my desktop (have made several attempts with no success at getting it working bare-metal on my Z600). Sadly it just ended with more kernel panics, something I was hoping would be avoided as I got the impression from some sources that QEMU was a more straightforward solution than trying to run it on bare-metal. Having said that, I've been getting more and more frustrated with OSX (had a great experience with Leopard on a PowerBook G4, and my 2013 MacBook Air is easily the best laptop I've owned, however personally I don't care for the direction that they are taking OSX these days), and ended up using it as an excuse to update to the latest version of elementary OS, which certainly isn't without its teething problems.
- valarauca1 10y agoZ600 That's a bit old. Modern Hackentoshes are actually pretty solid on consumer hardware. Z79/Z79, Z170 are pretty much fully supported. Some forum posters claim they've gotten dual 4th Xeon boards to work. I set one up on my Z79+i7-4790k. It was a breeze. Took about 90minutes following tutorials. My biggest problems were: -I set up the wrong sound driver -Nvidia won't detect/modify hot plugging displays you have to manually edit OSX's version of xorg.conf -Apple's Nvidia driver didn't support GSync or 144Hz. So I had to dealing with image tearing :\ -Non Apple keyboards had weird character mismatching. Had to purchase an Apple USB keyboard. I ended up reverting because I like my IBM Model M, and losing hardware level vsync was a no-go.
- runjake 10y ago> Apple's Nvidia driver didn't support GSync or 144Hz. So I had to dealing with image tearing :\ The Mac drivers Nvidia released yesterday finally support G-Sync. > Non Apple keyboards had weird character mismatching. Had to purchase an Apple USB keyboard. You can fix this by not skipping the keyboard setup wizard that pops up when you plug in an unknown keyboard.
- valarauca1 10y agoI actually never got the popup. IBM Model M is PS/2 not USB so it has to be plugged in on boot as the UEFI/Bios won't let you hot plug.
- sgt 10y agoThat is pretty impressive. I spent hours upon hours getting OS X to run on a Linux host in KVM and QEMU. Eventually I did get it to work, but things like Messages.app had no chance of working. That was actually my goal - to create my own little Messages API so that I could send automated messages to myself. I ended up just scripting Messages.app on a real Mac and that works really well, even 2 years after. I remote control my house that way.
- mattwg 10y ago> I ended up just scripting Messages.app on a real Mac and that works really well, even 2 years after. I remote control my house that way. That sounds pretty neat, do you have more details written down anywhere?
- tambourine_man 10y agoPretty neat indeed. It's sad though that one has to virtualize an entire OS just because a messaging system doesn't offer an open API.
- JustSomeNobody 10y agoThe world is getting more proprietary ... sadly.
- tambourine_man 10y agoIn some ways, yes. On the other hand, free software is also everywhere. Linux, Webkit/Blink/Firefox, Apache/nginx, LLVM/GCC, Emacs/Vim… it's a pretty big list. Instant messaging and Pro Photo/Video apps are a particularly sore point.
- sgt 10y agoI've installed an AppleScript handler from within Messages.app. The script below is called ReceiveMessage.script and is located in ~/Library/Application Scripts/com.apple.iChat and basically accepts messages. That's how I handle inbound messages, and for outbound I basically also have a separate script for sending out messages. I do the actual work in separate python scripts called by the shell scripts though. -- snip snip -- using terms from application "Messages" on message received theText from theBuddy for theChat set quoted_message to quoted form of theText set quoted_id to quoted form of (id of theBuddy as text) do shell script "echo " & quoted_message & " | ~/bin/MessageReceive.sh " & quoted_id & " > /dev/null 2>&1 &" # make messages happy return true end message received on message sent theMessage for theChat end message sent on active chat message received end active chat message received on chat room message received theMessage from theBuddy for theChat end chat room message received on addressed chat room message received theMessage from theBuddy for theChat end addressed chat room message received on addressed message received theMessage from theBuddy for theChat end addressed message received on av chat started end av chat started on av chat ended end av chat ended on login finished for theService end login finished on logout finished for theService end logout finished on buddy became available theBuddy end buddy became available on buddy became unavailable theBuddy end buddy became unavailable on completed file transfer end completed file transfer end using terms from
- ethanpil 10y agoThe OSX license agreement severely limits the practicality of this: http://images.apple.com/legal/sla/docs/macOS1012.pdf http://images.apple.com/legal/sla/docs/macOS1012.pdf It only allows you: Section 2B(iii): "to install, use and run up to two (2) additional copies or instances of the Apple Software within virtual operating system environments on each Mac Computer you own or control that is already running the Apple Software, for purposes of: (a) software development; (b) testing during software development; (c) using macOS Server; or (d) personal, non-commercial use. The grant set forth in Section 2B(iii) above does not permit you to use the virtualized copies or instances of the Apple Software in connection with service bureau, time-sharing, terminal sharing or other similar types of services."
- curried_haskell 10y agoSo...? Don't do this at work. Who actually takes software licenses seriously in their own home?
- karlmdavis 10y agoI do. I mean... seems pretty hypocritical for a coder who's made most of their income from software NOT to.
- Symbiote 10y agoI'm sure there are plenty of us who've only written open source and/or bespoke software.
- cm3 10y agoI write software for free and as a living, so I surely take it seriously. How can a software developer justify stealing software, unless they're trapped in a poor or technologically restricted situation (Cuba)? EDIT: There's some confusion as to what I replied to: My reply is to this Who actually takes software licenses seriously in their own home? If this doesn't imply one's okay with stealing, then I take my comment back.
- thrillgore 10y agoThis is really cool. Someone fork this locally before Apple sends their takedown notice.
- zymhan 10y agoThere's nothing illegal about this if you're running KVM on Mac hardware and virtualizing OS X (er, macOS).
- Kadin 10y agoYou don't really need to do anything besides a normal `git clone`; any clone is as good as any other, really. If the project disappears from Github someone would need to find a different place to host collaborative development, though. Maybe there needs to be some sort of Github-alternative in a friendly jurisdiction for projects that are too controversial to host on a mainstream provider in the US? E.g. for DMCA-violating projects, video codecs, DRM removal tools, etc.? I'm not that familiar with the alternatives but it wouldn't surprise me if there are better options in terms of resistance to US court orders.
- davb 10y agoKeep in mind that if you're using the boot.sh method, the NIC's MAC seems to be hardcoded in the script [1]. You might want to change that. [1] https://github.com/kholia/OSX-KVM/blob/476ae8b082088049f2f8c547518f35b1cf5d0647/boot.sh#L29 https://github.com/kholia/OSX-KVM/blob/476ae8b082088049f2f8c...
- deleted 10y ago[deleted]
- guoqiang2 10y agoHave a question about source file date on GitHub, how come this is correct? Last commit on Jan 26 (2016). Latest commit 476ae8b on Jan 26 @kholia kholia PoC then all the files are showing created 22 days ago as of today (09/22/2016): pbzx-src PoC 22 days ago
- dbm5 10y agoVery cool; currently the bash script assumes the old "OS X" naming convention of the installation app. To make it work with "macOS" Sierra, some simple changes are required.
- CyberShadow 10y agoThis little line, copyrighted by Apple, is what I understand to be the legal protection they have against people running OS X on non-Apple hardware: https://github.com/kholia/OSX-KVM/blob/476ae8b082088049f2f8c547518f35b1cf5d0647/macOS-libvirt.xml#L55 https://github.com/kholia/OSX-KVM/blob/476ae8b082088049f2f8c... I would not be surprised if a DMCA takedown will be filed against this repository soon. More information here: http://www.contrib.andrew.cmu.edu/~somlo/OSXKVM/#sec_3_2_1 http://www.contrib.andrew.cmu.edu/~somlo/OSXKVM/#sec_3_2_1
- kristofferR 10y agoI doubt that line ("ourhardworkbythesewordsguardedpleasedontsteal") is creative enough to meet the threshold of originality required for something to be protected by copyright. Even if it actually were copyrightable/trademarked it wouldn't be a valid legal strategy to prevent fair-use: https://en.wikipedia.org/wiki/Sega_v._Accolade https://en.wikipedia.org/wiki/Sega_v._Accolade
- CyberShadow 10y agoI wouldn't be so sure. That case predates the DMCA - see also the AACS encryption key controversy.
- geofft 10y agoThey could take it out of the repo and imply heavily that people should Google it. It's pretty easy to find on other websites and forum posts.
- striking 10y ago"A secret value goes here. Google 'isa-applesmc' and maybe you'll find it."
- conradev 10y agoI compiled a document the other day with a lot of links on the subject of macOS virtualization, for anyone interested: https://docs.google.com/document/d/1VwLJqgc2VkD-EZnMzSFmZRq0YjZPCS18uPr94KsOByY/edit https://docs.google.com/document/d/1VwLJqgc2VkD-EZnMzSFmZRq0...
- jameshclrk 10y agoThis will probably be taken down soom, mainly because of the link to the El Capitan ISO
- hobarrera 10y agoDoes anyone know how to get the ISO image, or the installer via the recovery boot (cmd+r)? I'm having a really hard time running the Apple App Store BEFORE I install the OS. There's kind of a circular dependency there.