A new Mac-on-Linux version with KVM support is available

Anything about Mac emulation that does not belong in the above categories.

Moderators: Cat_7, Ronald P. Regensburg

Post Reply
xeno74
Space Cadet
Posts: 1
Joined: Mon Oct 20, 2014 5:15 am

A new Mac-on-Linux version with KVM support is available

Post by xeno74 »

Image

Hi All,

A new Mac-on-Linux version with KVM support is available. It runs on new PPC64 machines like A-EON AmigaONE X1000, IBM POWER8, PowerMac G5 etc. MoL/KVM supports Mac OS X 10.4.XX Tiger and 10.3.X Panther.

Quote Alexander Graf:
The MOL kernel module was designed with PPC32 hosts and guests in mind.

While that's all great when running on PPC32 hosts, it makes life really
hard on PPC64 hosts, as the MOL kernel module doesn't work there.

Furthermore it also never got upstreamed. So every new kernel revision
might break it.

Recently I implemented KVM for PowerPC64 though. So we now have a common
virtualization framework inside the kernel that gives us easy virtualization
access to PPC32 and PPC64 guest VMs.

This patch implements a simple backend module to interact with KVM. That way
KVM can be used to virtualize the CPU. Everything else still goes through
MOL.

With this patch applied and my recent patches to KVM (see the kvm-ppc ML
archive) I'm happily running a 10.4.11 Mac OS X VM on a 970MP system.
This should also enable G5 and PS3 hosts, though I haven't tried it out
there yet.

Please keep in mind that you need to run 32 bit userspace with a 64 bit kernel
for this to work.
MOL heavily relies on sizeof(guest GPR) == sizeof(void*) == sizeof(int)
KVM vs "PR" KVM:
KVM
  • Exploits HW virtualization facilities
  • 970 in “non-Apple” mode, POWER, FSL
  • Best performances
  • Requires bare metal access -> No underlying hypervisor
"PR" KVM
  • Runs the guest with user priviledges
  • Emulation of most priviledge instructions
  • Runs on almost everything -> Issues when running under PowerVM -> HV calls caught by pHyp
  • Slower -> Perf improved with paravirt tricks
More about KVM vs "PR" KVM -> 2012-forum-PowerKVM2012.pdf

Mac OS X boots on an AmigaONE X1000 (YouTube video): Image

I have created a MoL/KVM deb package for these following systems:
  • A-EON Live Remix Distribution
  • Lubuntu 12.04
  • Lubuntu 14.10
Download: mol-kvm_0.9.73.0-ubuntu_powerpc.deb

If you want to allow normal accounts to run MoL through startmol script, you have to use dpkg-statoverride:

Code: Select all

sudo dpkg-statoverride --update --add root root 4755 /usr/local/lib/mol/0.9.73/bin/mol 
For other systems you have to compile MoL/KVM self from svn (svn checkout svn://svn.code.sf.net/p/mac-on-linux/code/trunk mac-on-linux-code).

Debian Sid PowerPC with Mac OS X 10.3.4 Panther:

Image

Lubuntu 14.10 PowerPC with Mac OS X 10.4.11:

Image

Network:
  1. MoL needs a tun kernel modul and you will need to install tinyproxy. After that you have to edit the tinyproxy.conf. Put the ip address of your Mac OS X guest to the access list:

    Code: Select all

    Allow 192.168.41.2
  2. If MoL runs, then there is a tun1 network interface. This network interface needs an ip address:

    Code: Select all

    ifconfig tun1 192.168.41.1
  3. In the Mac OS X guest you have to install the MoL driver package or you have to load the MolEnet kernel modul.

    Code: Select all

    sudo kextload MolEnet.kext
  4. Add the ip address to the proxy settings in the system preferences of Mac OS X (System Preferences -> Network -> Built-in Ethernet -> Configure ...-> Proxies -> Web Proxy (HTTP) -> 192.168.41.1:8888
Image

Image

Have a lot of fun with the new Mac-on-Linux/KVM. :-)
User avatar
adespoton
Forum All-Star
Posts: 4274
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: A new Mac-on-Linux version with KVM support is available

Post by adespoton »

Cool! Has anyone attempted to run this on top of qemu?
neozeed
Apple Corer
Posts: 293
Joined: Sun Aug 25, 2013 3:25 am
Location: Hong Kong

Re: A new Mac-on-Linux version with KVM support is available

Post by neozeed »

Whoa, I didn't know MOL was still around, let alone supporting KVM. And that it can run OS X on top of that! Very cool!
don't do today what you can put off until tomorrow.
Post Reply