7 ms·
QEMU 6.2
- duskwuff 5y agoThe main interesting bit (to me, at least) is: * On macOS hosts with Apple Silicon CPUs we now support the 'hvf' accelerator for running AArch64 guests
- PikachuEXE 5y agoOnly for AArch64 guests though So not so interesting for me https://wiki.qemu.org/Features/HVF https://wiki.qemu.org/Features/HVF
- duskwuff 5y agoWell, yes. HVF (Hypervisor.framework) passes through to the native CPU, which can't run code for other architectures.
- qalmakka 5y agoUnless Apple implements some kind of support for the x86 ISA in its CPUs (which is unrealistic), hvf will always only support arm and aarch64 guests. Running a non-native architecture requires emulation, which will always be slower than just running a guest on the native CPU.
- vbezhenar 5y agoRosetta emulates x86 quite fast. I think that it's matter of engineering effort required to implement that emulation on a VM level.
- djxfade 5y agoRosetta recompiles ahead of time. That's why it's so fast. Would probably not be possible with a full VM
- qalmakka 5y agoThis, exactly. Rosetta 2 emulates x86_64 Darwin binaries on AArch64 Darwin - it means that tricks like jumping to native code as soon as possible are feasible. For instance, you can call a native counterpart of a system library instead of emulating it down to the syscall level, and generate native code that calls into that. Running kernel level code requires you to emulate an entire machine, which is way more complicated than just emulating the userland like Rosetta does. Running an unmodified OS kernel requires emulation of stuff like interrupts, firmware, peripherals ... Yes, you can dynamically JIT compile some codepaths into native code, which is something that AFAIK most emulator already do, but there's still a much higher performance cap than with something like Rosetta or Wine.
- tinus_hn 5y agoThis would definitely be possible with a full VM, it’s what VMware did before hardware accelerated virtualization became a thing. It’s just more difficult and less efficient than accelerated virtualization.
- yjftsjthsd-h 5y agoWell no, you can't use the native virtualization on a different architecture. You should be able to use TCG acceleration, though.
- MuffinFlavored 5y agoIs Windows 10 ARM64 or AArch64?
- duskwuff 5y agoBoth names refer to essentially the same thing. (Much like "x86_64" vs. "amd64".)
- rubatuga 5y agoQEMU 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?
- 5y ago
- miles 5y agoPowerPC versions of Mac OS X run well under QEMU/UTM and Apple silicon. Cobbled together this guide using Tiger as the guest: https://tinyapps.org/docs/tiger-on-m1.html https://tinyapps.org/docs/tiger-on-m1.html . More than performant enough for running OED[1] and MPEG Streamclip[2], two old favorites. [1] https://global.oup.com/academic/help/technical-support/cdroms/oed2v4_0/?lang=en&cc=na https://global.oup.com/academic/help/technical-support/cdrom... [2] http://www.squared5.com http://www.squared5.com
- anatoly 5y agoI'd love to understand virtualization/emulation better, on the technical level. If I understand correctly, in modern CPUs it's all done with the help of specialized support in the instruction set, but I've never learned in depth - how that works - how it differs between Intel/AMD/ARM - whether there are competing approaches - what are the main software project "players" in the field - which of them are open-source with humanly understandable source code Is there a summary/tutorial about all this stuff someone could recommend (or write)?
- krylon 5y agoI know next to nothing about hardware / instruction set support from the CPU side, but there are several hypervisors who are open source and thus available for study: Qemu itself, Xen, Linux KVM, FreeBSD's bhyve, OpenBSD's vmm. Oh, and there's VirtualBox. I vaguely recall someone telling me that the qemu source code is fairly readable, but I have not looked at any of these myself, so consider it hearsay. I don't know about the others, but the FreeBSD developers have a separate mailing list for discussion of virtualization, https://lists.freebsd.org/subscription/freebsd-virtualization https://lists.freebsd.org/subscription/freebsd-virtualizatio...
- q3k 5y ago> I vaguely recall someone telling me that the qemu source code is fairly readable [...] That someone was either pranking you or knows a mysterious part of the qemu codebase that's unlike the rest of the criminally underdocumented qemu soup. Or my standards are too high.
- krylon 5y agoThat person might have been sarcastic, I've been known to miss that, especially in written conversations. I also might misrember.
- pas 5y agoThe source is okay, the problem is that there's really no docs/examples for even the basic stuff. Do you want to boot from a virtual block device and PXE from a network drive ... well, maybe these 300 command line arguments in some random order will work. Eventually. Have fun. So reading the source is a big help in that. But it's not ideal. And libvirt/oVirt/etc are helpful, but not for just that quick and dirty "let's try something out with the linux kernel in qemu" thing.
- jillesvangurp 5y agoNice, I've been using qemu on my mac as am alternative to docker. I run arch linux in a vm with docker installed and an ssh daemon running on port 2222. On my mac, I simply point docker cli to use the vm by setting DOCKER_HOST=ssh://jilles@localhost:2222 Works great and it cut me loose from docker for mac. The networking was a bit of a pain in the ass to get going until I figured out that it basically does not work without libvirt installed as well. Basically none of the networking options do anything until you do that (I've tried them all).
- lovelyviking 5y ago> Basically none of the networking options do anything until you do that (I've tried them all). Can you share more? Is it completely impossible to make networking function in vm let's say debian x86 vm running on mac m1 without libvirt or it's very hard to configure?
- regularfry 5y agoHow are you doing volume mounts? That's where I tend to come unstuck.
- apatheticonion 5y agoI run Debian in a VM, use ssh and VSCode SSH tools to do work within the VM. Compilation, docker, everything happens in the VM and my MacOS host is just a thin client that hosts my code editor and browser. VSCode will automatically forward ports, but I prefer to manually manage port forwarding using `-L` and `-R` ssh arguments.
- lovelyviking 5y ago>I run Debian in a VM, use ssh Can you share how you configure networking for your Debian in a VM? Is it different for qemu running on mac m1 silicon?
- jillesvangurp 5y agoDon't tend to use those for development. But I imagine they would end up mounting directories inside the vm. You could get to those via scp or something like that.
- foft 5y agoGreat news, QEMU is really great. Will have to give this a spin on the MiSTer again. I was experimenting with emulating the 68K in qemu in combination with FPGA reimplementation of the Amiga chipset. I ran into performance issues with the way AmigaOS manages memory, where stack and code can be in the same page. Qemu seems very inefficient in that case since it constantly invalidates the translated code I think, I wonder if that aspect has been improved at all.
- Chris2048 5y agoMiSTer - an FPGA gaming board: https://www.polygon.com/22640171/mister-project-classic-gaming-retro-fpga-board-chip-io-explainer-usb-hub https://www.polygon.com/22640171/mister-project-classic-gami...