cannot create a VM from a diskless template without an ISO #274
- 
 hi there 
 I am using this template
 https://registry.terraform.io/providers/terra-farm/xenorchestra/latest/docs/resources/vmso I created a file main.tf 
 with pretty same config from the example
 (only template name is diff because i don't have the one that is in example)https://pastebin.com/raw/qGQdCEUq Terraform plan -> OK 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" { │
- 
 O olivierlambert moved this topic from Xen Orchestra on O olivierlambert moved this topic from Xen Orchestra on
- 
 @gudge25 Hi ! I think it's because of this: data "xenorchestra_template" "template" { name_label = "Other install media" }You need to put the name of an existing template, as you can see in Home -> Template 
- 
 @AtaxyaNetwork 
 no it is existing
  
- 
 @gudge25 
 i trieddata "xenorchestra_template" "template" { name_label = "CentOS 7" }and data "xenorchestra_template" "template" { name_label = "Ubuntu Bionic Beaver 18.04" }same error 
- 
 @gudge25 You have two "type of template" - The one used in the VM creation (which handle some parameter for XCP-ng, IIRC)
- The one used for terraform, which is a VM converted to a template
 If you don't have template for the second use case, you can download it via the hub in XOA, or create a VM, install it and convert it to a template Sorry if I wasn't very clear 
- 
 @AtaxyaNetwork thanks for reply 
 i want to achieve VM creation from
 1-ISO
 and/or
 2-from Network (PXE installation )so i need 2 templates 
- 
 @gudge25 Terraform is designed to deploy infrastructure based on VM template. If you need to create VM "manually", you'll need to use a client for XCP-ng, like Xen Orchestra 
- 
 @AtaxyaNetwork 
 ok for example
 we have parameterinstallation_method - (Optional) This cannot be used with cdrom. Possible values are network which allows a VM to boot via PXE. so when i add it 
 installation_method = "network"
 i have another errorxenorchestra_vm.bar: Creating... ╷ │ Error: jsonrpc2: code 10 message: invalid parameters: {"errors":[{"instancePath":"/installation/repository","schemaPath":"#/properties/installation/properties/repository/minLength","keyword":"minLength","params":{"limit":1},"message":"must NOT have fewer than 1 characters"}]} │ │ with xenorchestra_vm.bar, │ on main.tf line 33, in resource "xenorchestra_vm" "bar": │ 33: resource "xenorchestra_vm" "bar" { │ ╵
- 
 @gudge25 I didn't find the installation method in the provider documentation  
 Can you show your full configuration ?
- 
 
- 
 @AtaxyaNetwork 
 https://pastebin.com/raw/q6qMn73Mand file cloud_config.tftpl file used by the cloudinit templating.#cloud-config 
 hostname: ${hostname}
 fqdn: ${hostname}.${domain}
 package_upgrade: true

