Q: I am installing Windows Server 2012 / Windows 8 into a Generation 2 Hyper-V virtual machine (VM), so why doesn't my keyboard work during OS installation?
A: It doesn't work because with a Generation 2 VM, there's no emulated keyboard device, and the software keyboard driver for Hyper-V isn't part of the Windows 8 PE environment. This means you can't use the keyboard to enter data such as the license key.
As a workaround, use the virtual keyboard.
If this is something you need to fix, then the solution is to install the Hyper-V integration services into the Windows PE environment. To do so,
1. Mount the PE image from the media:
dism /mount-image /imagefile:d:\temp\boot.wim /index:2 /mountdir:<mount point>
2. Update the integration services:
dism /image:<mount point> /add-package /packagepath:Windows6.2-HyperVIntegrationServices-x64.cab
3. Unmount the PE image:
dism /unmount-image /mountdir:<mount point> /commit
4. Create new installation media using the oscdimg command.