Running FreeBSD on OS X using xhyve, a port of bhyve
dan.langille.org
dan.langille.org
I wish there was a simpler approach to the hypervisor framework. I normally avoid using any third party software that wants to taint the kernel and third party hypervisors fall into that category. There is parallels desktop lite which can be installed from the App Store but it’s extremely limited (and paywalled) for something that I suspect it’s just a pretty interface to the hypervisor framework.
I've had good experiences with it running linux guests, it took a bit of tweaking to get networking setup, but other than that it's been solid.
Can you point me to the resources you used? Thanks.
time (git clone github.com/mist64/xhyve.git; cd xhyve; make; ./xhyverun.sh) w/ "sudo halt" pasted into the resulting shell: 14.85s
https://gist.github.com/wiredfool/0e1aa099a29f562cdc3ba30c36...
The hard drive images are literally a qemu image for linux kvm that's been qemu-img converted to a raw format, then the kernel and initrd were extracted, and stored in the mac file system. This image was originally on my linux box for a while, before I needed to go mobile on the laptop with it.
ymmv, of course.
Wish I could use it, but the current implementation calls the xgetbv instruction which is not available on my Westemere EP processors.
All MacOS/QEMU needs is PCIE passthrough and you could have an amazing setup with thunderbolt accessories.
It was not a Summer of Code project, there was (is) a company called Veertu that did the work who sold a virtualization product for running Linux and Windows on macOS on the App Store. Because it used Hypervisor.framework, it could be sandboxed and could be on the Mac App Store.
Google forked Veertu's GitHub repo, adding a few bells and whistles for use in their Android emulator.
Finally, the work was merged upstream to QEMU.
However, it makes me so confused that if it is your intention to run something heavy in a consumer-level Operating System. As far as I know, macOS has a newly-added but slowly-performed file system, named APFS. It might be good enough for single disk request but not good for the concurrent requests (like 4; ; ) -- I am not questioning/blaming about the old port design of either xhyve, OS X, or even hardware architecture SCSI, but that's where we can start now.
Anyway, there is a newly-adopted storage technology named NVME emulation which might help a lot in your case -- not only it handles with lots of disk requests at the same time (65535 queues and 65535 commands per queue), but also the architecture makes it possible to program the controller code in software, especially in user world. I don't know all details of NVMe but it works well in my experience -- both of consumer level and enterprise level -- it brings smooth disk latency in the virtual machine even under a very high bandwidth (50Gib transfer in nearly half a minute, can you believe that?). Do you know if it is possible to use NVMe emulation for faster disk access in xhyve and accelerate the PostgreSQL execution natively?
- SCSI: https://en.wikipedia.org/wiki/SCSI - NVME: https://en.wikipedia.org/wiki/NVM_Express
I assume this is to build a development environment. Especially if you're working on a laptop, on a client-server app that needs to talk to a Postgress (or other) database, running the database in a VM so it goes where you go is a pretty common setup.
I have a post-install script I always run that does sudo rm -rf on all the apps I don't like. Has no ill effects in all the years I have been using it, and makes my system feel clean.