XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    UEFI Setting on VM for nested virtualization?

    Compute
    5
    17
    2.3k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • NoidenN
      Noiden
      last edited by

      Hi,

      I'm running a Win2k19 Server as a VM with UEFI.
      I have activated nested virtualization.

      But Docker or Hyper-V won't run. Error message is that a Hyper-V component is not running.

      So I was thinking I might have to enable some virtualiztion option in "BIOS", but I'm running UEFI on this VM.

      Is this possible or how should I make this work?

      Thanks.

      X 1 Reply Last reply Reply Quote 0
      • stormiS
        stormi Vates πŸͺ XCP-ng Team πŸš€
        last edited by

        I've successfully run nested UEFI XCP-ng in a VM in XCP-ng, but nested virt is not a guaranteed-stable feature for every use, so it may need improvements for running Hyper-V or Docker in Windows.

        However the cause may be elsewhere and I'm not knowledgeable enough about Windows and Hyper-V or Docker on Windows to be really helpful.

        NoidenN 1 Reply Last reply Reply Quote 0
        • NoidenN
          Noiden @stormi
          last edited by

          @stormi

          Ok... But do I need to get into some settings in UEFI? Like in BIOS, where you can press, DEL or F1 or something to go into settings and enable virtualization function?

          1 Reply Last reply Reply Quote 0
          • stormiS
            stormi Vates πŸͺ XCP-ng Team πŸš€
            last edited by

            I don't have the answer, but maybe someone else does...

            1 Reply Last reply Reply Quote 0
            • X
              XCP-ng-JustGreat @Noiden
              last edited by

              @noiden Hello, there is an obscure setting in new versions of Windows 10/Server 2019 under Security, Exploit Protections, Programs, vmcompute.exe, Control Flow Guard (CFG), toggle switch off to allow Hyper-V and Docker Containers to run. Have a look at that.

              NoidenN 1 Reply Last reply Reply Quote 0
              • NoidenN
                Noiden @XCP-ng-JustGreat
                last edited by

                @xcp-ng-justgreat Hello, I tried that, but got the same error. 😞

                I think on VMware you had to enable it in the BIOS settings,

                51677f42-f9fb-4fff-855e-610e55539381-image.png

                Don't I have to do that on this VM in XCP-ng also? But I can't find any way to get into the BIOS settings, is it because I have UEFI? Or should I not push "DEL" to get into the settings on boot?

                Thanks.

                1 Reply Last reply Reply Quote 0
                • olivierlambertO
                  olivierlambert Vates πŸͺ Co-Founder🦸 CEO πŸ§‘β€πŸ’Ό
                  last edited by

                  There's no emulated BIOS with options in XCP-ng. If it's enabled on the VM (nested), it should work.

                  If it doesn't, it might be a problem on the guest OS and the nested mechanism.

                  NoidenN 1 Reply Last reply Reply Quote 0
                  • NoidenN
                    Noiden @olivierlambert
                    last edited by

                    @olivierlambert Ok, and nested should work with UEFI? Or should I change to BIOS?

                    X 1 Reply Last reply Reply Quote 0
                    • olivierlambertO
                      olivierlambert Vates πŸͺ Co-Founder🦸 CEO πŸ§‘β€πŸ’Ό
                      last edited by

                      In theory, it's unrelated.

                      1 Reply Last reply Reply Quote 0
                      • X
                        XCP-ng-JustGreat @Noiden
                        last edited by

                        @noiden @olivierlambert There are settings in the Tiano UEFI firmware. Can't remember if there is one to turn on guest virtualization. I believe the hotkey to enter is F2. On Windows, if you click the power, restart option while holding down the SHIFT key, it should provide you with advanced startup options one of which is to access UEFI firmware settings.

                        NoidenN 1 Reply Last reply Reply Quote 0
                        • NoidenN
                          Noiden @XCP-ng-JustGreat
                          last edited by

                          @xcp-ng-justgreat I got in there, but there was no settings about that. I should troubleshoot some more, with Hyper-V itself. πŸ™‚

                          X 1 Reply Last reply Reply Quote 0
                          • X
                            XCP-ng-JustGreat @Noiden
                            last edited by

                            @noiden Assuming the setting preventing processor virtualization is not in UEFI firmware, then keep looking at those obscure new exploit protection settings. I know that disabling CFG solved the problem for us on a physical server where we needed to run Docker containers. I have personally used nested virtualization of a UEFI-booted XCP-ng guest, running on XCP-ng (very cool, it works!) and did not have any problems. Since Docker won't run without the Hyper-V virtualization engine running, I still believe the answer for you lies there.

                            1 Reply Last reply Reply Quote 1
                            • NoidenN
                              Noiden
                              last edited by

                              @xcp-ng-justgreat I have checked here, https://wiki.xenproject.org/wiki/Nested_Virtualization_in_Xen

                              But I can't really figure out where to set the options,

                              hap=1
                              nestedhvm=1
                              cpuid = ['0x1:ecx=0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx']
                              

                              I have set theese variables on the VM under vm-param platform and other-config. But that does not help.

                              I have also disabled the CFG on the VM, still no luck though.

                              Thanks.

                              1 Reply Last reply Reply Quote 0
                              • H
                                Haribo112
                                last edited by

                                I'm currently struggling with the same problem; running Windows Server 2019 on XCP-ng 8.1.0 . I changed the settings hinted at by @XCP-ng-JustGreat but it did not work.

                                X 1 Reply Last reply Reply Quote 0
                                • X
                                  XCP-ng-JustGreat @Haribo112
                                  last edited by

                                  @haribo112 @Noiden All, from within Windows, when you launch the task manager, performance tab, under CPU details, does it show you that virtualization is enabled? If yes, then the nested virtualization setting in XCP-ng appears to have worked. Try removing the Hyper-V roles and any related virtualization features and dependencies including your container support, reboot and then reinstall them and perform a finishing reboot. Coupled with disabling Control Flow Guard (CFG) for vmcompute.exe, I'm afraid that that's all I've got for you since that is what worked for us.

                                  H 1 Reply Last reply Reply Quote 0
                                  • H
                                    Haribo112 @XCP-ng-JustGreat
                                    last edited by

                                    @xcp-ng-justgreat I will try that sequence. Obviously, Virtualization Extensions are detected by Windows, or else I wouldn't be able to install the Hyper-V role at all. The CPU performance tab of task manager does not show what you indicated, as it already says "Virtual machine: yes" in that location.

                                    Honestly I'm considering rebuilding my homelab as a Hyper-V cluster, but that sucks too because realistically you need a domain controller for that to function properly.

                                    X 1 Reply Last reply Reply Quote 0
                                    • X
                                      XCP-ng-JustGreat @Haribo112
                                      last edited by

                                      @haribo112 @Noiden All, Looks like nested virtualization of Hyper-V within XCP-ng is a no go unless something changes in either or both XCP-ng and Hyper-V. Device driver for the Hyper-V virtual machine bus provider is the missing component that won't load. Seems this may be a problem only Microsoft can fix. 😞

                                      8d8e6de5-5aa1-42f3-bcdf-8100a0d60459-image.png

                                      1 Reply Last reply Reply Quote 0
                                      • First post
                                        Last post