3 ms·
QEMU 6.2 introduces full hypervisor support for M1 Macs. I've installed ARM Ubuntu Server in a VM on my MacBook, and wrote a blog post explaining it. It uses li
by rubatuga 5y ago
QEMU 6.2 introduces full hypervisor support for M1 Macs. I've installed ARM Ubuntu Server in a VM on my MacBook, and wrote a blog post explaining it. It uses libvirt to start the VM in headless mode.
https://www.naut.ca/blog/2021/12/09/arm64-vm-on-macos-with-libvirt-qemu/ https://www.naut.ca/blog/2021/12/09/arm64-vm-on-macos-with-l...
And this is the script to force QEMU to run on the M1 efficiency cores to save battery life:
https://github.com/yoonsikp/vm_configs/blob/master/power_save.sh https://github.com/yoonsikp/vm_configs/blob/master/power_sav...
- veb 5y agoThat's really neat stuff, thank you for writing that article. I'm going to give it a go :-) If you hadn't, I probably wouldn't have had any reason to try it!
- pbowyer 5y agoThanks for that blog post! I downloaded https://mac.getutm.app/ https://mac.getutm.app/ a couple of weeks ago but haven't used it yet - this sounds similar but a more automated way to do what you do? Coming from Windows, Vagrant & Virtualbox to a M1 Mac I'm looking to find an easy way to manage multiple VMs for developing different projects.
- throwaway-jim 5y agoI'm using utm to run a ubuntu server that where I do all my dev work. Since it is a vm I am a lot less scared of messing up my main system. It is very convenient with vscode remote, which only needed to be configured once and will automatically connect to the vm.
- NiekvdMaas 5y agoInteresting! I tried to install the Windows 11 ARM preview with it (https://www.microsoft.com/en-us/software-download/windowsinsiderpreviewARM64 https://www.microsoft.com/en-us/software-download/windowsins...) but no luck. Do you have a working config with Win11?
- my123 5y agoqemu-system-aarch64 -M virt,accel=hvf -smp cores=2 -m 4G -cpu host -bios ../QEMU_EFI.fd -device ramfb -device nec-usb-xhci -device usb-kbd -device usb-tablet -drive if=none,file=Windows.vhdx,id=windows -device nvme,serial=1234,drive=windows And for networking, use the virtio drivers for Windows, after installing those, you can remove usb and switch to -device virtio-keyboard -device virtio-tablet for input too.
- amelius 5y agoCan we also use QEMU to emulate M1 Macs on i86 hardware?
- xvilka 5y agoProbably this fork[1] could be a good starting point. [1] https://github.com/alephsecurity/xnu-qemu-arm64 https://github.com/alephsecurity/xnu-qemu-arm64
- tyingq 5y agoI'd be curious to see startup time, performance, etc, vs the more typical way to run docker on MacOS (xhyve).
- flyinghamster 5y ago> It uses libvirt to start the VM in headless mode. So then, I could be running virt-manager and manage VMs on an M1? That would slide nicely into my existing virt-manager usage. But, not with a soldered-in SSD. I tend to keep machines running a LONG time, and I'd hate to pitch an otherwise perfectly-good machine because the SSD wore out and couldn't be replaced. The "expensive disposable" situation with cell phones is bad enough, let's not have this in our PCs as well. As a counterpoint, the only SSDs I've ever had fail on me were some early OCZ units (big surprise), but I still check the SMART data on drives I'm using and see the wear indicators slowly advancing. I keep stuff backed up on ZFS spinning rust.
- pbowyer 5y agoI'm sure Apple will introduce a good "SSD Replacement" program when they wear out. We'll be without our machines for a few weeks, it'll cost $200 more than it should - but they will find a way to replace them and stop everyone complaining.