article: Running OSX Mavericks under KVM with QEMM


Recommended Posts

 

 

archedraft/jude,

 

Would you be able to to post a short video on youtube, showing how you use your setup ?

 

To get an idea how you switch between os' and how responsive they appear on screen.

 

Hopefully you can accommodate.

 

Thanks in advance !

 

While I do not have an OS X VM in my setup, I have multiple systems configured in a similar fashion.  I'm working on a series of videos along with new website content to help better describe all this and show folks how it works (only so much can be digested easily over text alone).

Link to comment
  • Replies 128
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Trying to run through this (the AMD version) and I'm at a point where the xml validates and saves but when I hit run i just get back "error". Is there anyway to see what the error is? For fun I created that test file and ran qemu from command line and connected and it runs. Seems to be booting up the iso and everything as well just fine. Just can't start it from my xml.

Link to comment

Answering myself here... in the log (/var/log/libvirt) I found

 

2015-04-30 02:58:24.773+0000: 17162: error : qemuBuildCpuModelArgStr:6650 : unsupported configuration: guest and host CPU are not compatible: Host CPU does not provide required features: ssse3

 

Although I'm not sure that's true. And why would it work fine starting from command line?

 

EDIT: This is my proc and it says it has ssse3. I have 2 of them but unraid acts like I only have one. I should check they're both enabled in the bios I guess...

http://www.cpu-world.com/CPUs/K10/AMD-Six-Core%20Opteron%202419%20EE%20-%20OS2419NBS6DGN.html

Link to comment

That guide is relevant and recently updated. If you're copying and pasting and have issues check the single quotes copied right.

 

Any more luck getting your cpu to work? I was reading another forum about this and read that not all AMD CPU's will work even with the extra flags to trick OS X...

Link to comment

That guide is relevant and recently updated. If you're copying and pasting and have issues check the single quotes copied right.

 

Any more luck getting your cpu to work? I was reading another forum about this and read that not all AMD CPU's will work even with the extra flags to trick OS X...

 

Nope. Still not sure what's up. It boots up via the command line and not with the xml. I was poking in my bios and I'm wondering if I'm not enable to enable some AMD-virt features cause I couldn't find it for my HD8ME-2 mobo. The command line I'm running is like:

/usr/bin/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="REDACTED" \
        -kernel /mnt/cache/Mac_Files/chameleon_svn2510_boot \
        -smbios type=2 \
        -device ide-drive,bus=ide.1,drive=MacDVD \
        -drive id=MacDVD,if=none,file=/mnt/cache/Yosemite.iso \
        -device ide-drive,bus=ide.2,drive=MacHDD \
        -drive id=MacHDD,if=none,file=/mnt/cache/kvmStorage/yosemite/Yosemite.img \
        -vga std \
        -vnc 0.0.0.0:15 \

 

edit: words...punctuation...grammar....etc...

Link to comment

Hi everyone,

 

I'm having a little bit of trouble installing OS X Yosemite. I am able to enter load the installer, and partition the virtual disk. When I attempt to install Yosemite, I am presenting with the message:

 

This is not a supported method of installing the operating system.

 

Please run Install OS X 10.10.app that you downloaded from the App Store.

 

Any thoughts?

Link to comment
  • 4 months later...

Great write up! Got it up and working with my AMD build. I've got a HD 6450 as well and passthrough worked without hassle, although I had to change pci.0 to pci.1 or else I'd get a:

 

internal error: early end of file from monitor: possible problem:

2015-09-04T00:08:43.305946Z qemu-system-x86_64: -device ioh3420,bus=pci.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1: Bus 'pci.0' not found

 

Just wondering why I'm having problems passing through my USB crontroller though. The following works well with my Windows 7 VM. Copied the same into the yosemite VM but does not work. Mouse and keywork aren't responding.

 

<hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x00' slot='0x13' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x00' slot='0x13' function='0x2'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </hostdev>

 

Here's my complete xml:

 

