Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need AArch64 / ARM64 versions #177

Closed
Googulator opened this issue Oct 28, 2017 · 353 comments
Closed

Need AArch64 / ARM64 versions #177

Googulator opened this issue Oct 28, 2017 · 353 comments

Comments

@Googulator
Copy link

Microsoft is now building Windows 10 and Windows Server for ARM64 machines. To successfully run these in qemu, virtio drivers are needed for the ARM64 platform.

@YanVugenfirer
Copy link
Collaborator

It is on our roadmap.
In a meanwhile, could you please share how and what versions of Windows Server you try to run on QEMU, so we will align our efforts.

Thanks.

@vrozenfe
Copy link
Collaborator

While it is not on our radmap, it is on our wishlist :)
I believe we can give it a try as soon as we can run ARM Windows VM image on QEMU.

Best,
Vadim.

@sameehj
Copy link
Contributor

sameehj commented Nov 16, 2017

Hi @Googulator,

We are currently attempting to run Windows Server on top of qemu and didn't manage to fully boot Windows. In case you made any progress on that can you please share the it with us so we can port the drivers ASAP.

@Googulator
Copy link
Author

Googulator commented Nov 17, 2017

In qemu v2.11-rc1, Windows 10 version 1709 (build 16299) for "ARM64", as Microsoft calls it, can now install and boot using this UEFI firmware image: https://github.com/Googulator/edk2/releases/tag/AHCI

Extract the contents of the ISO into a 5GB VHDX or other qemu-compatible image format, create a 2nd, empty VHDX of about 50GB, then run qemu like this (change "-smp 8" if you don't want to emulate that many cores):
qemu-system-aarch64 -M virt -m 8192 -cpu cortex-a57 -smp 8 -bios QEMU_EFI.fd -device VGA -device nec-usb-xhci -device usb-kbd -device usb-tablet -drive file=50gb.vhdx,id=install,if=none -netdev user,id=network -device virtio-net,netdev=network -device ahci,id=ahci -device ide-hd,drive=install,bus=ahci.0 -drive file=5gb.vhdx,id=dvd,if=none -device ahci,id=ahci2 -device ide-hd,drive=dvd,bus=ahci2.0

Walk through setup as you would on an x86 system.

Probably won't work under KVM on real ARM hardware, as it depends on the emulated VGA framebuffer, which is fundamentally incompatible with KVM. Unfortunately, virtio-gpu can't be used as an alternative because Windows requires runtime graphics capability through UEFI GOP after ExitBootServices(), which means it can't run on PixelBltOnly screens like the one provided by virtio-gpu.

EDIT: 2.11-rc1 is required, earlier versions have some bug related to memory management(?) that cause Windows to blackscreen early during boot.

@Googulator
Copy link
Author

Unrelated issue, but the reason why you have to first extract the image to a VHDX is that simply using the ISO as an ide-cd device causes the qemu host process to crash when you press a key at the prompt to boot from the ISO.

@sameehj
Copy link
Contributor

sameehj commented Nov 19, 2017

Hi @Googulator ,

Thank you very much for the instructions and the very detailed explanation. I am following the steps you provided in attempt to boot Windows from the vhdx image but I think I am not preparing the vhdx image from the iso appropriately. Can you please shed some light on how you did it? (tools, special configurations, etc..)

@oscarbg
Copy link

oscarbg commented Jan 11, 2018

@Googulator +1 can you post steps to prepare vhdx from ISO.. seems my virtual disk may be not bootable or badly created..

@huoqianyu
Copy link

huoqianyu commented Jan 12, 2018

@sameehj , Hello friends, Today I found that a user called "LightBulbFun" in forum "BetaArchive" successfully installed Windows 10 ARM64 usinig an older firmware. You can see this link
https://www.betaarchive.com/forum/viewtopic.php?f=62&t=37172&start=50
for more information. By following his guide, I successfully installed Windows 10 build 16299.15.

2018-01-12 4

P.S. The screenshot shows a small "HELLO WORLD" program created by Visual Basic 6, and that may means x86 program can run in ARM64 win10.

@sameehj
Copy link
Contributor

sameehj commented Jan 14, 2018

@huoqianyu,

That's great! We'll be trying to follow his instructions and update you on the progress =)

@falkor2k15
Copy link

Any news on the KVM incompatibility issue and any efforts that are being taken to get around it? Is it something that will eventually be fixed in Qemu-system-aarch64?

What is the "emulated VGA framebuffer" exactly and why would this cause an incompatibility with KVM? Surely there must be a way around it?

@YanVugenfirer
Copy link
Collaborator

As was mentioned in the previous comment by @huoqianyu it is possible to run Windows on QEMU now.

@falkor2k15
Copy link

