News for hackers. Stuff that matters.
Re:QEMU 6.2 by rubatuga on Thursday December 16, 2021 @02:10AM (#29575835)
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-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_sav...

Re:QEMU 6.2 by flyinghamster on Thursday December 16, 2021 @10:44AM (#29579328)
> 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.

Re:QEMU 6.2 by pbowyer on Friday December 17, 2021 @03:34AM (#29589485)
I'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.
Re:QEMU 6.2 by pbowyer on Thursday December 16, 2021 @03:41AM (#29576299)
Thanks for that blog post! I downloaded 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.

Re:QEMU 6.2 by throwaway-jim on Thursday December 16, 2021 @07:34AM (#29577508)
I'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.
Re:QEMU 6.2 by NiekvdMaas on Thursday December 16, 2021 @04:23AM (#29576518)
Interesting! I tried to install the Windows 11 ARM preview with it (https://www.microsoft.com/en-us/software-download/windowsins...) but no luck. Do you have a working config with Win11?
Re:QEMU 6.2 by my123 on Thursday December 16, 2021 @10:18AM (#29578984)

    qemu-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.
Re:QEMU 6.2 by tyingq on Thursday December 16, 2021 @09:05AM (#29578197)
I'd be curious to see startup time, performance, etc, vs the more typical way to run docker on MacOS (xhyve).
Re:QEMU 6.2 by veb on Thursday December 16, 2021 @03:08AM (#29576136)
That'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!

Re:QEMU 6.2 by amelius on Thursday December 16, 2021 @04:24AM (#29576526)
Can we also use QEMU to emulate M1 Macs on i86 hardware?
Re:QEMU 6.2 by xvilka on Thursday December 16, 2021 @05:09AM (#29576767)
Probably this fork[1] could be a good starting point.

[1] https://github.com/alephsecurity/xnu-qemu-arm64