<domain type='kvm' id='19' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>OSX-Yosemite-10.10</name>
  <uuid>0ba39646-7ba1-4d41-9602-e2969a3fc26d</uuid>
  <metadata>
    <type>None</type>
  </metadata>
  <memory unit='KiB'>4194304</memory>
  <currentMemory unit='KiB'>4194304</currentMemory>
  <vcpu placement='static'>2</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='0'/>
    <vcpupin vcpu='1' cpuset='1'/>
  </cputune>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-q35-2.3'>hvm</type>
    <kernel>/mnt/cache/appdata/vmdata/yosemite/chameleon_svn2510_boot</kernel>
    <boot dev='cdrom'/>
    <bootmenu enable='yes'/>
  </os>
  <features>
    <acpi/>
  </features>
  <cpu mode='custom' match='exact'>
    <model fallback='allow'>core2duo</model>
  </cpu>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/cache/appdata/vmdata/yosemite/Yosemite.img'/>
      <backingStore/>
      <target dev='hda' bus='sata'/>
      <alias name='sata0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <controller type='usb' index='0'>
      <alias name='usb'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/>
    </controller>
    <controller type='sata' index='0'>
      <alias name='ide'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pcie-root'>
      <alias name='pcie.0'/>
    </controller>
    <controller type='pci' index='1' model='dmi-to-pci-bridge'>
      <alias name='pci.1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/>
    </controller>
    <controller type='pci' index='2' model='pci-bridge'>
      <alias name='pci.2'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:00:20:20'/>
      <source bridge='in0'/>
      <target dev='vnet0'/>
      <model type='e1000-82545em'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0'/>
    </interface>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x00' slot='0x13' function='0x0'/>
      </source>
      <alias name='hostdev0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x00' slot='0x13' function='0x2'/>
      </source>
      <alias name='hostdev1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </hostdev>
    <memballoon model='none'>
      <alias name='balloon0'/>
    </memballoon>
  </devices>
  <seclabel type='none' model='none'/>
  <qemu:commandline>
    <qemu:arg value='-device'/>
    <qemu:arg value='usb-kbd'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='usb-mouse'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='isa-applesmc,osk='/>
    <qemu:arg value='-smbios'/>
    <qemu:arg value='type=2'/>
    <qemu:arg value='-cpu'/>
    <qemu:arg value='core2duo,vendor=GenuineIntel'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='ioh3420,bus=pci.1,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on'/>
  </qemu:commandline>
</domain>

 

Don't think this is relevant, as I think I see this as well on the Windows 7 VM.

 

2015-09-04T00:07:34.973386Z qemu-system-x86_64: vfio: Cannot reset device 0000:00:13.0, no available reset mechanism.
2015-09-04T00:07:34.995209Z qemu-system-x86_64: vfio: Cannot reset device 0000:00:13.0, no available reset mechanism.

 

Probably related to the PCIRootUID 1 thing, correct? Not sure what has to be changed above.

Link to comment

Well you have three choices:

1. Pass through a USB controller.

2. Remove this line <key>PCIRootUID</key> <string>1</string> in the org.chameleon.boot.plist. (without this you will not be able to log into the Mac App Store). This should let your mouse and keyboard work.

3. Figure out an awesome way to just pass through a USB device that I haven't thought of. Honestly I didn't try too hard so I bet it's possible if your willing to google around. I just said meh and passed through an USB controller.

 

p.s. If you happen to figure out #3 please share your results

Link to comment

Well, I can't seem to pass in the USB controller with the same hostdev block that works fine in my the Windows VM. Not sure why. I'll look at your USB passthrough guide, I was using jonp's sticky "Simpler / Easier PCI Device Pass Through for NON-GPUs".

 

However, the following does work for me, passing the USB device.

 

<hostdev mode='subsystem' type='usb' managed='yes'>
      <source>
        <vendor id='0x046d'/>
        <product id='0xc52b'/>
        <address bus='11' device='2'/>
      </source>
      <alias name='hostdev0'/>
    </hostdev>

 

Although, I do see a "USB Hi-Speed Bus" deivce in the hardware page for the yosemite vm. So it see the controller but just not the keyboard and mouse connected to it...

 

EDIT:

 

The vfio-bind method seems to sort of work, the mouse moves albeit very slow / stutters...

Link to comment

I am trying to get this working.  I get the initial Mac installer screens, but then I find that the mouse does not seem to respond although the keyboard is OK.  I have the mouse cursor stuck in the upper left of the VNC window.    Is there anything special I need to do to get the mouse working over VNC with an OSX VM?  I am remote to the unRAID server so a physical USB mouse plugged directly into the unRAID server is not really practical.

 

