Packer Created VMs Failing to Boot
-
@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.
-
@AtaxyaNetwork or @ddelnano might tell you how to select the right template
-
@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. -
Hi @dan89 !
I'm not a windows expert, but I can do some testing.
Can you show us your pkr.hcl file ?
-
-
Do you have a pkr.hcl for windows that you can share?
I am curious how your handling winrm and autounattend.xml?
-
@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?
-
After posting this I ended up building out a sample project and shared on github.
https://github.com/mtcoffee/xcp-ng-packer-examples -
@mtcoffee talk about great timing?
About 25 minutes ago, I git cloned your repo!
Thanks. -
@mtcoffee Any luck getting autounattend.xml - UEFI to work?
-
-
Anyone know where the @ddelnano Discord channel is?
-
-
@olivierlambert thank you
-
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! -
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
-
@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:
- There is a disk added as "fda"
- 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?
-
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!
-
@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.
-
@fatek To be clear, absolutely nobody on the market has an equivalent to VMware. Nobody. We never told we could replace entirely all the VMware product.
Obviously, we'd like to close the gap as fast as possible, but the fact Vates is entirely privately bootstrapped and privately owned means we cannot burn VC's money at the pace of Nutanix for example.