I tried installing XUbuntu 22.04 on Hyper-V and it installs fine but after installation and reboot, the screen goes black with a flashing screen.
I was able to watch F1 output until it gets to:
Starting Hostname Service ...
tmp-sanity\x2dmount...
After which the black screen starts.
I was able to trigger Ctrl+Alt+F3 but the login only shows for a second and then goes black again.
I think this is a driver issue but I have no idea on how to resolve.
Any ideas on how to fix this?
Notes:
- Ubuntu Desktop 22.04 works fine
- Only have RDP access to the Hyper-V server so I'm a bit limited on control.
This issue is likely caused because the VM was installed using
Generation 1
virtual machine. Try installing the VM asGeneration 2
instead.Note: to install vm as generation 2, you must disable secure boot under HyperV
VM Settings
->Security
->Secure Boot Enabled
(uncheck).Note: This does not seem to fix issues with
XUbuntu 20.04
which still gets black screen. In this case, you will need to boot into single user mode and install linux-azure package.The thing that worked for me (not to install this horrendous linux-azure package) was: https://superuser.com/questions/1241327/hyper-v-white-black-window
Note: My VM is Ubuntu 20.04 in V1 but I think it is also valid for V2 and Below answer from the above link:
It's a known problem between GRUB and Hyper-V during the installation. You can solve the problem with few steps.
Requirement
SSH Server on VM You need to check SSH Server at the installation to access to your VM without Hyper-V viewer.
Solve black screen issue
Before any modification, be sure that you saved the files with : cp .old
Connect to your VM through SSH (e.g. using PuTTY or WinSCP) and edit the grub file :
Delete "quiet splach" attribute in lines :
GRUB_CMDLINE_LINUX_DEFAULT="" GRUB_CMDLINE_LINUX="" Uncomment the line :
GRUB_TERMINAL=console Save the file before exit.
You also need to update grub to apply the new configuration :
Reboot your VM with the following command :
Try to access it through Hyper-V viewer.
I just had a similar problem with ubuntu 22 running on Hyper-V however, when I tried using the pre-prepared images everything was fine, as per https://ubuntu.com/blog/optimised-ubuntu-desktop-images-available-in-microsoft-hyper-v-gallery.
The way to fix this is by installing linux-azure package as follows:
e
to editlinux
and addsingle
afterro
remembering to add spaces before and aftersystemctl start NetworkManager.service
linux-azure
restart -r now
Your system should boot super fast and should work just fine.
For me the problem was Windows 11 requires Secure Boot turned on. In the Settings for the virtual machine, under Security, uncheck "Enable Secure Boot", and try it again. I was able to get through to the GRUB and install the image.