Terraform Creating VM from my Windows Server 2025 Templates No Bootable Device
-
BLUF: creating new VMs from my custom Windows Windows Server 2025 templates works, but using terraform I get failures.
XCP-ng 8.3, XO from sources.
Console messages
Console messages
Boot device: Hard Disk - success.
Boot device: CD-Rom - failure: could not read boot diskNo bootable device.
Powering off in 30 seconds.
Workflow:
- create a VM from base (built-in Windows Server 2025) template, Windows Server 2025 evaluation ISO
- applied customization (e.g., increase/set display resolution
- ran sysprep
- converted to template
- test by manually creating a VM from the template = success
- using terraform, all servers created do not boot
Background:
https://xcp-ng.org/forum/topic/9474/terraform-creating-vm-from-my-windows-templates-no-bootable-devicePreviously with 8.2 and Server 2022 I was able to change my workflow to use "Other installation media" as my base template, and it worked. Currently using "Other installation media" as my base template also fails. Windows 11 using the recommended base template is fine. Ubuntu Noble Numbat 24.04 base template does not work.
Excepts from servers.tf
data "xenorchestra_template" "server2025-template" {
name_label = "server2025-template"
}
[...]
resource "xenorchestra_vm" "dmz-iis" {
memory_max = 4294934528
cpus = 1
name_label = "dmz-iis"
name_description = "Windows Server 2025 in DMZ running IIS"
template = data.xenorchestra_template.server2025-template.id
depends_on = [xenorchestra_network.network_dmz1]
disk {
sr_id = data.xenorchestra_sr.local.id
name_label = "dmz-iis-disk"
size = 137438953472
}
network {
network_id = data.xenorchestra_network.branch1dmz.id
}
}
[...]Full details
https://github.com/doritoes/NUC-Labs/blob/xcp-ng-8.3/XCP-ng/terraform/servers.tf
https://github.com/doritoes/NUC-Labs/blob/xcp-ng-8.3/XCP-ng/Appendix-Terraform.md