I have 3 nodes in my cluster, let's call them nodeA, nodeB, nodeC.
They have RBD storage backed by Ceph, ceph-rbd.
I created a VM template on nodeA with a disk image on the ceph-rbd storage.
This VM template can be full cloned to nodeB and nodeC IF AND ONLY IF the clone is initiated from nodeA.
What happens if nodeA were to be taken down?
Well, I wouldn't be able to clone the image anymore.
So, I enable HA on the VM template so that it'll pop up on another node if the source node goes down.
Ok, so now I want to use something like Terraform/the API to create new VMs from that clone on any of my nodes.
How do I know which node to source the clone operation from?
Afaik the only way is to first query the API, parse the results and find the current node that has the VM template.
Also, I imagine none of the existing Terraform providers handle this situation. They probably assume the clone operation is supposed to run on the VM destination node -- as opposed to some random node with --target <destination node>.
It seems like whatever tool I use for automated VM creation not only needs to know about the VM template ID, but also the node that's currently owning the template.
Am I missing something here?
Thanks!
They have RBD storage backed by Ceph, ceph-rbd.
I created a VM template on nodeA with a disk image on the ceph-rbd storage.
This VM template can be full cloned to nodeB and nodeC IF AND ONLY IF the clone is initiated from nodeA.
What happens if nodeA were to be taken down?
Well, I wouldn't be able to clone the image anymore.
So, I enable HA on the VM template so that it'll pop up on another node if the source node goes down.
Ok, so now I want to use something like Terraform/the API to create new VMs from that clone on any of my nodes.
How do I know which node to source the clone operation from?
Afaik the only way is to first query the API, parse the results and find the current node that has the VM template.
Also, I imagine none of the existing Terraform providers handle this situation. They probably assume the clone operation is supposed to run on the VM destination node -- as opposed to some random node with --target <destination node>.
It seems like whatever tool I use for automated VM creation not only needs to know about the VM template ID, but also the node that's currently owning the template.
Am I missing something here?
Thanks!