Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Dt990

macrumors member
Jan 24, 2020
57
28
Oregon
Managed to get OS 9 - 10.4 running in QEMU x86

Thread here:
 

thearm

macrumors newbie
Dec 12, 2020
17
3
I can't not get debian network install to work it gets stuck on a black screen. I am using this image debian-10.7.0-arm64-netinst
 
Last edited:

redcaptrickster

Suspended
Nov 27, 2020
185
351
Only roadblock was getting python@3.9 to install properly, since there's currently one small issue with the formula.
I just avoid their bottles for now. You can install and compile using the -build-from-source flag. That solved a lot of problems for me and many packages will compile for ARM without errors even though they aren't "approved" yet.
 

bill-p

macrumors 68030
Jul 23, 2011
2,929
1,589
I just avoid their bottles for now. You can install and compile using the -build-from-source flag. That solved a lot of problems for me and many packages will compile for ARM without errors even though they aren't "approved" yet.

At the time I wrote that, even -build-from-source didn't work, actually. A fix might have been merged, so it's better now, but things were pretty hairy initially.

I'd expect this situation to continue for at least 6 more months. It seems M1 support isn't high on anyone's list right now.
 

falainber

macrumors 68040
Mar 16, 2016
3,539
4,136
Wild West
At the time I wrote that, even -build-from-source didn't work, actually. A fix might have been merged, so it's better now, but things were pretty hairy initially.

I'd expect this situation to continue for at least 6 more months. It seems M1 support isn't high on anyone's list right now.
Will it ever be? What's the target platform for running the Python apps? Probably not M1/ARM.
 

bill-p

macrumors 68030
Jul 23, 2011
2,929
1,589
Will it ever be? What's the target platform for running the Python apps? Probably not M1/ARM.

Python should technically be platform-agnostic so M1/ARM should not have any problem compiling and running Python.

And I don't think there's anything that makes M1 inherently more special than other ARM CPUs. We do have Linux running on both arm32 and arm64, and a lot of things work just fine there. If you've ever had the chance to try the Raspberry Pi, it's a good platform. The only drawback was that its performance was... just "passable". M1 is in a completely different league when it comes to performance and efficiency.

I do believe everything on Mac will eventually be ported over to work with M1. It's just that in the short term, we'll have to work around a lot of issues to get them to work.
 

kupan787

macrumors member
Sep 17, 2014
54
33
California
So it appears that v6 patches are now out for qemu on M1:


Interestingly, I pulled down the latest qemu sources, applied the patch, but now it appears that the device virtio-gpu is no longer valid. When trying to run with that option:

Code:
qemu-system-aarch64: -device virtio-gpu: 'virtio-gpu' (alias 'virtio-gpu-pci') is not a valid device model name

I wonder if anyone else has given a try with the newer sources?
 
  • Like
Reactions: jdb8167

thearm

macrumors newbie
Dec 12, 2020
17
3
So it appears that v6 patches are now out for qemu on M1:


Interestingly, I pulled down the latest qemu sources, applied the patch, but now it appears that the device virtio-gpu is no longer valid. When trying to run with that option:

Code:
qemu-system-aarch64: -device virtio-gpu: 'virtio-gpu' (alias 'virtio-gpu-pci') is not a valid device model name

I wonder if anyone else has given a try with the newer sources?
does the qemu from brew include qemu patches I noticed that it has the apple silicon bottle now.

 

jdb8167

macrumors 601
Nov 17, 2008
4,859
4,599
does the qemu from brew include qemu patches I noticed that it has the apple silicon bottle now.

That seems new. Did you try to install? I haven't been using Brew, I've been using MacPorts so I don't have a working brew environment right now so I can't test without switching back.
 

lucano66

macrumors newbie
Feb 1, 2021
1
0
Until now... It work, but a lot of PROGRAM (not app... ?) didn't work. I install successful 7zip 64 bit, but when I try to open Microsoft Store it crash. So is difficult to fin ARM64 App... Work in progress... :)
 

ivnj

macrumors 68000
Dec 8, 2006
1,512
100
I downloaded the parallels m1 preview and windows arm preview. All installed fine. except when I clicked on edge browser it said its outdated and to install the latest browser but when I tried to install it it errored.
 

Attachments

  • Screen Shot 2021-02-07 at 2.43.18 PM.png
    Screen Shot 2021-02-07 at 2.43.18 PM.png
    1.8 MB · Views: 211

franky_b_

macrumors newbie
Feb 14, 2021
1
0
Hello,
I tried ACVM 1.5 and Windows Preview 21286. Windows regularly freezes, sometimes (2 out of 5) already at login after booting. This started after installing the network driver (virtio-win-0.1.190): it installs, Edge/IE starts, and the system immediately freezes. Has anybody encountered this issue? Ubuntu seems to run stable and indeed very snappy.

