Mini HOWTO: Running Mac OS X 10.9 under Proxmox 3.3

You can't set the network interface model from the Proxmox web GUI, you have to manually edit your vm file config and change the network interface settings

net0: e1000-82545em=32:65:65:65:33:33,bridge=vmbr1

The important thing is to use " e1000-82545em". From Mavericks until now you can't use the e1000.

After changing the config file, just reboot and "El Capitan" will recognize your network interface card.

Regards,

Manuel Martínez
 
Hi folks,
I need help about configuring VM.
Actually, I can't get the OSK key, and now I don't know, am I searching correctly for that very important string. So, when I compile code from this page (Figure 1), on my macbookpro (Yosemite) I get this message: ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc
And when try with this code, I get this error: error: sys/io.h: No such file or directory

So, I'll be very grateful if you can help me with some closer explanation a bout this.

Thank you :)
 
That's the string you need. The error is a compilation error saying the compiler can't find that file. You got one of them to work, that's all you need.
 
our hard work by these words guarded please dont steal - really? It's the same string on any machine? On my friends macbook is the same, and it's different hardware configuration, and running on El Capitan.
 
Yes. Always the same. It's not really a key, they are relying on copyright to protect it.
 
Just to give my steps for running an OSX 10.11.3 on Proxmox 4.1 based on that excellent post as well as this thread here.

  1. Follow EXACTLY the steps 1 (without point 7). If like me you want to have a more up-to-date version of the "create_osx_install_iso.sh" by using the one from Github, don't do it. For El Capitan, the script does not embed the kernel into the iso in System/Library/Kernels/ and so you will get an error at boot time. Just use the given script from the zip file and don't forget to put both the script and Kernels directory onto your Desktop (yes the Desktop path is hardcoded in the script). If you don't trust the Kernels from the zip file, go at the end of the howto to see how to extract it from your OSX using Pacifist. That's it for the ISO installer.
  2. I created a working OSX VM on my personnal machine and then pushed it on Proxmox. I guess it should be possible to do all the OSX install things directly on Proxmox server.
    Create an empty disk
    Code:
    qemu-img create -f qcow2 ElCapitan.qcow2 32G
    Then start Qemu with the following command line:
    Code:
    qemu-system-x86_64 -enable-kvm -m 2048 -cpu core2duo,vendor=GenuineIntel -machine q35 -usb -device usb-kbd -device usb-mouse -device isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" -kernel ./Mac\ Files/2.\ Bootloader/enoch_rev2795_boot -smbios type=2 -device ide-drive,bus=ide.2,drive=MacHDD -drive id=MacHDD,if=none,file=./ElCapitan.qcow2 -netdev user,id=hub0port0 -device e1000-82545em,netdev=hub0port0,id=mac_vnet0  -device ide-drive,bus=ide.0,drive=MacDVD -drive id=MacDVD,if=none,snapshot=on,file=./Install_OS_X_10.11.3_El_Capitan.iso
    For OSK key, you can run the smc_read binary from here to obtain the "key".
  3. Follow step 4, point 5,6,7,8,9,10,11,12
  4. On Proxmox, I cannot have a really working mouse through VNC. So, I installed the following driver for usb-tablet.
  5. Shutdown the VM, create a new VM on Proxmox and remember the number (103 for example)
    1. OS type: other
    2. Harddisk: IDE
    3. CPU: 1 socket, 1 core, type: core2duo
    4. Ethernet: virtio
    5. Use tablet for pointer: yes
  6. Then copy your qcow2 file into Proxmox server directory ( /var/lib/vz/images/103/vm-103-disk-1.qcow2) with respect to the naming convention.
  7. Copy the bootloader as well into /var/lib/vz/images/103/enoch_rev2795_boot
  8. Edit the config file (/etc/pve/qemu-server/103.conf):
    Code:
    args: -device isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" -kernel /var/lib/vz/images/103/enoch_rev2795_boot -smbios type=2 -device ich9-usb-ehci1,addr=1d.7,bus=pcie.0,id=ehci -device usb-kbd,id=keyboard,bus=ehci.0,port=3
    
    bootdisk: ide0
    cores: 1
    cpu: core2duo
    ide0: local:103/vm-103-disk-1.qcow2,size=32G
    ide2: none,media=cdrom
    machine: q35
    memory: 4096
    name: OSX
    net0: e1000-82545em=62:35:63:30:30:65,bridge=vmbr0
    numa: 0
    ostype: other
    sockets: 1
    vga: std
    tablet: 1
  9. Edit q35 config file (/usr/share/qemu-server/pve-q35.cfg) and comment only the first 5 lines (ehci device).
  10. Dont forget the magic msr tricks
    Code:
    echo "Y" > /sys/module/kvm/parameters/ignore_msrs
  11. You should be able to start the OSX VM from the web interface. In order to have a nearly-working mouse, use VNC in fullscreen mode.


