Mini HOWTO: Running Mac OS X 10.9 under Proxmox 3.3

375gnu

New Member
Jun 17, 2014
17
0
1
Today I succeed to run Mac OS X 10.9.2 under Proxmox 3.3.
  • You need Intel Core2Duo or later Intel's CPU.
  • Read carefully this post. I won't explain things explained there.
  • Install OSX into virtual hdd as described in link above, and copy file with hdd image to proxmox server.
  • Create new VM with options:
    • OS type: other
    • Harddisk: IDE
    • CPU: 1 socket, 1 core, type: core2duo
    • Ethernet: virtio
    • Use tablet for pointer: no (optional)
  • Open VM config in editor and do the following:
    • Remove option smbios1.
    • Add option args (in one line):
      Code:
       args: -device ahci,id=ide -device isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" -kernel /var/lib/vz/images/122/chameleon_svn2360_boot -smbios type=2 -readconfig /usr/share/qemu-server/pve-q35.cfg -device usb-mouse,id=mouse,bus=ehci.0,port=2 -device usb-kbd,id=keyboard,bus=ehci.0,port=3 -machine q35
A bit of explanations:
  • To run OSX without additional patches for qemu or linux we need Proxmox 3.3 because it has qemu 2.1 and appropriately patched kernel, both 2.6.32-32 or 3.10 are okay.
  • You may try to run OSX it on AMD which supports all SSE instruction sets, but you need to find the way to set CPU suboption vendor=GenuineIntel.
  • USB tablet is not supported by OSX, neither PS/2 mouse nor PS/2 keyboard, so you need to tell kvm to emulate usb mouse and keyboard.
  • Don't set machine type to q35 in web gui, because PVE will path option -readconfig after options defined in args, but we need usb bus defined before definition of usb mouse and keyboard, so I use workaround with setting -machine and -readconfig in args.
  • If you wan't to install OSX under Proxmox, not on you local machine you should define CD in args, not in web gui, because chameleon dislikes ide-cdrom. Use the definition from link above.
  • I'm unable to run it on SMP/multicore machine, kernel locks with message that it can't initialize CPU1, need to dig dipper.
I hope this will be usefull not only for me.
 
It's started, but I can't say anything whether it runs normally or not, because I don't use it for something useful yet. It sh'ld be jenkins node in future.
 
First off thanks a ton for this! Been trying to figure it out how to do this for a few weeks. Got everything up and running, except for the network interface. Did yours work right off using virtio? Tried virtio and e1000 both show up in the vm, just act like the cable isn't connected. Tried adding:
-netdev user,id=hub0port0 -device e1000-82545em,netdev=hub0port0,id=mac_vnet0
which seemed to work, just nat instead of bridged. Not familiar enough with proxmox / kvm. Still digging. Any ideas?


[edit] Got it! http://blog.definedcode.com/osx-qemu-kvm mentions a driver that you need to install for virtio. So I used the method I list above. Download and install the driver then remove that config and add a virtio interface.

Also as a note had to change the display to a standard vga display so I could vnc directly into the vm. The mouse positioning is off when connecting through qemu's vnc. But works perfectly connecting to mac directly.

Surely there is something we can do to get more then a single core. Right? Like maybe a kext we can load? Weird that can just specify -smp 4 with qemu and it works, but specifying 4 sockets or 4 cores does not. Neither does adding -smp 4 to the args.
 
Last edited:
Hello all,

I know this is a bit of an old(ish) thread but it's probably worth adding some notes on here with the progress I made:

- I have managed to work around the 1 vCPU limitation by installing Chimera on my box and removing the "-kernel" option from my qemu config. This appears to allow me to use all 8 cores of my physical box on the Mac VM which is great! I also added "-smp 8" to my config but this may not be needed. Install Chimera *while* booting from the config in the original post, then simply remove the "-kernel" option to allow Chimera to boot natively without KVM stepping in and providing a "kernel" (i.e. bootloader.) This will also mean you can keep up-to-date with improvements and should, in theory at least, mean upgrading to Yosemite is a possibility. I will hack around with this as time permits and see if I can get that working.