Yes, but it runs too slow, and the KVM acceleration problem is stopping it from running fast on ARM64 hardware. So my question is specifically about the KVM incompatibility: is it a problem with Qemu or KVM or Windows? Any efforts being made to resolve it? Is there a way around it?

@vrozenfe
Copy link
Collaborator

Can you give a try to Linux arm64 guest and see if it performs better than Windows?

@falkor2k15
Copy link

The ARM64 guests all have graphics turned off using the -nographic option - so I don't think they can be used with VGA output - for example see this:
https://wiki.ubuntu.com/ARM64/QEMU

KVM may also work with no graphics, hence the compatibility problem has something to do with the graphics, but it hasn't been discussed anywhere.

@vrozenfe
Copy link
Collaborator

Headless configuration should work for Windows Server as well. But we might be able to build ARM64
version of virtio-gpu dod driver to give it a try.

@falkor2k15
Copy link

I don't know where to find the Windows Server 2016 on ARM ISO - I think it was given to selected people only. If you could please build a new graphics device to get KVM to work in conjunction with Qemu-System-Aarch64 + Windows 10 on ARM then that would be great - I'm all ears and waiting day-by-day to test this!

@driver1998
Copy link

Of cause you can boot Windows without VGA output, but that will only be a black screen, the OS should still be working though.
And if drivers for virtio-gpu is available, we may be able to use that.

@falkor2k15
Copy link

There are currently no drivers available - they would have to be made for Windows on ARM; however, that would not be a solution, but a workaround to the problem of no VGA support in Qemu coupled with KVM compatibility issues. I can only assume this is some kind of deliberate joke to put out headless server scripts and hold back on allowing the public to visually experience modern hardware virtualization. A blind man should be grateful just to walk and talk - even though he cannot see where he's going?

@Bullseye300
Copy link

For those who have problems by installing QEMU. I found a ready to run image with Windows pre-installed:
https://virtuallyfun.com/wordpress/2018/03/22/windows-10-arm64-on-qemu/

I think that needs to be added in the start script (Driver still missing):

-net nic,model=virtio ^
-net user ^

@YanVugenfirer
Copy link
Collaborator

You are welcomed to check the branch: https://github.com/virtio-win/kvm-guest-drivers-windows/tree/arm64

Instructions for build machine (using community edition of VS2017):
https://github.com/virtio-win/kvm-guest-drivers-windows/wiki/Building-the-drivers#coming-soon-building-virtio-win-drivers-including-arm64-using-visual-studio-2017

Soon will be integrated to master and we will distribute the binaries.

Best regards,
Yan.

@falkor2k15
Copy link

Thanks Yan! Is there a pre-built binary I could use to test with qemu-system-aarch64/KVM?

@ybendito
Copy link
Collaborator

ybendito commented Nov 22, 2018

@falkor2k15
I can send built binaries (signed with test signature).
Which ones you want to try? (This is not an official build with complete tree, so I'll pick up ones you're interested in)

@falkor2k15
Copy link

falkor2k15 commented Nov 22, 2018

@ybendito, yes please!! :) Is there a VGA one you could send me as that's the main problem with the qemu-system-aarch64 and KVM. For example; is there a VGA QXL?
-vga qxl
And how about this one?
-net nic,model=virtio
Apparently, this ARM64 stuff is meant to be quite easy to build using the Latest Visual Studio (2017):
https://youtu.be/vdYIaUeZnqc?t=1047
However, I'm not a dev, so I wouldn't know.
Finally, if you do manage to build at least a VGA driver then how might we import them into a qemu-system-aarch64 script? Thanks and looking forward to it!

My email is gilius2k15@gmail.com

I'm not sure if you guys are aware of this new QEMU machine (xilinx-zynq-a9) and new ARM CPU (A72)?
https://www.xilinx.com/support/documentation/sw_manuals/xilinx2017_4/ug1169-xilinx-qemu.pdf

Would be good to test with a53, a57 and a72.

Edit: I don't think the QXL one is a virtio driver. I think it's just called -vga virtio or -virtio-vga or virtio-gpu

@ybendito
Copy link
Collaborator

@falkor2k15 qxl-wddm-dod is not a part of virtio-win, we did not build it for ARMx and currently we do not have an estimation for that.
virtio-net driver is available for trial: https://drive.google.com/open?id=1fBBysiREXap4KSG2ImaY5IUp_yLIDt2x

@falkor2k15
Copy link

Looking promising...
capture
Just need to try to install this windows so I can get to the desktop - might need to switch to Linux host... Qemu doesn't like my i7.

@ybendito
Copy link
Collaborator

@falkor2k15 I think you play with some drivers set that is not related to our build, I've sent only netkvm.

@driver1998
Copy link