Final note:
The mouse is synchronized (thank's to usb-tablet driver) but still a bit buggy . If I start the VM without tablet and with standard usb-mouse parameter, it works on my personnal computer but not on Proxmox server through web VNC.
 
Last edited:
  • Like
Reactions: sumsum
Hello everybody!

Thanks sigxcpu for you post about VMware Fusion, that was the solution for me.
El Capitan is working fine, except the Resolution and the mouse in the noVNC Console.
The mouse Problem is solved when i acces El Capitan with a remote cliente like nomachine.
But is there a trick or something else about the Resolution, to get it higher than 1024x768?

Best regards,

Roman


EDIT:

Ok, i fix my Problem. The solution is very easy (i dont have an "Extra" Folder in Mac OSx);
I give manually the resolution at the darwin/enoch boot screen with that command:
"Graphics Mode"="WIDTHxHEIGHTxDEPTH"
 
Last edited:
The usual way is to create the /Extra folder in your Mac ;-)

But it's nice to know another way to do it.

Regards
 
Thanks @gagou7 I was able to look at some failed proxmox commands and your correct command to successfully run the following:

/usr/bin/systemd-run --scope --slice qemu --unit 108 -p 'KillMode=none' -p 'CPUShares=1000' /usr/bin/kvm -id 108 -chardev 'socket,id=qmp,path=/var/run/qemu-server/108.qmp,server,nowait' -mon 'chardev=qmp,mode=control' -vnc unix:/var/run/qemu-server/108.vnc,x509,password -pidfile /var/run/qemu-server/108.pid -daemonize -name apple -smp '1,sockets=1,cores=1,maxcpus=1' -nodefaults -boot 'menu=on,strict=on,reboot-timeout=1000' -vga std -cpu core2duo,+kvm_pv_unhalt,+kvm_pv_eoi,enforce,vendor=GenuineIntel -m 4096 -machine q35 -k en-us -usb -device usb-kbd -device usb-mouse -device 'isa-applesmc,osk=ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc' -kernel /var/lib/vz3/images/108/enoch_rev2795_boot -smbios 'type=2' -device ide-drive,bus=ide.2,drive=MacHDD -drive id=MacHDD,if=none,file=/var/lib/vz3/images/108/vm-108-disk-1.qcow2 -netdev user,id=hub0port0 -device e1000-82545em,netdev=hub0port0,id=mac_vnet0 -device ide-drive,bus=ide.0,drive=MacDVD -drive id=MacDVD,if=none,snapshot=on,file=/var/lib/vz/template/iso/Install_OS_X_10.11.2_El_Capitan.iso

and see the El Capitan disk loaded at boot time. I think perhaps the most important differences between the default proxmox command and this command are the kernel/OSX recognized device ids MacHDD MacDVD. I wouldn't call it a simple thing, but it works...
 
Last edited:
I would like to note here that just creating a bootable copy of osx might be one of your goals, however you can also make use of the following links:

https://wiki.archlinux.org/index.php/disk_cloning#Create_disk_image
https://support.apple.com/en-ca/HT201255

and a linux bootable rescue disk, to create a dd image of your current Mac osx drive, transfer this dd image to proxmox and follow all of this documentation, as I gleefully discovered this afternoon. I then booted a new VM by creating a mock configuration like so (note the use of a raw disk):

