Announcement

Collapse
No announcement yet.

Unable to install Kubuntu 24.04 on Hyper-V

Collapse
This topic has been answered.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [RESOLVED] Unable to install Kubuntu 24.04 on Hyper-V

    I have tried installing Kubuntu 24.04 on several Hyper-V servers without success. Some observations:

    1. I am able to install Kubuntu 22.04 without an issue on Hyper-V
    2. I try Generation2 , 8GB RAM, Uncheck Enable Secure Boot. When I start the computer and choose "Try or Install Kubuntu", I just get a black screen.
    3. If I select the "Safe graphics install" I can get through the install screens, but on reboot after finish I just get the back screen.
    4. I tried a server that has both an NVIDIA card and one that doesn't with no difference
    5. I tried both BIOS and EFI boot with no difference.
    6. I am able to install on a VM Ware host. This only happens on Hyper-V

    Edit:

    7. Also worth noting that Ubuntu 24.04 installs fine on Hyper-V

    Is there anything I can try? I'd need to move away from VMWare since it's been acquired, but I don't want to loose Kubuntu.

    ​Thanks!
    Last edited by Snowhog; Jun 26, 2024, 01:39 PM.
  • Answer selected by Snowhog at Jun 26, 2024, 01:39 PM.

    Here's what I did to get Kubuntu 24.04 working on Hyper-V:
    1. When installing, select Kubuntu (safe graphics) from the install menu. It contains the nomodeset option.
    2. Run through the install steps.
    3. Click Done to reboot the VM.
    4. The system will reboot to a black screen. Turn off the VM.
    5. Click the Start button to restart the VM. As soon as you do this, press the delete key repeatedly. If the grub menu does not appear, turn off the VM and try again.
    6. The first option in the grub menu is Kubuntu. Make sure it's highlighted and press "e" to edit the entry.
    7. Scroll down to linux /boot/vmlinuz... and replace quiet splash with nomodeset. Press Ctrl-x to boot.
    8. You should now have the sddm login screen. Login using the credentials you setup during the install process.
    9. Open Konsole and execute sudo nano /etc/default/grub to edit the grub settings.
    10. Change GRUB_TIMEOUT_STYLE=hidden to GRUB_TIMEOUT_STYLE=menu.
    11. Change GRUB_TIMEOUT=0 to GRUB_TIMEOUT=8.
    12. Change GRUB_CMDLINE_LINUX_DEFAULT='quiet splash' to GRUB_CMDLINE_LINUX_DEFAULT='video=hyperv_fb:1920x1 080'. Default resolution is 1024x768.
    13. Save the file using Ctrl-o and exit Ctrl-x.
    14. Run sudo update-grub.
    15. Install the Hyper-V drivers with sudo apt install linux-image-extra-virtual. Note: I didn't test without this step. Not sure if it's really needed.
    16. If you reboot the VM at this point, you'll see the boot log and then it will stop at "Finished systemd-update-utmp-runlevel.service - Record Runlevel Change in UTMP.". The system isn't frozen. Pressing Ctrl-Alt-F2 will bring up tty2. I think there is some issue with SDDM and/or video modes. After logging in, you can issue "startx" and you'll get a KDE desktop.
    17. To get around this issue, I installed LightDM and Slick Greeter with sudo apt install lightdm slick-greeter.
    18. A popup will appear for Configuring lightdm. Select lightdm as the default display manager.
    19. Now when you reboot, the LightDM login screen will appear and after entering your credentials the KDE desktop will appear.
    Sources I used to cobble this together:

    Comment


      #2
      I had a brief look at the Micro$oft website and could only find official Hyper V support for *Ubuntu up to 22.04 LTS.

      I currently don't use Windows as a host for VMs anymore, but Kubuntu 24.04 LTS runs without problems in VMs on Linux and Apple Mac hosts here (mainly VirtualBox, but tests in VMware and QEMU/KVM also did work) - so I would suggest to look if you could find any more about this on the Micro$oft side of things…
      Last edited by Schwarzer Kater; May 19, 2024, 01:42 PM.
      Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
      Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

      get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
      install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

      Comment


        #3
        I'm in the same boat as peterdicicco. Same symptoms. None of the combinations I've tried worked (Gen1, Gen2, with or without Secure Boot, all 3 templates offered under the Secure Boot section, with or without TPM, etc), and can also confirm I can go through the installation if I select Safe Graphics, but I'm not getting anywhere after the first reboot.

        I have VHD archives of all versions going all the way back to 11.04, and this is the first version I've come across that doesn't install under Hyper-V. I've never had to look at MS's Hyper-V support page, they all "just worked". I'm committed to Hyper-V (and have been for the last 15+ years), so suggestions to use an alternate hypervisor are non-starters to me. I've tried Hyper-V on Server 2022, as well as my previous (now semi-retired) host, Server 2012 R2. As well as Windows 10 22H2. Same results everywhere.

        I *have* verified the SHA-256 hash, and it matches exactly.

        Comment


          #4
          I am having the exact same issue that is described above. Has anyone figured out any fixes?

          Comment


            #5
            Here's what I did to get Kubuntu 24.04 working on Hyper-V:
            1. When installing, select Kubuntu (safe graphics) from the install menu. It contains the nomodeset option.
            2. Run through the install steps.
            3. Click Done to reboot the VM.
            4. The system will reboot to a black screen. Turn off the VM.
            5. Click the Start button to restart the VM. As soon as you do this, press the delete key repeatedly. If the grub menu does not appear, turn off the VM and try again.
            6. The first option in the grub menu is Kubuntu. Make sure it's highlighted and press "e" to edit the entry.
            7. Scroll down to linux /boot/vmlinuz... and replace quiet splash with nomodeset. Press Ctrl-x to boot.
            8. You should now have the sddm login screen. Login using the credentials you setup during the install process.
            9. Open Konsole and execute sudo nano /etc/default/grub to edit the grub settings.
            10. Change GRUB_TIMEOUT_STYLE=hidden to GRUB_TIMEOUT_STYLE=menu.
            11. Change GRUB_TIMEOUT=0 to GRUB_TIMEOUT=8.
            12. Change GRUB_CMDLINE_LINUX_DEFAULT='quiet splash' to GRUB_CMDLINE_LINUX_DEFAULT='video=hyperv_fb:1920x1 080'. Default resolution is 1024x768.
            13. Save the file using Ctrl-o and exit Ctrl-x.
            14. Run sudo update-grub.
            15. Install the Hyper-V drivers with sudo apt install linux-image-extra-virtual. Note: I didn't test without this step. Not sure if it's really needed.
            16. If you reboot the VM at this point, you'll see the boot log and then it will stop at "Finished systemd-update-utmp-runlevel.service - Record Runlevel Change in UTMP.". The system isn't frozen. Pressing Ctrl-Alt-F2 will bring up tty2. I think there is some issue with SDDM and/or video modes. After logging in, you can issue "startx" and you'll get a KDE desktop.
            17. To get around this issue, I installed LightDM and Slick Greeter with sudo apt install lightdm slick-greeter.
            18. A popup will appear for Configuring lightdm. Select lightdm as the default display manager.
            19. Now when you reboot, the LightDM login screen will appear and after entering your credentials the KDE desktop will appear.
            Sources I used to cobble this together:

            Comment


              #6
              Thank you primordial for the detailed instructions.​ I followed steps 1-14, skipped step 15 and completed step 16 and I was able to get a Kubuntu 24.04 instance working on Hyper-V. So this seems to be a valid work-around for this issue. I have read other users experienced similar install/upgrade issues on non Hyper-V systems. Perhaps this solution would also work for them. Our team decided to hold off on using the 24.04 version of Kubuntu until the Nov release given the existence of issues like this.

              Comment


                #7
                primordial Very nice ‘first’ post! Welcome to KFN.
                Windows no longer obstructs my view.
                Using Kubuntu Linux since March 23, 2007.
                "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                Comment


                  #8
                  peterdicicco Thanks for confirming that step 15 wasn't needed. You also don't need the Grub modifications if you're adept and hitting the delete key just right at VM boot. For me, it made changing the boot options easier. I later tried to make the VM an enhanced session, but that caused the VM connection to reset. There was an issue opened on the Ubuntu team I believe ( second bullet item in my list of sources ). Probably a good call by your company on holding off. I'm sure they'll provide a solution soon.

                  Snowhog Thank you! I was a software engineer for the last 30+ years so no stranger to the doc process.

                  Comment


                    #9
                    I also had this problem. I am a Linux beginner. I found some info online.

                    Originally posted by primordial View Post
                    [6]The first option in the grub menu is Kubuntu. Make sure it's highlighted and press "e" to edit the entry.
                    [7]Scroll down to linux /boot/vmlinuz... and replace quiet splash with nomodeset. Press Ctrl-x to boot.
                    nomodeset
                    Adding the nomodeset parameter instructs the kernel to not load video drivers and use BIOS modes instead until X is loaded.

                    quiet splash
                    The splash (which eventually ends up in your /boot/grub/grub.cfg ) causes the splash screen to be shown.
                    At the same time you want the boot process to be quiet, as otherwise all kinds of messages would disrupt that splash screen.

                    The problem is in the splash screen and display drivers I think. You can disable the video drivers with nomodeset or disable the splash screen by removing the splash part. This however will not start Xserver and the Simple Desktop Display Manager (SDDM)​. But it can be started manually.
                    Originally posted by primordial View Post
                    [16]If you reboot the VM at this point, you'll see the boot log and then it will stop at "Finished systemd-update-utmp-runlevel.service - Record Runlevel Change in UTMP.". The system isn't frozen. Pressing Ctrl-Alt-F2 will bring up tty2. I think there is some issue with SDDM and/or video modes. After logging in, you can issue "startx" and you'll get a KDE desktop.



                    Originally posted by primordial View Post
                    [12]Change GRUB_CMDLINE_LINUX_DEFAULT='quiet splash' to GRUB_CMDLINE_LINUX_DEFAULT='video=hyperv_fb:1920x1 080'. Default resolution is 1024x768.

                    The hyperv_fb:1920x1080 parameter forced my VM to use hyperv_fb. The fb in hyperv_fb stands for frame buffer, the memory used by the virtual screen driver and will be providing a framebuffer device for drawing to the screen. For some reason this does not work for me and I don't get the Display Virtual-1 instead I get the Display default or None-1. Does this mean the video driver could not load? Now my Kubuntu VM fells sluggish. Is this related to the latest Kernel?


                    So my approach is different.
                    1. When installing, select Kubuntu (safe graphics) from the install menu. It contains the nomodeset option.
                    2. Run through the install steps.
                    3. Click Done to reboot the VM.
                    4. The system will reboot to a black screen. Turn off the VM.
                    5. Click the Start button to restart the VM. As soon as you do this, press the delete key repeatedly. If the grub menu does not appear, turn off the VM and try again.
                    6. The first option in the grub menu is Kubuntu. Make sure it's highlighted and press "e" to edit the entry.
                    7. Scroll down to linux /boot/vmlinuz... and replace quiet splash with nomodeset. Press Ctrl-x to boot.
                    8. You should now have the sddm login screen. Login using the credentials you setup during the install process.
                    9. Open Konsole and execute sudo nano /etc/default/grub to edit the grub settings.
                    10. Change GRUB_CMDLINE_LINUX_DEFAULT='quiet splash' to GRUB_CMDLINE_LINUX_DEFAULT='quiet'​. I only removed the splash parameter.
                    11. Save the file using Ctrl-o and exit Ctrl-x.
                    12. Run sudo update-grub.
                    13. Blacklist the hyperv_fb and you would fallback to efifb (if UEFI enabled in guest). Open Konsole and execute sudo nano /etc/modprobe.d/blacklist to edit the setting.​
                    14. ​Add blacklist hyperv_fb​ at the end of the file.
                    15. Save the file using Ctrl-o and exit Ctrl-x.​
                    This removes the splash bug and gives me the default SDDM login screen and a Virtual-1 Display that has all the resolutions and 60Hz refresh rate.



                    BONUS: 4K Resolution at 60Hz in Console Window.
                    1. In Windows start PowerShell as Admin.
                    2. Run Set-VMVideo -VMName "Kubuntu" -HorizontalResolution 3840 -VerticalResolution 2160 -ResolutionType Maximum
                    3. Start the Kubuntu VM.
                    4. Run command xrandr. This gives us the name of the Display we use.
                    5. Our Display is Virtual-1
                      Code:
                      Screen 0: minimum 320 x 200, current 1024 x 768, maximum 1920 x 1200
                      	Virtual-1 connected primary 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
                      	1024x768 60.00*+
                      	1920x1080 60.00
                      	1600x1200 60.00
                      	1680x1050 59.95 59.88
                      	1400x1050 59.98 59.95
                      	1600x900 60.00
                      	1280x1024 60.02
                      	1440x900 59.89 59.90
                      	1280x960 60.00
                      	1366x768 59.79 60.00
                      	1360x768 60.02
                      	1280x800 59.81 59.91
                      	1280x768 59.87 59.99
                      	1280x720 60.00
                      	800x600 60.32 56.25
                      	848x480 60.00
                      	640x480 59.94​
                    6. Run command to calculate VESA CVT mode lines by given resolution: cvt 3840 2160
                    7. This outputs
                      Code:
                      # 3840x2160 59.98 Hz (CVT 8.29M9) hsync: 134.18 kHz; pclk: 712.75 MHz Modeline "3840x2160_60.00" 712.75 3840 4160 4576 5312 2160 2163 2168 2237 -hsync +vsync
                    8. Open Konsole and execute ~/.profile to edit the profile settings.​
                    9. Now add two lines at the bottom. We copy the parameters from the above command cvt. The part after Modeline. And for the second line we use the Display Virtual-1.
                    10. Code:
                      ​xrandr --newmode "3840x2160_60.00" 712.75 3840 4160 4576 5312 2160 2163 2168 2237 -hsync +vsync
                      xrandr --addmode Virtual-1​ "3840x2160_60.00"
                    11. Save the file using Ctrl-o and exit Ctrl-x.
                    12. Reboot

                    Comment


                      #10
                      Originally posted by INVICTRA View Post
                      I am a Linux beginner.
                      Some beginner! Very detailed response. Welcome to KFN!
                      Windows no longer obstructs my view.
                      Using Kubuntu Linux since March 23, 2007.
                      "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                      Comment


                        #11
                        I thought I'd also follow up, and confirm that Primordial's steps allowed me to carry on. As expected on step 16, the boot process stopped after "Finished systemd-update*", and step 17 (installing LightDM/Slick Greeter) now allows the Hyper-V VM to boot to the graphical login screen and log in as usual. I also *skipped* step 15.

                        Strangely, if I *only* install LightDM on step 17 (and not Slick Greeter), I get to the login screen, but my password keeps getting rejected. I found a discussion (https://superuser.com/questions/1662...not-in-lightdm) speculating this is a keyboard layout problem (after installing LightDM, the mapping is no longer correct) but I don't have an /etc/lightdm/lightdm.conf to edit, and the content of the folder I have looks dissimilar enough I figure things might have changed since that post was made and the solution might no longer be relevant. Rather than spending more time doing things above my pay grade, I'm just as happy including Slick Greeter. I hope this doesn't sound like complete non-sense, since this is the solution that worked for me in the end.

                        The Linux n00b in me wants to ask what's the relationship between LightDM and SDDM...and what might I expect to run any differently now that I've installed this, vs the default SDDM?​

                        Comment


                          #12
                          Originally posted by dandy-72 View Post
                          what's the relationship between LightDM and SDDM
                          They are different Login Managers, also known (misleadingly) as Dipslay Managers
                          You may have a slick-greeter conf file instead, or something similar instead. Slick is a variant or addon for LightDM. You could also try just creating the file with just the specific setting you want.

                          Originally posted by dandy-72 View Post
                          and what might I expect to run any differently now that I've installed this, vs the default SDDM?​
                          Nothing should be different, since these (more or less) pass things off to the desktop session.​

                          Comment


                            #13
                            Originally posted by claydoh View Post
                            They are different Login Managers, also known (misleadingly) as Dipslay Managers
                            You may have a slick-greeter conf file instead, or something similar instead. Slick is a variant or addon for LightDM. You could also try just creating the file with just the specific setting you want.


                            Nothing should be different, since these (more or less) pass things off to the desktop session.​
                            Got it, thanks. You're right, "Login Managers" and "Display Managers" sound like entirely different things and *is* misleading.

                            I've run across a few other recent distros that also had similar problems, where the solution (at the most fundamental level) was to replace "quiet splash" with "nomodeset", and I think there was only one other instance where replacing SDDM with LightDM turned out to also be necessary. As a Linux tinkerer, I probably spend more time creating VMs from ISOs than actually using them, and then archiving them for when (if) I need them later, and I prefer my "clean" VM images to have as few changes from the default install as possible.

                            Comment


                              #14
                              Hello. I am a newbie to forms in general and Linux as well even tho I have 40 years in iT, so please allow for me being a bit of an idiot here lol. I was in this forum ' Unable to install Kubuntu 24.04 on Hyper-V ' and was doing well figuring out my problem and had Kubuntu up and running using the process described by user ' Primordial ' but then I decided to go for the extra credit and give it in your post and I screwed myself up pretty good lol. I did decided to 'upgrade' my process using user ' Invictra ' improved process and everything was going OK until I hit the step in your procedure:
                              BONUS: 4K Resolution at 60Hz in Console Window.
                              1. In Windows start PowerShell as Admin.
                              2. Run Set-VMVideo -VMName "Kubuntu" -HorizontalResolution 3840 -VerticalResolution 2160 -ResolutionType Maximum
                              3. Start the Kubuntu VM.
                              ​- when I did 3. then 'start the Kubuntu vm' it would do nothing. I don't get any graphical anything no box pops up no nothing blinks no nothing just says it's running but I don't get any window to anything. I have tried to restart the VM with hitting the delete key many times and I keep getting nothing of any visual graphic sort.This seems to have locked me out of the ability to edit anything as well of course try to back out the 'blacklist' part etcetera. Do you know of any way I can edit files without having any sort of kubuntu interface? Is it possible to edit the file(s) without having kubuntu running in a VM? Any guidance would be much appreciated. thank you.
                              ​​​

                              Comment


                                #15
                                thanks but forget it I figured out just enough t be dangerous at this point lol. I clicked on the 'window' image in the Hyper V manager screen for the running VM and that got me where I needed to be to get things at least usable, if not optimal, at this point. I have a LOT to learn about how the VM and Kubuntu handle screen resolutions etc.. Now I just need to figure out WHY it changed to NOT start a new VM window without having to click the 'window' in the vm.

                                Comment

                                Working...
                                X