- I managed to get the mac to automatically boot by creating a file at /Extra/org.chameleon.Boot.plist with the following content:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Timeout</key>
<string>5</string>
<key>EthernetBuiltIn</key>
<string>Yes</string>
<key>PCIRootUID</key>
<string>1</string>
</dict>

- Switching output in Proxmox to VGA as someone noted above is extremely important for remote VNC - otherwise you just get purple garbage on the screen.

- You *can* bump the RAM up if you need to - there is no limit at 2G thankfully.

Hopefully this helps some folks.
 
Hello all,

I know this is a bit of an old(ish) thread but it's probably worth adding some notes on here with the progress I made:

- I have managed to work around the 1 vCPU limitation by installing Chimera on my box and removing the "-kernel" option from my qemu config. This appears to allow me to use all 8 cores of my physical box on the Mac VM which is great! I also added "-smp 8" to my config but this may not be needed. Install Chimera *while* booting from the config in the original post, then simply remove the "-kernel" option to allow Chimera to boot natively without KVM stepping in and providing a "kernel" (i.e. bootloader.) This will also mean you can keep up-to-date with improvements and should, in theory at least, mean upgrading to Yosemite is a possibility. I will hack around with this as time permits and see if I can get that working.

- I managed to get the mac to automatically boot by creating a file at /Extra/org.chameleon.Boot.plist with the following content:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Timeout</key>
<string>5</string>
<key>EthernetBuiltIn</key>
<string>Yes</string>
<key>PCIRootUID</key>
<string>1</string>
</dict>

- Switching output in Proxmox to VGA as someone noted above is extremely important for remote VNC - otherwise you just get purple garbage on the screen.

- You *can* bump the RAM up if you need to - there is no limit at 2G thankfully.

Hopefully this helps some folks.

This is great! Thanks for this.

Did you leave the cpu type as core2duo when bumping up the cpu cores? I installed chimera inside the vm, along with the autostart, bumped it up to just 2 cores with -smp 2. Failed to start.
Failed to start CPU 01, rebooting...
CPU halted
Going to play with some other cpu variations
 
Last edited:
Hi all.Could you make a backup by proxmox of osx vm and upload it somewhere.Just cant make it install,may be restore from working backup would be a option.Just upload it and restore like template.
 
I dont think that proxmox can be responsible for anything we run on on Proxmox. It's in the responsibility of the owner of a proxmox System to comply with the according license agreement.

If it comes to running a virtual OSX, I understood that Apple has changed their licensing agreement in regards to virtualization. Otherwise Vmware would not support it. the information I found in the web and in the vmware knowledge base are misleading. on one side, Vmware shows me how to install OSX in a VM on the other side I read something, that the Hardware must be "Appple Labeled" and/or the host system must be running on OSX as well. I guess there is a difference between running OSX "desktop" and OSX "Server" as Virtual Machines.

though: Running it on HP hardware would likely be a violation of the license.
 
I think this forum is for technical questions,not lawyer info. Going through howto - got cycled reboot at proxmox vm. Just don't wont to build up vmware for this task. Maybe an empty backup without hdd image would be acceptable. Import,restore,and install it by yourself.


Отправлено с моего iPhone используя Tapatalk
 
The point is that Proxmox cannot be a source for links to Apple's intellectual property being distributed against Apple's licensing. We can talk hypotheticals about running Proxmox VE on Apple hardware all day long without running aground of licensing issues because that doesn't involve distributing any software.
 
Hi,

I've been testing MacOSX 10.8.5 on Proxmox 3.2 testing with kernel 3.10 since august and it works fine. I use many cores and it seem to work fine. We have 3 proxmox nodes on Apple Hardware (MacPro 3.1 and mac mini) so we are respecting Apple's EULA cause we're virtualizing OSX on Apple Hardware.

