Hello Axel, I am Henry and I want to share some insights about your issue.
I haven't encountered this issue before, but I've done some research and found a related document.
It appears that Hyper-V emulates the legacy i8042 keyboard controller, while its modern virtual BIOS also reports the same device via ACPI Plug and Play (PnP). This results in the Linux kernel detecting both interfaces simultaneously, which causes a conflict. The modern PnP probe clashes with the legacy driver’s attempt to initialize the device, preventing the keyboard driver from loading properly.
So my recommendation is to force the kernel to use a legacy probing method by adding a i8042.nopnp kernel boot parameter. This tells the Linux kernel to not use PnP for the keyboard controller, which resolves the conflict. For reference, you can check the documentation here: https://www.kernel.org/doc/Documentation/admin-guide/kernel-parameters.txt
Below is detail:
- Boot the VM. Since your keyboard doesn't work, you'll need to use one of these methods to open a terminal and enter commands:
- On-Screen Keyboard: If you installed a desktop environment (like standard Ubuntu), use your mouse to go to Settings > Accessibility > Screen Keyboard and enable it.
- SSH: If you know the VM's IP address and have SSH enabled, connect to it from your host machine using PowerShell or another SSH client (ssh user@<vm-ip-address>).
- Edit the GRUB Configuration File. Run in text editor:
sudo nano /etc/default/grub - Modify the Kernel Command Line. Find this line in the file: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" Change it by adding i8042.nopnp inside the quotes. It should look like this: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i8042.nopnp"
- Save and Update GRUB.
- Press Ctrl + X to exit nano.
- Press Y to confirm you want to save the changes.
- Press Enter to confirm the filename.
- Now, apply the change by running:
sudo update-grub
- Reboot the VM.
sudo reboot
Hope this points you in the right direction for troubleshooting.