New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't create VM without specifying an affinity_host - issue with an empty string #243
Comments
Same issue here,
|
+1 with that issue |
Pinging @julien-f so we can fix this (likely in XO) |
Is the error message coming from the XO side, because of a requirement or because of how the VM is being created by terraform? |
The error message is coming from XO. The api was recently updated to enforced that optional fields should be |
Sorry for the delay. Travel, work, and stuff. Plus, it's been nice outside in my area. I ran across this in the documentation: This solves my problem, I can't say if this was added since I started playing with terraform or not. Either way, my problem is solved. |
I'm trying to create a diskless VM. The VM creation part works, however I need to include an affinity_host line in my VM's configuration, so I used the data.xenorchestra_pool.pool.id item, which in my mind should allow the hypervisor to choose the best host within the Homelab pool. The VMs create, but they can't be started because the hypervisor never assigns a host to the VMs.
Ultimately, that's what I would like to do. Omit the affinity_host configuration item entirely, or specify the xenorchestra.host as "none" on the affinity_host line, and have the hypervisor choose the host.
main.tf has:
data "xenorchetra.pool" "pool" {
name_label = "Homelab"
}
vm.tf has:
...
memory_max = 107374182400
cpus = 2
hvm_boot_firmware = "uefi"
name_label = each.key
name_description = each.value
affinity_host = data.xenorchestra_pool.pool.id
template = data.xenorchestra_template.talos_control.id
network {
network_id = data.xenorchestra_network.net.id
}
...
The text was updated successfully, but these errors were encountered: