Closed briantopping closed 6 years ago
Tnx!
Hello,
I tested this "actual example" with Terraform 0.10.7 and terraform-provider-xenserver 0.2.0 against a fresh Xen Server 7.2 installation (set up with https://github.com/ringods/xenserver-images), here are the errors:
* xenserver_vm.test: no VM template with label "CentOS 7.4 Template" has been found
After replacing with "CentOS 7" the template name which actually exists:
* xenserver_vm.test: API Error: UUID_INVALID network 92467b56-21a7-dfdd-b412-978181a69f32
So what does this UUID mean ? Is it a specific value for your Xen Server instance ? Where can I find it ?
Thanks for your help
Hello @debovema, in this example there are several assumptions and it should be used as a reference or bluprint only, since actual values depend on resources (templates, networks etc) available to your XenServer. For example, I've created on my server template with preinstalled and preconfigured CentOS and called it "CentOS 7.4 Template". If you use other templates you will need to tweak settings in this example accordingly, for example create VDIs and attach them as hard drives, attach ISO image to install CentOS and so on. Regarding you second question about UUID of the network - in this particular case it was UUID of some network, available on my server. You can get UUIDs of your networks with xe tool:
root@xenserver # xe network-list
In more broad sense UUIDs in XenServer serve as identifiers to different resources created, like VMs, VDIs, networks and so on. To obtain UUID of a required resource currently you will need to use xe tool similar to example above, but in future in will be available to query XenServer directly from terraform.
Hope this helps to solve your issue.
@debovema: If you take a look at the content that was there before, it was ...
, this was intended as an improvement for people like myself who followed, who had nothing to go on. I apologize that I had assumed a familiarity with Xen CLI, what @mborodin wrote pretty much covers the bases there.
In turn, you have actually found 100% of the issues with that code snippet, so if it's any consolation, this should be enough to get you going!
This was ripped from #17.