I'll give a sample configuration of a VM.

I've tried to run also a 10.9 Mavericks and it works, but i've not worked much with it. I remember i had to use the virtio net drivers.
 
Here is a sample conf:

args: -machine q35 -netdev user,id=hub0port0 -device isa-applesmc,osk=PLEASE_REPLACE_WITH_YOUR_OSX_KEY -kernel /mnt/pve/ISOProxmox/template/bootloader/chameleon_svn2360_b
oot -smbios type=2 -usb -device usb-kbd -device usb-mouse
bootdisk: ide0
cores: 4
cpu: core2duo
ide0: KVMProxmox:135/vm-135-disk-1.qcow2,format=qcow2,size=18G
keyboard: es
machine: q35
memory: 4096
name: test-osx10-8-5
net0: e1000=96:D2:08:D9:A6:4A,bridge=vmbr0
onboot: 1
ostype: other
smbios1: uuid=51da4be0-bc14-4a1f-a59c-1f164a447693
sockets: 1
tablet: 0
vga: std
 
I've also needed to change the file /usr/share/qemu-server/pve-q35.cfg, to be able to boot the VM on proxmox. I first installed the VM following the Gabriel L. Somlo procedure from http://www.contrib.andrew.cmu.edu/~somlo/OSXKVM/ using kvm directly on a Debian Machine, after that I managed to start it on Proxmox using the configuration file posted above.

I post my pve-q35.cfg. I just commented some lines doing a try/error process, commenting lines while I got errors booting the VM. The result was this file:
#[device "ehci"]
# driver = "ich9-usb-ehci1"
# multifunction = "on"
# bus = "pcie.0"
# addr = "1d.7"

#[device "uhci-1"]
# driver = "ich9-usb-uhci1"
# multifunction = "on"
# bus = "pcie.0"
# addr = "1d.0"
# masterbus = "ehci.0"
# firstport = "0"

#[device "uhci-2"]
# driver = "ich9-usb-uhci2"
# multifunction = "on"
# bus = "pcie.0"
# addr = "1d.1"
# masterbus = "ehci.0"
# firstport = "2"

#[device "uhci-3"]
# driver = "ich9-usb-uhci3"
# multifunction = "on"
# bus = "pcie.0"
# addr = "1d.2"
# masterbus = "ehci.0"
# firstport = "4"

...
(the rest of the file is unmodified)

Another thing I did on my test VM was disabling the "Energy Management" because they seem to have problems with it.

Pending Issues:

- Live migration: We're not able to do Live migration on OSX VMs. We get this message: "migrate' failed - State blocked by non-migratable device '0000:00:1f.2/ich9_ahci'". Doing some search at google I've found that it could be related to use sata devices (but i've avoided them) or with the q35 architecture. Any idea?
- Understand the changes made to the pve-q35.cfg, and avoid modifying it if posible. Any idea?
- Be able to enable the "Energy Management" on the VMs

I'd apreciate your comments on these issues. Thanks.

Manuel Martínez
 
Last edited:
Half-Ogre has a point. While, of course no one should post a link to a complete working OS X VM as that is indeed Apple's intellectual property, and would be piracy. However, what would be very helpful to many of us, would be for someone with the most up to date (10.10 Yosemite, or at least 10.9 Mavericks), running on the newest version of Proxmox (v3.3, or v3.4 even) who has OS X working correctly on their proxmox system, to stop the VM. Make a good, consistent backup of it with vzdump, and THEN decompress the tar file, and delete the actual hard disk image file (replacing it with a zero k marker file showing us the proper filename and relative path), and then recompress, and upload the "VM" for sharing.

At that point the "VM" being linked and shared would not contain OS X, simply "configuration" data, and the rest of us, would be able to simply convert a working instance of OS X from a physical machine, to the proper hard disk image file format place it into the shared VM template, and load it into Proxmox that we have on (of course Apple Hardware).

This could be very helpful. Anyone with a working system willing to volunteer?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!