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

    Packer Created VMs Failing to Boot

    Scheduled Pinned Locked Moved Infrastructure as Code
    28 Posts 6 Posters 4.2k Views 6 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.
    • olivierlambertO Offline
      olivierlambert Vates πŸͺ Co-Founder CEO
      last edited by

      You are probably not using the right template in the first place πŸ™‚

      D 1 Reply Last reply Reply Quote 0
      • olivierlambertO olivierlambert moved this topic from Compute on
      • D Offline
        dan89 @olivierlambert
        last edited by

        @olivierlambert That is always a possibility πŸ˜…

        I created the Windows and CentOS templates the same way by creating a base VM without installing the OS and then capturing that as a Template. I also tried copying the default pre-defined Windows Server 2022 template.

        πŸ€”

        1 Reply Last reply Reply Quote 0
        • olivierlambertO Offline
          olivierlambert Vates πŸͺ Co-Founder CEO
          last edited by

          @AtaxyaNetwork or @ddelnano might tell you how to select the right template

          D AtaxyaNetworkA 2 Replies Last reply Reply Quote 0
          • D Offline
            dan89 @olivierlambert
            last edited by

            @olivierlambert - Figured it out for anyone else's future reference.

            When setting platform_args you need to define all of them even if you only need to change one.

            Since the defaults are

            {
                "viridian": "false",
                "nx": "true",
                "pae": "true",
                "apic": "true",
                "timeoffset": "0",
                "acpi": "1",
                "cores-per-socket": "1"
            }
            

            I needed to include all of them even though I only needed "viridian": "true". Once I added in the other options the VM booted and the build worked.

            AtaxyaNetworkA M 2 Replies Last reply Reply Quote 0
            • AtaxyaNetworkA Offline
              AtaxyaNetwork Ambassador @olivierlambert
              last edited by

              Hi @dan89 !

              I'm not a windows expert, but I can do some testing.

              Can you show us your pkr.hcl file ?

              1 Reply Last reply Reply Quote 0
              • AtaxyaNetworkA Offline
                AtaxyaNetwork Ambassador @dan89
                last edited by

                We posted at the same time πŸ˜„

                @dan89 Glad you figured it out !

                Maybe it can be documented in the packer repo. What do you think @ddelnano ?

                1 Reply Last reply Reply Quote 1
                • M Offline
                  mtcoffee @dan89
                  last edited by

                  @dan89

                  Do you have a pkr.hcl for windows that you can share?

                  I am curious how your handling winrm and autounattend.xml?

                  1 Reply Last reply Reply Quote 0
                  • F Offline
                    fatek
                    last edited by

                    @mtcoffee said in Packer Created VMs Failing to Boot:

                    Do you have a pkr.hcl for windows that you can share?

                    Follow up question: Do you have a pkr.hcl for windows that you can share?

                    M 1 Reply Last reply Reply Quote 0
                    • M Offline
                      mtcoffee @fatek
                      last edited by

                      @fatek

                      After posting this I ended up building out a sample project and shared on github.
                      https://github.com/mtcoffee/xcp-ng-packer-examples

                      F 2 Replies Last reply Reply Quote 1
                      • F Offline
                        fatek @mtcoffee
                        last edited by

                        @mtcoffee talk about great timing?
                        About 25 minutes ago, I git cloned your repo!
                        Thanks.

                        1 Reply Last reply Reply Quote 0
                        • F Offline
                          fatek @mtcoffee
                          last edited by

                          @mtcoffee Any luck getting autounattend.xml - UEFI to work?

                          M 1 Reply Last reply Reply Quote 0
                          • M Offline
                            mtcoffee @fatek
                            last edited by

                            @fatek

                            I noted that in the packer file. I was not able to get packers floppy_files working in uefi mode.

                            @ddelnano might have some insight?

                            1 Reply Last reply Reply Quote 1
                            • F Offline
                              fatek
                              last edited by

                              Anyone know where the @ddelnano Discord channel is?

                              1 Reply Last reply Reply Quote 0
                              • olivierlambertO Offline
                                olivierlambert Vates πŸͺ Co-Founder CEO
                                last edited by

                                https://discord.gg/Cp2CDhqd

                                F 1 Reply Last reply Reply Quote 0
                                • F Offline
                                  fatek @olivierlambert
                                  last edited by

                                  @olivierlambert thank you

                                  1 Reply Last reply Reply Quote 0
                                  • F Offline
                                    fatek
                                    last edited by

                                    I would really love to get this working w XCP, no bios, I mean uefi only.
                                    Packer was super easy to setup on ESXi + vCenter!

                                    1 Reply Last reply Reply Quote 0
                                    • olivierlambertO Offline
                                      olivierlambert Vates πŸͺ Co-Founder CEO
                                      last edited by olivierlambert

                                      Contributions are welcome, we are pretty busy here, and if we planned to have a fully dedicated "Devops" team, it will be in place in September. So please be patient, we do not have 5000 engineers πŸ˜‰

                                      M 1 Reply Last reply Reply Quote 0
                                      • M Offline
                                        mtcoffee @olivierlambert
                                        last edited by

                                        @olivierlambert is spot on. Manage expectations. The best thing we can do is contribute helpful information.

                                        Here is what I was able to deduce when this issue came up.

                                        When creating a Windows VM in uefi mode and using the floppy_file option in packer:

                                        1. There is a disk added as "fda"
                                        2. However the fda device is not available as the a: drive or any other drive letter. When booted using bios mode, you can find the fda device by settting drive letter to "a:".

                                        This is likely because uefi typically does not support floppy disks. I believe in VMWare when the floppy_file option was used in UEFI mode, it added the ISO as a DVD drive instead of an FDA.

                                        Not sure if this is best solved at the Packer level or if it should be intercepted and corrected XCP-ng level?

                                        F 2 Replies Last reply Reply Quote 1
                                        • F Offline
                                          fatek
                                          last edited by

                                          I hear you regarding "managing expectations".

                                          If Vates (as a company) is going to claim they offer VMware type/like value then Windows can not be a 2nd class citizen in your ecosystem!

                                          olivierlambertO F 2 Replies Last reply Reply Quote 0
                                          • F Offline
                                            fatek @mtcoffee
                                            last edited by

                                            @mtcoffee It seems like getting Packer involved would be the way to go but I have zero idea on what is involved.

                                            Looking at vSphere ISO docs, there is the option to create cdrom configs and also another option to use cd_files (list of files to place on to a CD that is attached when the VM is booted).

                                            I don't see that option in the XenServer-iso docs.

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