In a new development uncovered by Qemu developer Gerd Hoffmann, Apple has apparently added early support for VirtIO and framebuffer graphics in a later Mac OS Mojave release.
These new Mac OS drivers (kexts) include support for stdvga and cirrus vga, to what extent still isn’t clear. What will probably be more interesting for passthrough users, though, is the addition of virtio-blk for disk passthrough and virtio-9p for drive sharing.
In fact runing virtual machines for development is pretty much essential for anything that is non-trival. For Mac developer, this meant a choice of VMWare or Parallels and now you can also use Linux with KVM / QEMU and Clover/OVMF. Here are the high level steps and instructions required to get macOS (OS X) up and running on Ubuntu with KVM / QEMU.
![Mac os 10.12 sierra download Mac os 10.12 sierra download](/uploads/1/1/9/6/119619080/888774304.jpg)
Consider supporting us if you value independent tech news and research. This site will always be free of ads and sponsored content.
![Mysql for mac os x download Mysql for mac os x download](/uploads/1/1/9/6/119619080/759494947.jpg)
- Qemu-img convert BaseSystem.dmg -O raw BaseSystem.img Create a virtual HDD image where macOS will be installed. If you change the name of the disk image from machdd.img to something else, the boot scripts will need to be updated to point to the new image name. Qemu-img create -f qcow2 machddng.img 128G.
- It is the primary OS for Apple’s Mac computers. It is the second most widely used desktop OS, after Microsoft Windows. In this article, we’ll look at how you can run or install macOS on QEMU, accelerated by KVM. For this setup, we’ll use the macOS-Simple-KVM project code available in Github to run macOS on KVM / QEMU. For you to be able.
Mac OS Virtio is Here
In Hoffmann’s testing, both work with a little tweaking. He states that the virtio-blk driver only works in legacy mode, and the 9p share just needs to be mounted.
Clearly further testing is going to be needed to work out best practices and methodology, but it’s an extremely encouraging sign for those using Mac OS VMs daily.
Once we work out exactly how to support these features, it will mean better disk performance and more seamless host-guest communication.
Mac-OS-SimpleKVM maintainer Foxlet observed that this may be due to the re-introduction of rack mount mac pros, which would make perfect sense.
The high-spec models will be more than capable of advanced virtualization, so Apple is probably doing what they can to support that endeavor for customers. It may not be their intention, but this might also vastly improve quality of life for Hackintosh OS X VM users as well.
It’s still early days, so we may very well see increased VirtIO driver support in future releases. Networking might even be on the table. In the meantime, all we can do is wait and hope that new kexts keep rolling in.
We’ll continue covering this as the situation develops, and hopefully have a method for leveraging these changes soon. In the meantime, if any tinkerers want to test VirtIO, please let us know how it goes on our discord or in the comments.
Images Courtesy Gerd Hoffmann
Consider Supporting us on Patreon if you like our work and want a say in what we cover and access to early content. If you need help or have questions about any of our articles, you can find us on our Discord. We provide RSS feeds as well as regular updates on Twitter if you want to be the first to know about the next part in this series or other projects we’re working on.
- 1QEMU on OS X (macOS) hosts
While QEMU's main host platform is Linux, it is also supported on operating systems for Apple's Mac computers (known as OS X or macOS). The official support policy covers the last two released versions of OSX; QEMU might work on older versions, but it is not guaranteed and it might not even compile on older versions.
Please note that fewer developers work on QEMU for Mac hosts, so it might be less stable (but I don't think it is). If you can replicate a bug on a Linux hosted QEMU before reporting it, this is helpful as it means a wider set of people might look into it.
Some system emulations on Linux use KVM, a special emulation mode which claims to reach nearly native speed.KVM is mainly used for x86 (32 and 64 bit) emulation on x86 hosts running Linux. Should you want to run Qemu with KVM support on a G5, depending on your distribution, you might have to compile your own kernel with KVM support.There exists a port of QEMU to Hypervisor.framework (a kernel module from Apple which is similar in spirit to KVM), but unfortunately it is not included in upstream QEMU.
Building QEMU for OS X
The system requirements are:
- One of the last two most recent versions of OS X (currently that's 10.13 or 10.14)
- The clang compiler shipped with the version of Xcode for that OS X. GCC might also work, but we recommend clang
Additional build requirements are:
You may find it easiest to get these from a third-party packagersuch as Homebrew, Macports, or Fink.
After downloading the QEMU source code, double-click it to expand it.
Then configure and make QEMU. The target-list option is used to build only the machine or machines you want. If you don't specify it, all machines would be built. Probably not what you want.
This way doesn't require you to wait for the configure command to complete:
If your system has the 'say' command, you can use it to tell you when QEMU is done
You can use './configure --help' to see a full list of options.
Here are all the currently available machines:
- aarch64-softmmu
- alpha-softmmu
- arm-softmmu
- cris-softmmu
- i386-softmmu
- lm32-softmmu
- m68k-softmmu
- microblaze-softmmu
- microblazeel-softmmu
- mips-softmmu
- mips64-softmmu
- mips64el-softmmu
- mipsel-softmmu
- moxie-softmmu
- or32-softmmu
- ppc-softmmu
- ppc64-softmmu
- ppcemb-softmmu
- s390x-softmmu
- sh4-softmmu
- sh4eb-softmmu
- sparc-softmmu
- sparc64-softmmu
- tricore-softmmu
- unicore32-softmmu
- x86_64-softmmu
- xtensa-softmmu
- xtensaeb-softmmu
We recommend building QEMU with the -default compiler provided by Apple, for your version of Mac OS X (which will be 'clang'). The configure script will automatically pick this.
Errors on old compilers
Note: If after the configure step you see a message like this:
you may have to install your own version of gcc. You can build it from source (expect that to take several hours) or obtain third party binaries of gcc available from Homebrew or MacPorts.
You can have several versions of GCC on your system. To specify a certain version, use the --cc and --cxx options.
Build with LLVM/Clang 7
If you need to compile with newer versions of clang (to get f.i. AVX/AVX2 support), you can install llvm through e.g., brew.
Note that building for machines with CPUs supporting such extensions will exclude running your binary on earlier machines.
Run Mac Os On Qemu
Compile with:
Contacts
If there are any issues with this web page, please let me know.
Qemu For Mac Os 10.10
Retrieved from 'https://wiki.qemu.org/index.php?title=Hosts/Mac&oldid=9274'