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

    VM Failing to Reboot

    Scheduled Pinned Locked Moved Unsolved Management
    92 Posts 4 Posters 3.2k Views 3 Watching
    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.
    • D Offline
      dinhngtu Vates 🪐 XCP-ng Team @kagbasi-ngc
      last edited by

      @kagbasi-ngc Can you attach a kernel debugger using the VM's serial console?

      K 1 Reply Last reply Reply Quote 0
      • K Offline
        kagbasi-ngc @dinhngtu
        last edited by

        @dinhngtu Ooo, sounds interesting. Not sure how I would do that, but certainly open to learning.

        D 1 Reply Last reply Reply Quote 0
        • D Offline
          dinhngtu Vates 🪐 XCP-ng Team @kagbasi-ngc
          last edited by

          @kagbasi-ngc You'll find the instructions here: https://github.com/xcp-ng/xcp-ng-org/blob/wintools/docs/troubleshooting/windows-pv-tools.md#connecting-to-guests-using-serial-console

          K 1 Reply Last reply Reply Quote 0
          • K Offline
            kagbasi-ngc @dinhngtu
            last edited by

            @dinhngtu Thanks. I read through the instructions, and given that I'm unable to boot into Windows, I don't think I'll be able to complete this step:

            To configure kernel debugging on Windows, disable Secure Boot and BitLocker then run the following commands within the VM:
            bcdedit /debug on
            bcdedit /dbgsettings serial debugport:1 baudrate:115200
            

            Is there an alternative?

            D 1 Reply Last reply Reply Quote 0
            • D Offline
              dinhngtu Vates 🪐 XCP-ng Team @kagbasi-ngc
              last edited by dinhngtu

              @kagbasi-ngc You should be able to get into debugging mode via the Advanced Boot Options menu (spam F8 at boot). You'll still need to enable Secure Boot. I'm not sure if you'll be able to connect without running the /dbgsettings command, but it's worth a try. Note that you'll need to have WinDbg ready and connect it as soon as you select debugging mode.

              If all that fails, can you use Safe Mode or Last Known Good Configuration?

              K 1 Reply Last reply Reply Quote 0
              • K Offline
                kagbasi-ngc @dinhngtu
                last edited by

                @dinhngtu Okay, gonna give it a shot now. Will report back shortly.

                K 1 Reply Last reply Reply Quote 0
                • K Offline
                  kagbasi-ngc @kagbasi-ngc
                  last edited by kagbasi-ngc

                  @dinhngtu Unfortunately, no amount of smashing of the F8 key got me into the Advanced Boot Options menu, so I gave up on that.

                  Instead, I've booted up with Hiren's Boot Disc, and I'm about to see if perhaps I can uninstall the guest tools this way and try again. Any pointers are welcome.

                  BSOD3.jpeg

                  D 1 Reply Last reply Reply Quote 0
                  • D Offline
                    dinhngtu Vates 🪐 XCP-ng Team @kagbasi-ngc
                    last edited by dinhngtu

                    @kagbasi-ngc You can enable debugging from within Hiren's by mounting the Windows EFI system partition to e.g. S: then running bcdedit /store S:\EFI\Microsoft\Boot\BCD /debug on

                    You can also try renaming the .sys files but normally XenBootFix should have been sufficient to disable all Xen drivers.

                    I forgot to ask, how did you install guest tools onto your VM, and did you install anything else to it (e.g. some 3rd-party apps) before rebooting?

                    K 1 Reply Last reply Reply Quote 1
                    • K Offline
                      kagbasi-ngc @dinhngtu
                      last edited by kagbasi-ngc

                      @dinhngtu I installed the Citrix Tools into my template and then built the VM from the template (as I've always done). However, immediately prior to the reboot, I had just finished installing MediaEnable (email server) and was just trying to reboot to get some Group Policies to take effect.

                      Prior to that, I'd already rebooted the VM many times and not had any issues, however, I was always rebooting using the buttons in XOA not directly from within the OS.

                      I'm gonna go try what you've suggested now and see what happens.

                      D 1 Reply Last reply Reply Quote 0
                      • D Offline
                        dinhngtu Vates 🪐 XCP-ng Team @kagbasi-ngc
                        last edited by

                        @kagbasi-ngc Is it possible that your GPOs or MediaEnable that are causing the BSOD? Could you try to eliminate the causes?

                        K 1 Reply Last reply Reply Quote 0
                        • K Offline
                          kagbasi-ngc @dinhngtu
                          last edited by

                          @dinhngtu Sure, it's possible - though not likely. However, I'm willing to entertain you and I would uninstall them, except that I can't boot into the OS.

                          Anyway, I tried what you suggested by attempting to enable BCD Debug and it didn't work - got an error (even though the path is correct) :

                          BSOD4.jpeg

                          D 1 Reply Last reply Reply Quote 0
                          • D Offline
                            dinhngtu Vates 🪐 XCP-ng Team @kagbasi-ngc
                            last edited by dinhngtu

                            @kagbasi-ngc It's not the BCD database path but the BCD entry identifier. Try bcdedit /store ...\BCD /enum to get the entry's identifier, then bcdedit /store ...\BCD /set <identifier> /debug on

                            K 1 Reply Last reply Reply Quote 0
                            • D Offline
                              dinhngtu Vates 🪐 XCP-ng Team
                              last edited by

                              Also, one way to verify the issue is to install MediaEnable on another VM.

                              K 1 Reply Last reply Reply Quote 0
                              • K Offline
                                kagbasi-ngc @dinhngtu
                                last edited by

                                @dinhngtu Thanks, I did that but getting an error message that The system cannot find the file specified

                                BSOD5.jpeg

                                BSOD6.jpeg

                                D 1 Reply Last reply Reply Quote 0
                                • D Offline
                                  dinhngtu Vates 🪐 XCP-ng Team @kagbasi-ngc
                                  last edited by dinhngtu

                                  @kagbasi-ngc There's no slash in debug while using the /set command:

                                  acc115ab-f292-4030-b374-5366e7746aa2-image.png

                                  Also please don't enable debugging for bootmgr, just do it on {default}

                                  K 1 Reply Last reply Reply Quote 0
                                  • K Offline
                                    kagbasi-ngc @dinhngtu
                                    last edited by kagbasi-ngc

                                    @dinhngtu said in VM Failing to Reboot:

                                    @kagbasi-ngc There's no slash in debug while using the /set command:

                                    I had already tried that, but I think I did it on {bootmgr} - so I'll retry on {default} when I get back in the lab.

                                    Update as of 09:58AM EDT:
                                    I tried the command against the {default} identifier, and it worked. However, I didn't see any change in behavior during the boot process. Should I continue with the instructions for exposing the VMs serial console?

                                    1 Reply Last reply Reply Quote 0
                                    • K Offline
                                      kagbasi-ngc @dinhngtu
                                      last edited by

                                      @dinhngtu said in VM Failing to Reboot:

                                      Also, one way to verify the issue is to install MediaEnable on another VM.

                                      So, I built a new VM from the same template, renamed it and joined it to the domain (both actions required a reboot which was initiated from inside the OS). I then placed it in the correct OU and rebooted so it will grab the correct GPOs (this reboot action was also initiated from inside the OS). Finally, I installed MailEnable and when it finished I initiated a final reboot from inside the OS.

                                      None of the reboots caused the OS to fail to boot, and it was built from the same template (which has the Citrix Guest Tools v9.4 installed). Below is a link to a video I took of the test.

                                      https://photos.app.goo.gl/Uw7WgFRY1BEem8gA8

                                      D 1 Reply Last reply Reply Quote 0
                                      • D Offline
                                        dinhngtu Vates 🪐 XCP-ng Team @kagbasi-ngc
                                        last edited by dinhngtu

                                        @kagbasi-ngc said in VM Failing to Reboot:

                                        I tried the command against the {default} identifier, and it worked. However, I didn't see any change in behavior during the boot process. Should I continue with the instructions for exposing the VMs serial console?

                                        Yes, it won't show anything special on screen during boot, but attaching a debugger should work if everything is configured correctly. Note that it's timing dependent (there's a small time window where you can attach before it reaches the BSOD) so it might take a few tries.

                                        K 1 Reply Last reply Reply Quote 0
                                        • K Offline
                                          kagbasi-ngc @dinhngtu
                                          last edited by

                                          @dinhngtu Roger that, I'll try it now and see what happens.

                                          K 1 Reply Last reply Reply Quote 0
                                          • K Offline
                                            kagbasi-ngc @kagbasi-ngc
                                            last edited by

                                            @dinhngtu While following the instructions you shared on how to expose the VM's serial console, I'm having trouble with this command "bcdedit /dbgsettings serial debugport:1 baudrate:115200". I had to modify it slightly to specify the /store parameter (as indicated previously).

                                            Since I don't have the ability to run this command inside the OS, I am running it from a command shell that I accessed via the Troubleshooting menu (from an installation disk). It accepted the first command "bcdedit /store S:\EFI\Microsoft\Boot\BCD /set {default} debug on" but won't accept "bcdedit /store S:\EFI\Microsoft\Boot\BCD /set {default} dbgsettings serial debugport:1 baudrate:115200". It throws the following error:

                                            The element data type specified is not recognized or does not apply to the specified entry.
                                            

                                            What am I missing here?

                                            Second issue - I attempted to get the host ready by setting the parameters (as per the instructions) and opened the firewall port (I used 7001). However, when I attempt to connect to the host via SSH on tcp\7001, the connection is refused.

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