args: -device isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" -kernel /var/lib/vz/enoch_rev2795_boot -smbios type=2 -usb -device usb-kbd -device usb-mouse
bootdisk: ide0
cores: 1
cpu: core2duo
ide0: otherVolume:109/vm-109-disk-1.raw,size=113G
ide2: local:iso/Install_OS_X_10.11.2_El_Capitan.iso,media=cdrom
machine: q35
memory: 4096
name: appsec
net0: e1000=3A:61:61:33:30:66,bridge=vmbr0
numa: 0
ostype: other
sockets: 1

I then manually started the vm with this command (note again the use of -drive ...,format=raw):

/usr/bin/systemd-run --scope --slice qemu --unit 109 -p 'KillMode=none' -p 'CPUShares=1000' /usr/bin/kvm -id 109 -chardev 'socket,id=qmp,path=/var/run/qemu-server/109.qmp,server,nowait' -mon 'chardev=qmp,mode=control' -vnc unix:/var/run/qemu-server/109.vnc,x509,password -pidfile /var/run/qemu-server/109.pid -daemonize -name apple -smp '1,sockets=1,cores=1,maxcpus=1' -nodefaults -boot 'menu=on,strict=on,reboot-timeout=1000' -vga std -cpu core2duo,+kvm_pv_unhalt,+kvm_pv_eoi,enforce,vendor=GenuineIntel -m 4096 -machine q35 -k en-us -usb -device usb-kbd -device usb-mouse -device 'isa-applesmc,osk=ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc' -kernel /var/lib/vz3/images/108/enoch_rev2795_boot -smbios 'type=2' -device ide-drive,bus=ide.2,drive=MacHDD -drive id=MacHDD,if=none,file=/mnt/otherVolume/vz5/images/109/vm-109-disk-1.raw,format=raw -netdev user,id=hub0port0 -device e1000-82545em,netdev=hub0port0,id=mac_vnet0 -device ide-drive,bus=ide.0,drive=MacDVD -drive id=MacDVD,if=none,snapshot=on,file=/var/lib/vz/template/iso/Install_OS_X_10.11.2_El_Capitan.iso

When successfully started the boot menu will display two options [though the drive labels might vary a bit]:

hd(0,0) (10.11) Install OS X El Capitan
hd(1,3) (10.11) Recovery HD

1. I then selected to Boot with the El Capitan disk and entered the boot arguments:

"KernelBooter_kexts"="Yes" "CsrActiveConfig"="103"

In this way I started the install process and pressed continue, but instead of going any further used Disk Utility menu option, to load Disk Utility and review the original disk (check integrity etc) and rebooted. After reboot something interesting happened, the old drive is now displayed as:

hd(1,3) (10.11) Macintosh HD

2. I then selected to boot from this hard drive (and entered the same boot options), but it fails with:

Can't find boot file '/System/Library/Kernels/kernel'

When the boot screen loads again the drive has now changed back to:

hd(0,3) (10.11) Recovery HD

3. In this third attempt I again selected to Boot with the ElCapitan disk (and entered the same boot options), however this time the system booted from the image file drive as desired. At this point you can transfer anything you like to a newer install and also have the last state of your OSX host virtually available for you when ever you like.

Actually I have found that when you follow this process to startup an old install and shutdown the VM... When you start the vm again you are already at step two. From here follow step two with the boot arguments when selecting "hd(1,3) (10.11) Macintosh HD". As usual this will fail, but in the next attempt you can select "hd(0,0) (10.11) Install OS X El Capitan" without the boot options and your old disk image will be loaded. Likely there is an easier way of performing all of this, but I'm happy for now.
 
Last edited:
Hi guys, me again :)
Still can't boot OSX :/
I use proxmox 4.1, and I'm trying to boot Yosemite.

This is my VM config:

Code:
args: -machine q35  -device isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" -kernel /mnt/r10/images/boot/chameleon_svn2783_boot -smbios type=2 -device ide-drive,bus=ide.1,drive=MacDVD -drive id=MacDVD,if=none,file=/mnt/r10/template/iso/yosemite-10.10.5.iso -readconfig /usr/share/qemu-server/pve-q35.cfg
bootdisk: ide0
cores: 1
cpu: core2duo
ide0: raid10:111/vm-111-disk-1.qcow2,size=32G
memory: 2048
name: yosemite
net0: e1000=32:62:35:36:61:62,bridge=vmbr0
numa: 0
ostype: other
sockets: 1

