vatesfr / terraform-provider-xenorchestra

Xen Orchestra provider for Terraform
MIT License
149 stars 33 forks source link

cannot create a VM from a diskless template without an ISO #274

Closed gudge25 closed 5 months ago

gudge25 commented 8 months ago

I'm using pretty same as example i only changed name_label = "Puppet agent - Bionic 18.04 - 1" to name_label = "Ubuntu Bionic Beaver 18.04". -- I don't have "Puppet agent" template https://registry.terraform.io/providers/terra-farm/xenorchestra/latest/docs/resources/vm

my main.tf https://pastebin.com/raw/qGQdCEUq and I have cloud_config.tftpl file used by the cloudinit templating.

cloud-config

hostname: ${hostname} fqdn: ${hostname}.${domain} package_upgrade: true

terraform apply

Error: cannot create a VM from a diskless template without an ISO │ │ with xenorchestra_vm.bar, │ on main.tf line 33, in resource "xenorchestra_vm" "bar": │ 33: resource "xenorchestra_vm" "bar" { │

ddelnano commented 5 months ago

@gudge25 sorry for the late reply. This behavior is expected and so I'm going to close this issue.

Terraform expects that the template you use will have a preinstalled OS. The ideal arrangement is to have a packer built VM image and then to use that with the VM resource. I recommend reading this blog post on how to get started with the provider.

Happy to help you through getting the provider working, but this is a requirement for using it.