The Windows 8 Consumer Preview (build 8250) was released by Microsoft in early 2012 and still proves that the small things can still have an impact today. It was shipped by Microsoft with upgrade media that allowed users to test it, but it isn't 2012 anymore and we can't test it on modern hardware anyway!
This guide will help you test the Windows 8 Consumer Preview (unfortunately, this only applies to the 32-bit version) in QEMU and Hyper-V. If you didn't know that Hyper-V could run this OS… neither did I.
Most guides use hypervisors such as Broadcom VMware or Oracle VirtualBox, while the QEMU side of this guide goes into a more technical perspective, emulating the Sandy Bridge CPU's IA-32 instruction set for an accurate touch. Don't worry, non-techies, we still have Hyper-V! (spoiler: it's super simple to use)
This section clearly explains the prerequisites needed to run this VM. For both Hyper-V and QEMU, you must have the Windows 8 Consumer Preview VHDX
- QEMU should be version 7.2.0 or later
qemu-system-i386(IA-32/x86) emulator binariesqemu-imgdisk imaging binary- Windows-only:
qemu-imgandqemu-system-i386are in the system PATH environment variable.
QEMU is available and ready to use on systems running Linux, Windows, and macOS, while other hosts running BSD and other Unix-based operating systems may need to compile it from source. The official QEMU installation documentation provided here will guide you through this.
- Intel VT-X/AMD-V enabled (configurable via firmware)
- Virtualization-based Security enabled
- Windows Hypervisor Platform enabled
- Virtual Machine Platform enabled
- Hyper-V enabled
For requirements 3-5, you can enable them in Optional Features. If Virtualization-based Security is not already enabled, you can download and run the Microsoft script here to enable it.
WSL2 You cannot use the Windows key and many other system hotkeys inside of the guest machine. For Windows hosts, this guide will use multi-threaded TCG with Hyper-V Enlightenments enabled.
This guide focuses on using the QEMU hardware emulator to emulate a 2012-accurate machine using the Sandy Bridge CPU and SATA disk drive emulation. An overview of the specs, this machine will have:
- A Sandy Bridge (v1) CPU
- SATA disk drive (spoiler: Hyper-V will use IDE because it cannot emulate the AHCI bus)
- 2 gigabytes of memory
- A 42-gigabyte large disk
- MBR partition table
- SeaBIOS firmware
This configuration is ideal to emulate era-accurate hardware and timing, providing opportunities to further learn about this operating system preview. You can swap out the Sandy Bridge CPU with any compatible CPU, that being Westmere-v1 and later.
To start, we might notice that the disk is not a QCOW2 or raw disk. It is important that we can identify this so we can convert it into a compatible QCOW2 image. Assuming the qemu-img binary is present with the VHDX disk image, you only need to run this command, only once, and you won't touch disk imaging again. The command below is compatible with all QEMU-compatible hosts, no Windows-specific formatting here!
qemu-img convert -f vhdx -O qcow2 Windows8_ConsumerPreview.vhdx Windows8_ConsumerPreview.qcow2
This command alone will convert our VHDX into a ready-to-use QCOW2-formatted image. Same virtual size, just a compatible format we can actually use. This is all we have to do, as we only need to now execute the virtual machine with the correct configuration.
Audio is not required, and the lines:
-device intel-hda
-audiodev ...
-device hda-duplex,...
Can be removed on all hosts.
The disk image provided is ready to use, generalized, and you only have to continue the Out of Box Experience from there. No CDROM installation media is required nor provided.
To boot from this hard disk with the correct configuration, the following commands can be used:
qemu-system-i386 \
-M q35 \
-cpu SandyBridge-v1,hv_relaxed,hv_frequencies,hv_vpindex,hv_ipi,hv_tlbflush,hv_spinlocks=0x1fff,hv_synic,hv_runtime,hv_time,hv_stimer,hv_vapic \
-m 2G \
-accel kvm \
-device qemu-xhci \
-device usb-tablet \
-device usb-kbd \
-vga std \
-device intel-hda \
-audiodev alsa,id=aux0 -device hda-duplex,audiodev=aux0 \
-netdev user,id=eth0 \
-device e1000-82545em,netdev=eth0 \
-device ich9-ahci,id=ahci \
-drive id=disk0,if=none,format=qcow2,file=Windows8_ConsumerPreview.qcow2 \
-device ide-hd,drive=disk0,bus=ahci.0qemu-system-i386 -M q35 -cpu SandyBridge-v1,hv_relaxed,hv_frequencies,hv_vpindex,hv_ipi,hv_tlbflush,hv_spinlocks=0x1fff,hv_synic,hv_runtime,hv_time,hv_stimer,hv_vapic -m 2G -accel tcg,thread=multi -device qemu-xhci -device usb-tablet -device usb-kbd -vga std -device intel-hda -audiodev dsound,id=aux0 -device hda-duplex,audiodev=aux0 -netdev user,id=eth0 -device e1000-82545em,netdev=eth0 -device ich9-ahci,id=ahci -drive id=disk0,if=none,format=qcow2,file=Windows8_ConsumerPreview.qcow2 -device ide-hd,drive=disk0,bus=ahci.0qemu-system-i386 \
-M q35 \
-cpu SandyBridge-v1,hv_relaxed,hv_frequencies,hv_vpindex,hv_ipi,hv_tlbflush,hv_spinlocks=0x1fff,hv_synic,hv_runtime,hv_time,hv_stimer,hv_vapic \
-m 2G \
-accel hvf \
-device qemu-xhci \
-device usb-tablet \
-device usb-kbd \
-vga std \
-device intel-hda \
-audiodev coreaudio,id=aux0 -device hda-duplex,audiodev=aux0 \
-netdev user,id=eth0 \
-device e1000-82545em,netdev=eth0 \
-device ich9-ahci,id=ahci \
-drive id=disk0,if=none,format=qcow2,file=Windows8_ConsumerPreview.qcow2 \
-device ide-hd,drive=disk0,bus=ahci.0qemu-system-i386 \
-M q35 \
-cpu SandyBridge-v1,hv_relaxed,hv_frequencies,hv_vpindex,hv_ipi,hv_tlbflush,hv_spinlocks=0x1fff,hv_synic,hv_runtime,hv_time,hv_stimer,hv_vapic \
-m 2G \
-accel tcg,thread=multi \
-device qemu-xhci \
-device usb-tablet \
-device usb-kbd \
-vga std \
-device intel-hda \
-audiodev oss,id=aux0 -device hda-duplex,audiodev=aux0 \
-netdev user,id=eth0 \
-device e1000-82545em,netdev=eth0 \
-device ich9-ahci,id=ahci \
-drive id=disk0,if=none,format=qcow2,file=Windows8_ConsumerPreview.qcow2 \
-device ide-hd,drive=disk0,bus=ahci.0Each command does these things, if you were wondering:
- Uses the efficient q35 (2006+ PCs) QEMU machine model. Era-appropriate, avoids the slow i440FX intended for earlier machines of the 2000s.
- Emulates the Intel Sandy Bridge (v1) CPU with Hyper-V Enlightenments and defaults
- Sets maximum memory to be allocated to 2 gigabytes
- Uses the TCG (Tiny Code Generator) accelerator with support for multi-threaded acceleration on Windows and BSD, KVM (Kernel-based Virtual Machine) for Linux, and HVF (Apple's Hypervisor.framework API)
- Establishes XHCI device for USB 3.0 and 2.0/1.1 backwards compatibility with mouse and keyboard
- Sets the graphics device to standard VGA
- Creates an audio interface using the Intel HDA device and
hda-duplex(supports input and output) device to play audio and accept audio input (microphones, for example!) - Emulates the i82545em network chipset and binds it to an Ethernet interface.
- Specifies the hard disk to boot from and sets the bus to
ahci.0, created by theich9-ahcicontroller.
And that's it for QEMU.
Notice: Audio The audio will not work. This was tested and expected to happen.
With the VHDX and Hyper-V, it's 100% possible, no other things needed. To start, all you need to do is go to Hyper-V Manager > New > Virtual Machine...
After that, you should see a panel guide that allows you to create the VM. Name it whatever. Make sure it is set to Generation 1 to boot the BIOS firmware, because this is a 32-bit operating system and does not use the GPT partition table.
Important one, set the startup memory to 1536MiB (1.5GiB) to leave some slack that can be allocated later via Dynamic Memory. You do not need to set a switch for networking unless you want networking capabilities.
Finally, this is the last time I'm going to scream at you about something important. You must check "Use an existing virtual hard disk," click browse or enter the path where the Windows8_ConsumerPreview.vhdx file is located in order to boot the hard disk I provide for ease of use.
After that, click Next > to review your configuration and click Finish once ready. To enable full integration services, you must:
- Select the virtual machine you just created
- Click Settings
- Under Management, select Integration Services and check the Guest Services box. Click OK to apply the change and exit
After, click Connect and fire up your VM!
Congrats! You are now able to experiment with the Windows 8 Consumer Preview (6.2.8250) in a virtual machine using two uncommon ways, via QEMU and via Hyper-V. This setup is unique because it challenges the direct approach of simplicity found in Broadcom VMware and Oracle VirtualBox setups, while providing an interesting learning and experiment opportunity for many people.