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

    Terraform Creating VM from my Windows Server 2025 Templates No Bootable Device

    Scheduled Pinned Locked Moved Infrastructure as Code
    1 Posts 1 Posters 8 Views 1 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.
    • S Offline
      SethNY
      last edited by

      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 disk

      No bootable device.
      Powering off in 30 seconds.

      6df50aa5-d733-4eef-a4b4-d635b40c06f9-image.png

      Workflow:

      1. create a VM from base (built-in Windows Server 2025) template, Windows Server 2025 evaluation ISO
      2. applied customization (e.g., increase/set display resolution
      3. ran sysprep
      4. converted to template
      5. test by manually creating a VM from the template = success
      6. 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-device

      Previously 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

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