I am testing Windows ARM64 on KVM, could you please send me the viostor bits? @ybendito

@ybendito
Copy link
Collaborator

@driver1998 On which platform(chipset)?
I do not think you can use viostor at Windows setup, for that the driver shall be signed by Microsoft. But you can add virtio disk later if you enable test signature. https://drive.google.com/open?id=1FxOxFoONccJYdTaUnVs_YQ145O_FePZF

@RussianNeuroMancer
Copy link

Back then when starting this virtual machine worked for me I used RDP to workaround this remfb limitation.

Could you please describe setup that works for you right now? Distribution version, qemu version, libvirt version, qemu-efi-aarch64 version, etc.

@MilkyDeveloper
Copy link

I'm using Manjaro-ARM-minimal-rpi4-21.04 (for the recent QEMU) on my Raspberry Pi with QEMU Version 5.2.0. Currently I don't have libvirt installed. I used to have the Press key message but I fixed that by moving from the virtio-input devices to the usb-kbd (etc.) devices. I'm using the latest insider build of Windows from uupdump.net.

@MilkyDeveloper
Copy link

Good News! Slightly unrelated but with my working Windows aarch64 setup using QEMU/KVM on my Pi 4, my JetStream2 Benchmark score is ~25, which is near the Atom X7-Z8700. This was tested on the default Edge Browser.
image

@sidd-kishan
Copy link

We can help you test we have Windows on Rasberry Pi setup. Please pursue it we at Windows on Rasberry Pi community will be glad to extend support in testing your drivers and tools for ARM64.

@mjuned47
Copy link

I had enabled kvm on android device(realme 6i).
Got /dev/kvm
And tried windows 10 arm64 but unfortunately it is not working
What i have done :
I had to use host cpu,with custom cpu(cortex-xx) gives "invalid argument"
As VGA output is incompatible with kvm i had to use ramfb device, in case of VGA output+kvm, it was showing black screen
Using ramfb device , windows logo appeared but stucked at that.
Environment :
Kali nethunter app

@fxsheep
Copy link

fxsheep commented Jul 20, 2021 via email

@Googulator
Copy link
Author

Windows requires a linear frame buffer during boot; virtio-gpu-pci is BLT-only, which Windows won't support.

@MilkyDeveloper
Copy link

I've used virtio-gpu-pci (only) during boot. It probably fell back to ramfb, but it worked.

@mjuned47
Copy link

What’s your kernel version? It probably needs a quite recent kernel to get kvm work well.
Kernel version is 4.14.142

@fxsheep
Copy link

fxsheep commented Jul 26, 2021 via email

@YanVugenfirer
Copy link
Collaborator

ARM64 support is part of the released drivers.
For specific issue, please open a separate issue.

Thanks,
Yan.

@wesjeroo
Copy link

@hitmoon Finally, I can now boot into win10 install page, I appreciate it if you can show your magic way or contact me by wesjeroo@sina.com, too many thanks

@bryantclcqq
Copy link

Finally got it boot in KVM, with some hacks in QEMU.

  1. I force disabled MSIX in the GICv2 emulation code. Set msi_nonbroken in function gicv2m_realize() to false. This might be unnecessary.
  2. Then Windows will boot to another point, where GPIO driver causes KVM to crash, I simply remove the GPIO related entries in DSDT ACPI table.

Then it fully booted to the second phase of Windows setup... 15

for GICv3 machine, qemu+kvm to run windows 10 for ARM will be hanged. Does anyone knows how to solve it?

@binarymaster
Copy link

for GICv3 machine, qemu+kvm to run windows 10 for ARM will be hanged.

I heard WoA does not have support for GICv3, at least not yet.

@pmsjt
Copy link

pmsjt commented Apr 16, 2022

Windows works perfectly fine with GICv3. If using KVM, the host must be GICv3 itself, like an Ampere Altra based server, for example.

@mcarabas
Copy link
Contributor

mcarabas commented Apr 18, 2022 via email

@bryantclcqq
Copy link

Try to add its=off ( -machine virt,gic-version=3,its=off) and see what happens. La 16.04.2022 14:41, Stanislav Motylkov a scris:

for GICv3 machine, qemu+kvm to run windows 10 for ARM will be hanged. I heard WoA does not have support for GICv3, at least not yet. — Reply to this email directly, view it on GitHub <https://urldefense.com/v3/https://github.com/virtio-win/kvm-guest-drivers-windows/issues/177*issuecomment-1100646083;Iw!!ACWV5N9M2RV99hQ!aZ-BoF6t2b0SwfTcs2zRgg1MrNX4zRuaY4rVFqpEsQH9YqJSCmqm50GKOyMfkMlLCQ$>, or unsubscribe <https://urldefense.com/v3/https://github.com/notifications/unsubscribe-auth/AHVVLHFQWCY6YDV5M3E4QBDVFKRPLANCNFSM4EBIHCFA;!!ACWV5N9M2RV99hQ!aZ-BoF6t2b0SwfTcs2zRgg1MrNX4zRuaY4rVFqpEsQH9YqJSCmqm50GKOyNWPzdXjw$>. You are receiving this because you are subscribed to this thread.Message ID: @.***>

