-
Notifications
You must be signed in to change notification settings - Fork 32
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. |
What on earth pool.master mean? What's the point of adding in pool via label as a data parameter then? |
It's the master node (=physical server) of a pool. Read more in XCP-ng and Xen-orchestra docs 😉
Le 14 février 2025 21:44:46 GMT+01:00, OTonGitHub ***@***.***> a écrit :
OTonGitHub left a comment (vatesfr/terraform-provider-xenorchestra#243)
What on earth pool.master mean? What's the point of adding in pool via label as a data parameter then?
--
Reply to this email directly or view it on GitHub:
#243 (comment)
You are receiving this because you are subscribed to this thread.
Message ID: ***@***.***>
--
Nathanaël
Envoyé depuis /e/OS Mail.
|
@nathanael-h I apologize for my stupid comment, I later on read a lot, and understood it well and made a little template the next day here as well https://github.com/OTonGitHub/Terraform-XO to get started. |
There's no stupid questions, glad you managed to move forward! |
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: