
Running OS X Mavericks under QEMU with KVM - kvmosx
http://blog.definedcode.com/osx-qemu-kvm
======
rjzzleep
given that a lot of the work presented here was not "preliminary work that was
adapted", but actually entirely made by him and copy and pasted by you, I
think you could at least do him the courtesy of linking his site[1] and his
work somewhere in the first sentence instead of a side note in the closing
statement.

Adapting his work in my opinion is not copy and pasting his work and adding a
line or two in the middle. Making a simple enough script that runs the whole
thing from start to finish for example would be a nice adaptation that I am
sure he and many other people would appreciate.

Maybe the choice of your wording and the structure of your post is a bit
unfortunate. If so, consider editing it.

[http://www.contrib.andrew.cmu.edu/%7Esomlo/OSXKVM/](http://www.contrib.andrew.cmu.edu/%7Esomlo/OSXKVM/)

edit: sorry, if i came across harsh, in the tiny little world in my head the
one thing engineers care about/enjoy(but don't expect) after an accomplishment
is praise and credit.

~~~
kvmosx
I was aware of this when posting. I am very thankful for that information and
everyone who contributed to KVM, KVM-KMOD and QEMU repositories. I have moved
the credit to the top of article.

This was more as a reference and a quick guide (also because I couldn't
achieve Mavericks via his research and therefore I have added it here).

Thanks anyway.

~~~
clinton_sf
What graphics card does Mac OS X think it's using when running in QEMU/KVM as
you describe? Are you able to get different (more than 1200x800) resolutions?
One of the major shortcomings of most of the "Mac OS X in a guest" efforts is
that 3D hardware acceleration is disabled (unimplemented) in the guest video
driver, which the Quartz compositing engine assumes will always be there. This
results in weird video behavior, like certain things not showing up or for FLV
video to not render in a web browser. Are you able to view web video with this
Mac guest?

~~~
BillinghamJ
The 3D hardware acceleration is not present. The purpose of this exercise was
to have virtualized Xcode build slaves.

~~~
clinton_sf
If that's what you're trying to do, you might want to explore cross compiling
Mac apps on Linux:

[http://stackoverflow.com/questions/2786240/how-to-compile-
in...](http://stackoverflow.com/questions/2786240/how-to-compile-intel-mac-
binaries-on-linux)

See also Mozilla Bug 921040 - Cross-compile Firefox for Mac on Linux.
[https://bugzilla.mozilla.org/show_bug.cgi?id=921040](https://bugzilla.mozilla.org/show_bug.cgi?id=921040)

------
st3fan
Couple of notes:

* It is easier to just install a Linux 3.15 kernel. I installed the latest RC on Ubuntu 14.04 and that did the trick.

* You should not have to install Mountain Lion first. I made a Mavericks ISO using the script mentioned and it installed without any issues

* The Qemu that ships with Ubuntu 14.04 is new enough. No need to compile your own. Those patches are pretty old and if your distro is up to date then you most likely already have a Qemu that just works.

This posting also has more info [http://blog.ostanin.org/2014/02/11/playing-
with-mac-os-x-on-...](http://blog.ostanin.org/2014/02/11/playing-with-mac-os-
x-on-kvm/)

~~~
pritambaral
It would've been helpful if the guide mentioned the required KVM and Qemu
versions by their version numbers. Users like me (Arch Linux, Gentoo etc.) and
Ubuntu, Fedors users in the future could check and avoid installing from
source.

~~~
vacri
Looking up qemu-kvm in Ubuntu 14.04 now, it's version
"2.0.0~rc1+dfsg-0ubuntu3.1", which is similar to the version in my Debian
Jessie/Testing machine (2.0.0+dfsg-6). Time to try this out, methinks.

Edit: try this out another time - you need access to an OSX machine to do
various steps of the process.

~~~
voltagex_
Run the file utility over the DMG that you have. If it comes up as having a
boot sector in it (aside from a hfsplus filesystem), you should be able to use
qemu-img to convert it to something qemu or VirtualBox can use.

~~~
st3fan
Are you speaking from experience? Because that doesn't work since 10.8 I
think. You need to use the script to turn the dog into an iso. It is not just
a format change, it actually changes the structure of the contents.

~~~
voltagex_
Ah, my source image may have already been modified. Thanks for the pointer.

------
rryan
I did this recently and was able to start directly with Mavericks with no
trouble.

This is also a useful article that I read in addition to Gabriel's work to get
this working: [http://blog.ostanin.org/2014/02/11/playing-with-mac-os-x-
on-...](http://blog.ostanin.org/2014/02/11/playing-with-mac-os-x-on-kvm/)

It's great that we can finally virtualize OS X with no hacks to the guest.

------
pavlov
I wish there was a reasonable way to run OS X on non-Apple hardware.

Just today I was looking at the current Mac lineup, and there's not a single
setup that works for me. Everything comes with underpowered Intel graphics,
unless you pay the ridiculous price for a top-of-the-line MacBook Pro.

Oh, if only I could have a Surface Pro 3 running OS X... I could live with the
Intel graphics if it had Surface-style portability.

~~~
rbanffy
> unless you pay the ridiculous price for a top-of-the-line MacBook Pro

If you consider the time you'll spend tweaking your hackintosh into a useful
state and the risk of bricking it on every update, it's actually a bargain.

I wouldn't buy a Mac to run Linux, but I wouldn't buy anything else to run
OSX.

~~~
theseanstewart
I built a Hackintosh 2.5 years ago and haven't had any issues. I highly
recommend it to anyone with minimum Google skills.

~~~
mtford
Yep, just upgraded mine to Mavericks and had absolutely no issues. You just
need to make sure you buy components that are tried and tested by the
hackintosh community.

~~~
rahimnathwani
How often have you had to re-install the boot loader and/or kexts? Each time
you upgrade OS X, sometimes, or never?

~~~
mtford
Never. To upgrade to Mavericks I just created a USB installer using unibeast,
booted from USB and followed the usual OSX install process. All my files and
apps were left untouched.

------
laichzeit0
> Virtualizing OS X is a thing that can today be done very easily, with VMware
> and VirtualBox fully supporting it under OS X hosts

Having tried this in the past with Virtualbox there were some serious caveats.

If you still can't make Seamless mode in Virtualbox work under Linux and have
accelerated graphics drivers then it's not worth trying to run OS X
virtualized. It's a crap experience.

------
Scramblejams
Wish somebody had an up-to-date guide to installing Mavericks on Xen.

------
0x0
I wonder what crazy low level technical thing is preventing a clean mavericks
boot while an upgrade works.

------
int19h
Does this build of chameleon still rock fakesmc? FakeSMC is unambiguously
illegal - it violates Apple copyright.

------
coin
Zoom on iPad sucks. The stupid Home/About navigation bar just doesn't go away.

------
fithisux
Open source darwin has failed. That is the problem.

------
jameshk
This is awesome. OS X in the cloud!

------
raverbashing
Pro-tip: don't bother upgrading to Mavericks, Mountain Lion is better and
lighter (even with the memory compression thing), don't upgrade unless you
really need to use something specific in Mavericks

~~~
IBM
Are you kidding? The extra battery life alone is worth it.

~~~
yebyen
In a virtual machine?

~~~
lloeki
Timer coalescing may help reduce host/VM context switches, which may ease
virtualisation. Also, even desktops and servers consume watts, which
ultimately get converted into heat and bills.

------
Alupis
You do know this violates the EULA for OSX?

No OSX version allows for virtualizing it as a guest VM.

(just pointing it out)

~~~
josteink
Honest question: has anyone ever cared for a EULA on hn except for bickering
about getting Apple's poorly compatible consumer-os to run on regular consumer
hardware?

I can't think if a single case.

~~~
jakejake
To be honest, I don't think it is a huge issue for personal use. But when
you're running a businesses then it becomes important to pay attention to
software licenses. If you intend to get big enough to where you'll be audited
for investment or sale, you wouldn't want to have your technology relying on
improperly licensed software products.

That being said, I'm among the people who would love to run virtualized OSX.

------
josteink
I find it humerus that getting osx to run in a controlled environment, useful
for testing simulation etc takes more hacking and more work than any Linux
distro ever did, even in the early days.

Despite this Mac people insists getting Linux to work is "hard" when it mostly
works out of the box on _any_ hardware. Amazing.

~~~
mentat
"than any Linux distro ever did" \- Remembering my stack of 32 floppies to
install slackware and the level of understanding it took of drivers and
hardware, I'm pretty sure that's not true.

~~~
lwh
While I remember "oh no disk 17 isn't working" better re-download and try
again tomorrow, this is the closest to that level of pain I've encountered in
a long time. What's sad is despite VMs for testing being the norm, the vendor
is actively causing pain for devs and admins.

~~~
mentat
For quite some time I was downloading things over bitnet ftp to email proxy
since we didn't have raw IP available. Crazy times...