Edit: Ubuntu also freezes now several times upon boot / login (while it ran perfectly some days ago).

Another question: Is there a guide how to compile Wine with the Crossover patch?

Many thanks to all for this wonderful project!
 

Richard Tillard

macrumors member
Feb 8, 2021
41
41
I installed everything through QEMU, everything works. For a virtual machine I think the performance is very good. It would also be great to have some kind of video driver, because I haven't found an adequate solution yet. Maybe someone has done it? I can also confirm that the Windows Store does not work.
 

schrapnel

macrumors newbie
Mar 6, 2021
1
0
Try as I might I cannot get qemu from git to configure with the flags to enable hvf by using the flag --enable-hvf am I missing something?

./configure --cpu=aarch64 --target-list=aarch64-softmmu --enable-hvf

It compiles fine but always says invalid accelerator hvf due to the missing flags :(
Did you solve the problem? I have exactly same issue ... no hvf support :(
 

Ricky_Bao

macrumors newbie
Apr 4, 2021
1
0

I was able to successfully virtualize Windows 10 for ARM on M1 with Alexander Graf's QEMU hypervisor patch.​


Screenshot:

View attachment 1682350

How to virtualize Windows 10 on M1:

1. 
Download qemu-m1.zip from https://mega.nz/file/QYB0QTrC#p6IMBJlFqqNKuGonwrDkPOVKQj8yHCVgiLOYVaGvs4M or this forum attachment. It contains pre-built versions of qemu-system-aarch64, efi-virtio.rom, and QEMU_EFI.fd. (All of these are open-source, and you can build them yourself by following instructions in the next section.)
2. Double click qemu-m1.zip to unzip it.
3. Download Windows Insider Preview ARM64 from Microsoft at https://www.microsoft.com/en-us/software-download/windowsinsiderpreviewARM64, which will get you a VHDX image.
4. Using Finder, move the downloaded VHDX image into the unzipped qemu-m1 folder.
5. Open Terminal and navigate to the qemu-m1 folder. Copy and paste the code below to Terminal, and press return.
Code:
cd ~/Downloads/qemu-m1
6. Start the QEMU virtual machine. Copy and paste the code below to Terminal (copy and paste the entire block all at once), and press return.
Code:
DYLD_LIBRARY_PATH=. \
./qemu-system-aarch64 \
-M virt \
-accel hvf \
-m 5G \
-smp 4 \
-cpu max \
-device ramfb \
-serial stdio \
-drive file=Windows10_InsiderPreview_Client_ARM64_en-us_20231.VHDX,if=none,id=NVME1 \
-device nvme,drive=NVME1,serial=nvme-1 \
-device nec-usb-xhci \
-device usb-kbd \
-device usb-tablet \
-device intel-hda -device hda-duplex \
-drive file=vars-template-pflash.raw,if=pflash,index=1 \
-bios QEMU_EFI.fd
7. Set up Windows 10 and enjoy!

How to increase resolution to 1024x768:​

1. Shut down Windows.
2. qemu-system-aarch64 > Quit QEMU > Quit.
3. Start the virtual machine with the same command line argument as listed in step 6 of the previous section.
4. When QEMU shows "Start boot option", press the escape key on your keyboard.
5. Use the arrow down key to move selection to "Device Manager", press return, then move down to "OVMF Platform Configuration", and press return. Changing selection may take a while to update after pressing the arrow key. It is normal.
6. Highlight <640x480> or <800x600> next to "Change Preferred", press the return key, and change selection to 1024x768.
7. Press both fn and F10 on your keyboard to save the changes. (If you're using a PC keyboard, just press F10).
8. Press esc to go back to the main menu.
9. Press down arrow a few times to move selection to "Continue", then press return on your keyboard.
10. After Windows has booted, shut down Windows.
11. qemu-system-aarch64 > Quit QEMU > Quit.
12. Start the virtual machine with the same command line argument as listed in step 6 of the previous section.

How to get internet access in the virtual machine:​

1. Download the virtio driver ISO from https://fedorapeople.org/groups/vir...o/virtio-win-0.1.190-1/virtio-win-0.1.190.iso
2. Move the downloaded ISO to the qemu-m1 folder.
3. In Windows 10, right click on the Start menu, then choose “Command Prompt (Admin)”.
4. Click “Yes” in the UAC prompt.
5. Allow drivers that are test-signed.
Code:
bcdedit -set TESTSIGNING ON
6. Shut down Windows.
7. qemu-system-aarch64 > Quit QEMU > Quit.
8. Boot QEMU again with updated arguments.
Code:
DYLD_LIBRARY_PATH=. \
./qemu-system-aarch64 \
-M virt \
-accel hvf \
-m 5G \
-smp 4 \
-cpu max \
-device ramfb \
-serial stdio \
-drive file=Windows10_InsiderPreview_Client_ARM64_en-us_20231.VHDX,if=none,id=NVME1 \
-device nvme,drive=NVME1,serial=nvme-1 \
-device nec-usb-xhci \
-device usb-kbd \
-device usb-tablet \
-device intel-hda -device hda-duplex \
-drive file=vars-template-pflash.raw,if=pflash,index=1 \
-drive file=virtio-win-0.1.190.iso,media=cdrom,if=none,id=cdrom -device usb-storage,drive=cdrom \
-net nic,model=virtio \
-net user \
-bios QEMU_EFI.fd
9. After Windows boots, right click on the Start menu, and choose “Device Manager”.
10. In the “Other devices” section, scroll all the way to the end.
11. Right click on the last “Unknown device” > Update drivers > Browse my computer for drivers > Browse.
12. Choose the virtual CD Drive (D:) virtio-win > OK > Next > Allow.
13. You should now have internet in the Windows 10 virtual machine.

Tips:​

If you're getting any GateKeeper warnings, remove the Quarantine extended attribute (preferred) or temporarily turn off GateKeeper (not recommended):
Code:
xattr -rd com.apple.quarantine ~/Downloads/qemu-m1

How to build and run QEMU on M1 from source:​

This section is for advanced users who are comfortable using Terminal.
1. If you already installed Homebrew or required dependencies using Rosetta 2, follow https://github.com/homebrew/install#uninstall-homebrew to uninstall the Intel version of Homebrew and other dependencies.
2. Install the native arm64 version of Homebrew on Apple Silicon. Follow https://soffes.blog/homebrew-on-apple-silicon, and look for the “Multiple Homebrews” section, then add /opt/homebrew/bin to your path.
3. Download the python3.9 Homebrew formula from https://github.com/Homebrew/homebrew-core/raw/master/Formula/python@3.9.rb. Open it in any text editor, then edit line 124 into the following, and save the edited Ruby file.
Code:
args << "MACOSX_DEPLOYMENT_TARGET=11.0"
4. Install python3.9.
Code:
brew install ~/Downloads/python@3.9.rb
5. Install other required dependencies.
Code:
brew install pkg-config glib pixman ninja
6. Download Alexander Graf's QEMU hypervisor patch at https://patchwork.kernel.org/series/391797/mbox/
6. Checkout QEMU, then cd into it.
Code:
git clone https://git.qemu.org/git/qemu.git
cd qemu
7. Apply Alexander's patch.
Code:
git apply ~/Downloads/hvf-Implement-Apple-Silicon-Support.patch
8. Open ~/qemu/target/qrm/hvf/hvf.c in any text editor, and change the hvf_arch_init_vcpu method into:
Code:
int hvf_arch_init_vcpu(CPUState *cpu)
{
    ARMCPU *arm_cpu = ARM_CPU(cpu);
    CPUARMState *env = &arm_cpu->env;

    env->aarch64 = 1;

    hv_return_t ret;
    ret = hv_vcpu_set_sys_reg(cpu->hvf_fd, HV_SYS_REG_SCTLR_EL1,
                              arm_cpu->reset_sctlr);

    return ret;
}
8. Configure the build.
Code:
./configure --cpu=aarch64 --target-list=aarch64-softmmu
9. Build QEMU.
Code:
make
10. When QEMU is built, cd into the build directory.
Code:
cd build
11. Download EDK2 from https://www.kraxel.org/repos/jenkins/edk2/edk2.git-aarch64-0-20201023.1506.gf69a2b9a42.noarch.rpm
12. Extract EDK2.
Code:
tar -xf ~/Downloads/edk2.git-aarch64-0-20201023.1506.gf69a2b9a42.noarch.rpm
13. Move QEMU_EFI.fd to the build folder.
Code:
mv ./usr/share/edk2.git/aarch64/* ./
14. Run the QEMU virtual machine.
Code:
./qemu-system-aarch64 \
-M virt \
-accel hvf \
-m 5G \
-smp 4 \
-cpu max \
-device ramfb \
-serial stdio \
-drive file=Windows10_InsiderPreview_Client_ARM64_en-us_20231.VHDX,if=none,id=NVME1 \
-device nvme,drive=NVME1,serial=nvme-1 \
-device nec-usb-xhci \
-device usb-kbd \
-device usb-tablet \
-device intel-hda -device hda-duplex \
-drive file=vars-template-pflash.raw,if=pflash,index=1 \
-bios QEMU_EFI.fd
15. Set up Windows 10 and enjoy!

Source:
https://patchwork.kernel.org/project/qemu-devel/list/?series=391797
I've installed but it can not work.
This is an error like below picture
 

Attachments

  • Ảnh chụp Màn hình 2021-04-05 lúc 07.19.04.png
    Ảnh chụp Màn hình 2021-04-05 lúc 07.19.04.png
    734.8 KB · Views: 189

alfonso78

macrumors newbie
Apr 19, 2017
3
1
Ok, so I got the driver signed with a test certificate I created. The below assumes you've already allowed TESTSIGN to enable the ethernet driver.

When you expand the archive, there are a few files:

ACVM.cer - this is the test cert, and will need to be added to the Windows Trust Store
viogpudo.* - various driver files.
InstallCerts and Driver.bat - This is a bat file I created which should show a UAC prompt, then install the cert into the Windows Trust Store, and then install the driver.

If you open the BAT file, you can see the last few lines to see what the command does, if you'd rather do the install manually.

After this is done, you should be able to shutdown Windows. Then in AVCM, switch the graphics option to from ramfb to virtio-gpu:

View attachment 1697613

If you leave the "unhide mouse pointer" checked, then you will see the Mac cursor and it avoids the invisible cursor issue that @Gnattu discovered. Alternatively, you can switch the cursor option in Windows to use the Black cursor instead of the White cursor, and then uncheck the "unhide mouse pointer" in ACVM, and you will be using and see the black Windows cursor.

Let me know if you run into any install issues with this. It was my first time doing windows driver signing.

Thank you for this!

I've tried to install Windows 10 build 21354 - I first converted the vhdx file to qcow2 and I managed to install the NIC driver and access the internet, but after installing the video driver and switching to virtio-gpu, I cannot run display settings within the VM.
The window with a gear appears and then it closes itself.

1618510474508.png


Any idea? Thank you.
 
  • Like
Reactions: billpowel514

Morac

macrumors 68020
Dec 30, 2009
2,306
681
I stumbled across this thread, but noticed that Qemu 6.0.0 has been released and HomeBrew installs a M1 version of it. Is all the stuff mentioned in the first post still necessary?
 

jdb8167

macrumors 601
Nov 17, 2008
4,859
4,599
I stumbled across this thread, but noticed that Qemu 6.0.0 has been released and HomeBrew installs a M1 version of it. Is all the stuff mentioned in the first post still necessary?
That is pretty new. Last I checked homebrew was still installing the old version without the M1 hypervisor mode for Aarch64. Thanks for the heads up. I’ll check out the brew version.
 

Morac

macrumors 68020
Dec 30, 2009
2,306
681
That is pretty new. Last I checked homebrew was still installing the old version without the M1 hypervisor mode for Aarch64. Thanks for the heads up. I’ll check out the brew version.

The brew version doesn't appear to have acceleration enabled.

Qemu seems to have issues in general. For example updating Windows doesn't work. It just sits at Downloading 0% forever.

Parallels runs much nicer (or it did during the trial when I used it), but then of course it's not free.

Edit:

I went in and reset the network in Windows 10. That seems to have gotten everything working as I could then log into my MA, Windows no longer complained I wasn't connected to the Internet and Windows Update Downloads started working. I can't ping anything, but I've read that's "normal" for qemu.

Edit 2:

I accidentally closed Qemu mid-Windows Update so I decided to set things up again from scratch and I'm back to Windows not being able to detect the Internet. I tried reseting the network as that fixed it last time, but it didn't this time. Windows won't download updates or let you log into MA if it thinks there's no Internet, so I'm stuck again.

Edit 3:

Did a "net cfg -d" and restarted and Internet is working again. I'm wondering if this just randomly works and doesn't work?

Edit 4:

It appears that Windows 10 in Qemu just frequently won't detect the Internet. This is a mild annoyance, unless you link Windows 10 to your Microsoft Account, in which case you can't log in when this happens. Since it seems to happen 9 out of 10 times Windows boots up that's a problem. Since I couldn't actually log in anymore without a network I had to reset Windows 10 from the recovery screen.

Edit 5:

Problem seems to be related to active and passive NCSI probes. These are failing in Qemu frequently for some reason which causes Windows 10 to not think it's connected to the Internet. I don't know how to resolve this since the tests are fairly constant and when they fail (which they mostly do) Windows 10 complains there's no Internet.

 
Last edited:

aplnub

macrumors regular
Nov 16, 2008
180
265
Does anyone care to speculate when we may see Parallels for M1 and Windows ARM available and working decently without much fuss?

I am sitting on a 2014 iMac and have to virtualize Windows a little. I am trying to determine if I should bite the bullet and purchase a new Intel iMac or wait for the M powered 27" (whatever size) and take my chances.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.