Any ideas?

Link to comment

Have you tried using tightVNC? Both my keyboard and mouse worked with either vnc so if tightVNC doesn't work maybe try a different mouse?

I am using UltraVNC.    It is only with the OSX VM that the mouse is not working - with my Windows and Linux VM's it is working fine.  Having said that I guess it would do no harm to try tightVNC instead.

 

EDIT:  TightVNC is giving me the same results.

Link to comment

 

I am remote to the unRAID server so a physical USB mouse plugged directly into the unRAID server is not really practical.

 

Would you describe what you mean by this? Are you using a VPN to connect to your VMs?

No - just the local LAN.    The unRAID server is away from my main PC and screen so I want to use VNC (or an equivalent). 

 

If you look at the attached screenshot then you will see that the OSX mouse pointer is at the top-left of the VNC window.  It stays there and I cannot get it to follow the 'local' mouse pointer in VNC as I can with Windows and Linux VMs. 

 

The Virtual disk for the  VM in question was originally created in VirtualBox on my main PC running Windows 8.1, and there the mouse pointer at the OSX level DOES follow the mouse pointer on the PC.  I also get the same results if I start with an empty virtual disk and run the OSX installer - but there the problem happens when the installer switches to graphical mode so I cannot get to the menu to run Disk Utility to initialise the virtual disk.

 

OSX.jpg.0c6cf7f2b458bd555f257eb3f745d290.jpg

Link to comment

The Virtual disk for the  VM in question was originally created in VirtualBox on my main PC running Windows 8.1, and there the mouse pointer at the OSX level DOES follow the mouse pointer on the PC.  I also get the same results if I start with an empty virtual disk and run the OSX installer - but there the problem happens when the installer switches to graphical mode so I cannot get to the menu to run Disk Utility to initialise the virtual disk.

 

So if you follow my guide you get to Step 04, #6 and then at that point once the OS X VM switches to graphical mode you cannot move the mouse at all in your VNC session correct? What happens if you try and use unRAID's built in VNC window? What I may need you to do is at Step 04, #5 boot with the "-v" flag and record what the output is. Did you follow all the Steps 01 thru 04?

Link to comment

The Virtual disk for the  VM in question was originally created in VirtualBox on my main PC running Windows 8.1, and there the mouse pointer at the OSX level DOES follow the mouse pointer on the PC.  I also get the same results if I start with an empty virtual disk and run the OSX installer - but there the problem happens when the installer switches to graphical mode so I cannot get to the menu to run Disk Utility to initialise the virtual disk.

 

So if you follow my guide you get to Step 04, #6 and then at that point once the OS X VM switches to graphical mode you cannot move the mouse at all in your VNC session correct? What happens if you try and use unRAID's built in VNC window? What I may need you to do is at Step 04, #5 boot with the "-v" flag and record what the output is. Did you follow all the Steps 01 thru 04?

Yes - it as step 4.6 that I cannot get the mouse to operate.

 

I do not use the built in VNC remote as for some reason I get no output until I get the 4.6 or later.  In other words it does not seem to be working to give me the boot screen.  If use a VNC client that is not browser based the I do get the CD boot screen

 

I have tried running with -v but spotted no useful output.  At the point things go wrong since the system has switched to graphical mode there is no longer any visibility of the -v output.    I do not know if there is a way to capture that output?

Link to comment

Here are some boot flags you may want to try and see what happens:

http://www.macbreaker.com/2012/01/list-of-common-hackintosh-boot-flags_29.html

 

I would try the following and see what happens:

PCIRootUID=1

PCIRootUID=0

GraphicsEnabler=No

GraphicsEnabler=Yes

Tried all those to no  avail.

 

Since I see to be able to get into OSX if running on under VirtualBox on my PC I think I should perhaps there try the steps identified in 4.11 to get Mouse absolute positioning working?  I can then bring the virtual disk from there across to my KVM VM and see if I now have the mouse working?

 

I have a friend who is a Mac expert and who also has experience with getting Hackintosh's to work.  I am going to try and work with to see if he can see what might be the problem.  Unfortunately he is on holiday for the next week so I cannot get his input until he gets back.

 

I think perhaps the combination of having an AMD processor, and an inability to do hardware passthru (no IOMMU support) may be adding to the complexities that I am experiencing.

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.