Run OS X Mavericks on QEMU and KVM

Source: Internet
Author: User
Tags dedicated server arch linux

Run OS X Mavericks on QEMU and KVM

Today, OS x virtualization is easy to handle, because OS X hosts fully support VMware and VirtualBox. But what will virtualization happen on bare metal and QEMU? What about Linux? In the end, I completed Mavericks on QEMU (no extra kernel expansion (!)), But it is really not easy.

Ubuntu 12.04 cannot find the Qemu command

Install QEMU + efi bios on Arch Linux

QEMU translation framework and debugging tools

Staff

A lot of work on this is attributed to Gabriel L. somlo, he finished the preliminary work on the matter, but I cannot get any clean Installation Boot OS X Mavericks version from his guide. Therefore, I can only debug it myself.

Why?

Cloud OS x. This is a entertainment-only project to see if I can get a virtualized OS x on a dedicated server, and I have succeeded. Note that this is only for educational purposes and is not recommended-without stability assurance, and may violate Apple's user final license agreement.

What to prepare

To complete the installation, make the following preparations:

  • Machines that can run KVM

  • Bash shell Basics

  • Mavericks. ISO (generated by this shell script)

  • Mountain Lion. ISO (generated by this shell script)

  • Git

  • Build-essential (gcc, make, iasl, Linux kernel headers)

The above two shell scripts are the same and apply to these two versions of OS X.

Install KVM with OS X support

First, you need to download the latest KVM code from the git repository (this is required because KVM in the atp or yum repository does not have OS X patches ). You also need the kvm-kmod code in the git repository. You can use the following command to obtain and build them.

Install the latest QEMU with OS X support

We need to download the latest QEMU and SeaBIOS that support OS X patches from the git repository.

Chameleon bootloader directs to the installer and OS X

You can install Chameleon on disk after installing OS X, but for convenience, we can send a binary file to QEMU to start Chameleon.

Download the binary file and put it in the same directory as the downloaded folder.

Install Mountain Lion

Before installing Mavericks, we must first install Mountain Lion and then upgrade it (this is because installing Mavericks directly causes QEMU to get stuck ).

Now, make sure that your Mountain Lion and Mavericks. ISO files are in the same directory. From now on, I useMountainLion. isoAndMavericks. iso.

Now, we need to create a blank file to install OS X (you can copy this file to an LVM or partition using dd later, but unfortunately, when the partition is used, I don't get the installer to start ).

Qemu-img create-f qcow2 osx. img 30G

We must use the following command to start this client:

You may need to enter a key, which can be obtained by using the first code in an Apple Computer.

You need to replace the./share/qemu/bios-mac.bin path with your own path (relative to your current path, which may be in A./share or./usr/share ).

This will enable a VNC session on localhost: 5901. You can connect to the session and start it to the installer!

Here-smp defines the number of cores that can be used in the client. I set it to 4 and work well. However, using a single core can also make OS X run well.

After operating system X is installed normally, proceed according to the content in the next section.

Upgrade to Mavericks

This step is very similar to the above. Use the following command to open the same client:

In Chameleon, make sure to start from "OS X Base System" (Your. iso file) instead of your HDD. Then install Mavericks normally in the same partition. Do not format the partition.

After completing this step, you will have an Mavericks that can work normally!

No Kexts?

This is a completely native system that does not require any modifications to kext or even FakeSMC. I have not used FakeSMC for testing, but it should work properly.

Network

Currently, the default NIC Driver of QEMU is not good. We recommend that you use virtio. You can download it as follows:

Next, add the following command to the command mentioned above, run a client, and then install it from the mounted FAT drive. pkg file, and then restart, the NIC will work normally!

Contact me

You can contact me through will @ 3942 or @ Will3942.

QEMU details: click here
QEMU: click here

This article permanently updates the link address:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.