Thanks very much @mcarabas , it works!! This gicv3 problem has stuck me for a long time, thanks again for your help!

@jiangcuo
Copy link

Finally got it boot in KVM, with some hacks in QEMU.

  1. I force disabled MSIX in the GICv2 emulation code. Set msi_nonbroken in function gicv2m_realize() to false. This might be unnecessary.
  2. Then Windows will boot to another point, where GPIO driver causes KVM to crash, I simply remove the GPIO related entries in DSDT ACPI table.

Then it fully booted to the second phase of Windows setup... 15

for GICv3 machine, qemu+kvm to run windows 10 for ARM will be hanged. Does anyone knows how to solve it?

Run Windows11 is ok on KunPeng920

@driver1998
Copy link

driver1998 commented Sep 16, 2022

Yeah on machines with GICv3, its=off is required. (Maybe it is not the case with Ampere?) Phytium FT2000/4 also works.

Also my old fork is not needed anymore (unless you want to hack around with old Windows builds), the underlying issue with KVM is fixed in both Windows 10 (20H1+) and Windows 11.

@brainchild0
Copy link

In case I would wish to avoid reading the nearly 300 posts, would anyone mind pointing me to any resource, or providing any explanation directly, regarding the current status of this work? I am sorry if I would get the same information by reading fully, but it would take a great effort.

There are several unofficial installation tools for PromMox over AMD64, including PiMox, which specifically targets a Raspberry Pi. It would be interesting to know how close the current functionality is for these tools to a turnkey solution suitable for basic use.

@pmsjt
Copy link

pmsjt commented Oct 6, 2022

All virtio drivers have been ported to Arm64 and Windows works fine under QEMU providing that you either have a supported CPU in the host machine (with KVM) or configure TCG for the minimum hardware supported.

Before you ask: Yes, Windows 11 requires ArmV8.1. Yes, that means most Raspberry Pi's can't run it with KVM. Windows 10 should work.

I thought this thread was closed. Doesn't this mean it should accept no further posts? Seems as this thread has become everyone's support line for running Windows under QEMU regardless of the problem.

@brainchild0
Copy link

brainchild0 commented Oct 6, 2022

I thought this thread was closed. Doesn't this mean it should accept no further posts?

For some projects it would be the convention. This thread appears in a web search for relevant keywords. My guess is that if the same search revealed a page announcing the information just given, then it would be less likely that the current issue would receive the usage you have identified as objectionable. Even based on the recent information, I have no reference for downloading the drivers. Perhaps I would have to look harder, if a resource already exists for this purpose, but it would be easier for many if such a site would appear through on a web search.

Before you ask: Yes, Windows 11 requires ArmV8.1. Yes, that means most Raspberry Pi's can't run it with KVM. Windows 10 should work.

By the way, some sources report anecdotal success operating Windows 11 on a Raspberry Pi 4 (at least as a regular bare-metal install).

I may be lacking relevant knowledge, but I find no strong indication that ARMv8.1 is required even officially for running the ARM distribution of Windows 11. The official hardware requirements indicate for example that the Qualcomm Snapdragon 850 is a supported processor, which is built on the Kryo 385 core, an ARMv8.0-A implementation.

@pmsjt
Copy link

pmsjt commented Oct 6, 2022

@brainchild0
Copy link

brainchild0 commented Oct 6, 2022

Thank you. I see that the ISO packages drivers for multiple architectures, but without such a statement in the surrounding documentation, it may not be assumed by a casual visitor, since the ARM distribution of Windows is new, and so is support for it. May I suggest (to the maintainer of the documentation) a note assuring the visitor that support is included in the package for not only the x86 architecture?

If nothing else, including the architecture in the written content would place the page among the results of a web search submitted with the relevant keywords.

@gang929
Copy link

gang929 commented Aug 12, 2023

There is a bug in that timer of that “Press Enter for DVD boot” screen, which makes it extremely laggy for user input. Try to hold down the Enter key at that screen for 10-15 seconds, it should boot normally after that.
@driver1998 the bug has any way to resolving?

@giantstars
Copy link

qemu-system-aarch64 (v8.0.0-rc4-dirty) What is the cause of the blue screen after installing the viogpudo driver in Virtio-win0.1.229 for windows10 for arm? The graphics driver should be up to date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests