A complete useless how-to run an emulated centos arm virtual machine on windows 10. It is so utterly slow I can not think of a use case… JustBecauseItsPossible
Here we go,
Install Mandatory software:
- A (de)compression utility like 7zip able to process tar.xz and qcow2
- Qemu 2.12 for windows, note with the latest version 3.0.0 network did not work for me. (technically from the available system emulators only qemu-system-arm is a necessity)
(Install) Optional software:
- A ansi color ESC sequence aware terminal-emulator like cmder
- A tap network adapter driver like OpenVPN installs
Prepare:
- Download Centos-Qemu-lpae-armhfp.qcow2.xz
- Decompress the downloaded image in a convenient folder.
- Open the qcow2 file (with 7zip) and extract the kernel (vmlinuz-…) and initramfs (initramfs-…img) from the first partition to your folder.
Optional: (There may be better ways to get network functionality)
In Control Panel\Network and Internet\Network Connections
:
- Create a bridge between the tap-interface and the active network interface (select them both right click choose bridge connection)
-or- - Share the connection of the active network interface with the tap-interface ( select network interface properties > share tab)
Then run in a terminal (emulator) :
set PATH=%PATH%;C:\Program Files\qemu\
qemu-system-arm -m 4048 -smp 4 -M virt ^
-hda Centos-Qemu-lpae-armhfp.qcow2 ^
-kernel vmlinuz-4.14.78-201.el7.armv7hl+lpae ^
-initrd initramfs-4.14.78-201.el7.armv7hl+lpae.img ^
-append "console=ttyAMA0 rw root=/dev/vda2 verbose" ^
-nographic -serial mon:stdio ^
-net nic -net tap,ifname=EthernetTap
NOTE:
- Omit the last line (-net nic -net tap,ifname=EthernetTap) if you did not setup a tap network interface, it will boot but has no network.
- You may omit
-nographic -serial mon:stdio
if you do not use a ansi-color aware terminal emulator -
-m 4048 -smp 4
: means 4048 MB of memory and 4 cpu cores, you may change this to fit your hardware better. Although you can assign more cpu’s as your hardware has, it does not make a lot of sense.
Then wait a long time, its dead slow. (especially network takes long to get up and running)
Login root
, Password centos