And when I start machine, first I get selection with one option 'hd(1,0) (10.10) OS X Base System' and when I press enter there is an error: "Can't find boot file: '/System/Library/Kernels/kernel'", to be clear, there are two pictures in attachment.

Do anyone have any advice?
Thank you :)
 

Attachments

  • 02.png
    02.png
    4 KB · Views: 47
  • 01.png
    01.png
    12.7 KB · Views: 45
Hi maxa!

Is on your Destination for the kernel (/mnt/r10 ....) the chameleon_svn2783_boot file? The error means that there is not the file? Try to copy the boot file to e.g. /var/lib/vz/Images/chameleon_svn2783_boot - to be sure there is no problem with your mount.
Or try another boot file, chameleon_svn2795_boot, that works for me.

Best, regards,

Roman
 
Thank you for fast reply KnowVation.
Yes, that is correct location of kernel file. Unfortunately it's the same when I change file location.
Do you have some link for download v2783? I was found only .pkg :/
 
Hey maxa!
you mean v2795 or? I also had the pkg and extract it with pacifist on mac. Maybe per mail.
Did you also edit and uncomment your pve-q35.cfg? in my case only pci.1 and pci.2
Here is my args in the mac config:

args: -device ahci,id=ide -device isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" -kernel /var/lib/vz/images/enoch_rev2795_boot -smbios type=2 -readconfig /usr/share/qemu-server/pve-q35-osx.cfg -device usb-mouse,id=mouse,bus=ehci.0,port=2 -device usb-kbd,id=keyboard,bus=ehci.0,port=3 -machine q35

Best regards,

Roman
 
My mistake - 2795, I'll try with pacifist.
I was try few different combinations and to comment/uncomment different paragraphs in pve-q35.cfg and now it looks like this:

Code:
#[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"

[device "ehci-2"]
  driver = "ich9-usb-ehci2"
  multifunction = "on"
  bus = "pcie.0"
  addr = "1a.7"

[device "uhci-4"]
  driver = "ich9-usb-uhci4"
  multifunction = "on"
  bus = "pcie.0"
  addr = "1a.0"
  masterbus = "ehci-2.0"
  firstport = "0"

[device "uhci-5"]
  driver = "ich9-usb-uhci5"
  multifunction = "on"
  bus = "pcie.0"
  addr = "1a.1"
  masterbus = "ehci-2.0"
  firstport = "2

[device "uhci-6"]
  driver = "ich9-usb-uhci6"
  multifunction = "on"
  bus = "pcie.0"
  addr = "1a.2"
  masterbus = "ehci-2.0"
  firstport = "4"


[device "audio0"]
  driver = "ich9-intel-hda"
  bus = "pcie.0"
  addr = "1b.0"

[device "ich9-pcie-port-1"]
  driver = "ioh3420"
  multifunction = "on"
  bus = "pcie.0"
  addr = "1c.0"
  port = "1"
  chassis = "1"
[device "ich9-pcie-port-2"]
  driver = "ioh3420"
  multifunction = "on"
  bus = "pcie.0"
  addr = "1c.1"
  port = "2"
  chassis = "2"
[device "ich9-pcie-port-3"]
  driver = "ioh3420"
  multifunction = "on"
  bus = "pcie.0"
  addr = "1c.2"
  port = "3"
  chassis = "3"

[device "ich9-pcie-port-4"]
  driver = "ioh3420"
  multifunction = "on"
  bus = "pcie.0"
  addr = "1c.3"
  port = "4"
  chassis = "4"

# Example PCIe switch with two downstream ports

[device "pcie-switch-upstream-port-1"]
  driver = "x3130-upstream"
  bus = "ich9-pcie-port-4"
  addr = "00.0"

[device "pcie-switch-downstream-port-1-1"]
  driver = "xio3130-downstream"
  multifunction = "on"
  bus = "pcie-switch-upstream-port-1"
  addr = "00.0"
  port = "1"
  chassis = "5"
[device "pcie-switch-downstream-port-1-2"]
  driver = "xio3130-downstream"
  multifunction = "on"
  bus = "pcie-switch-upstream-port-1"
  addr = "00.1"
  port = "1"
  chassis = "6"


[device "pcidmi"}
  driver = "i82801b11-bridge"
  bus = "pcie.0"
  addr = "1e.0"
[device "pci.0"]
driver = "pci-bridge"
bus = "pcidmi"
  addr = "1.0"
  chassis_nr = "1"
#[device "pci.1"]
#  driver = "pci-bridge"
#  bus = "pcidmi"
#  addr = "2.0"
#  chassis_nr = "2"
#[device "pci.2"]
#  driver = "pci-bridge"
#  bus = "pcidmi"
#  addr = "3.0"
#  chassis_nr = "3"

Thank you Roman.

Regards,
Maxa
 
Hi Maxa!
Hm, try to uncomment the first four sections in the pve-q35.config file, with my pve-q35-config file it works without Problems.
Here is my MacOSx-VM.conf-file:

Code:
args: -device ahci,id=ide -device isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" -kernel /var/lib/vz/images/enoch_rev2795_boot -smbios type=2 -readconfig /usr/share/qemu-server/pve-q35-osx.cfg -device usb-mouse,id=mouse,bus=ehci.0,port=2 -device usb-kbd,id=keyboard,bus=ehci.0,port=3 -machine q35
boot: ddn
bootdisk: ide0
cores: 4
cpu: core2duo
ide0: CephStorageSSDs:vm-498-disk-1,discard=on,size=40G
memory: 8192
name: ElCapitanTEST
net0: e1000-82545em=36:65:30:39:66:39,bridge=vmbr0
numa: 0
ostype: other
smbios1: uuid=655ae2ba-3b32-4e8b-9552-17b1be71ba1f
sockets: 1
tablet: 1
vga: std

Did you create the mac osx with vmware Fusion and convert it to raw? or did it you on another way?

Best regards,

Roman
 
osx is created on my way :)
I got progress bar with bad graphics but it's better then previous state :) I just changed the kernel, it's funny because I try with four different kernels and nothing, and now I was export boot file from chameleon2795 (kernel) from .pkg and result is in attachment :)
It's pretty slow for now, but I'll try few more things.
Thank you very much for helping me! I'll post here my final result and configuration.
Maxa
 

Attachments

  • 03.png
    03.png
    555.3 KB · Views: 24
Last edited:
Hey everyone! It looks like a lot has happened since I last checked out this thread. Good work everyone.

You know what would be helpful? Rather than having to try to painstakingly re-create the configurations of each other... it would be AWESOME, and I would be VERY grateful, if someone could do the following:


Running the newest/current Proxmox VE version 4.2, setup, configure, and get working the newest/current Mac OS X (El Capitan version 10.11.4) to where everything is working, and it's all ready for use...

and THEN, do a vzdump so that there's a single file that a perfectly working Mac OS X virtual machine can be restored from, so any of us could perform a restore and have a working Mac VM without any trouble.

THEN (very important step!): decompress/untar the backup/dump file, locate the actual hard disk image file (like a vmdk, but I suppose raw or something like that in this case), DELETE the hard disk file, then use /usr/bin/touch to make a placeholder file with the exact same name, permissions, and sitting in place at the exact same filesystem path. (also do this for any restore partition, or OS X installer ISO)

THEN, re-tar/re-compress the dump file and upload it somewhere and share a link with us all here (making note of the exact naming and location/path of that hard disk file).

If someone would do that, it would allow all of us to download the virtual machine dump file, restore it on our system, and then simply swap out the hard disk image file with one that we create ourselves.

This would allow for easy sharing of the virtual machine dump/backup file (as the size should be pretty small after removing the hard disk file), AND by removing the disk image file, the resulting dump file being shared would NOT contain any private/commercial/copyright'ed data that Apple would frown upon us sharing... it would simply be a collection of configuration info describing a virtual machine's specific setup.

I'm guessing a LOT of people would be very grateful. I know I for one certainly would.

Please, please, please. =)
 
  • Like
Reactions: Jero

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!