terra-farm / terraform-provider-xenserver

XenServer provider for Terraform
https://terra-farm.github.io/provider-xenserver/
MIT License
72 stars 36 forks source link

Failed to instantiate provider "xenserver" to obtain schema: Incompatible API version with plugin. Plugin version: 4, Client versions: [5] #45

Open Antonynixson opened 4 years ago

Antonynixson commented 4 years ago

Hello There,

I'm trying to learn Terraform, i have a Citrix XenServer hypervisor installed on server that I want to use with. I just installed terraform and xenserver provider, also can able to initiate the terraform code But while i do terraform plan, terraform apply i will be getting the below issue,

[root@localhost test]# terraform plan
Error: Failed to instantiate provider "xenserver" to obtain schema: Incompatible API version with plugin. Plugin version: 4, Client versions: [5]
[root@localhost test]#

Please find the error on the attached image,

plan_issue

Please find my terraform code below

# Configure the XenServer Provider
provider "xenserver" {
  url      = "http://192.168.231.12/"
  username = "user"
  password = "password"
}

resource "xenserver_vm" "test" {
  base_template_name = "MYTEST"
  network_uuid = "978b1b0f-0d08-d38f-afad-dd1c8ff7c45d"
  name_label = "test"
  static_mem_min = 8589934592
  static_mem_max = 8589934592
  dynamic_mem_min = 8589934592
  dynamic_mem_max = 8589934592
  vcpus = 1
  boot_order = "c"

  hard_drive {
    is_from_template = true
    user_device = "0"
  } # Template VM HDD
  cdrom {
    is_from_template = true
    user_device = "3"
  }
  network_interface {
    device = 0
    mtu = 1500
    mac = ""
    other_config {
        ethtool-gso = "off"
        ethtool-ufo = "off"
        ethtool-tso = "off"
        ethtool-sg = "off"
        ethtool-tx = "off"
        ethtool-rx = "off"
    }
  }
}

Can anyone please let me know if i done something wrong.

ringods commented 4 years ago

This provider does not yet have a release compatible with Terraform 0.12.

Antonynixson commented 4 years ago

Hi ringods, Thanks for the replay, i will check it out with terraform v0.10.7, i had couple of queries, 1) which version of xenserver this will support ? 2) also can you please confirm, is it possible to launch multiple vm in a single terraform script ? 3) do you have any explanation of sample template for config parameters ? like (static_mem_min,boot_order,ethtool-gso, etc)

Antonynixson commented 4 years ago

Hello all,

  1. This will support on xenserver 7.6, i have tested with xenserver 7.6

  2. Yes, i can able to launch multiple VM in a single terraform script

  3. Please let me know if you have any explanation of sample template for config parameters ? like (static_mem_min,boot_order,ethtool-gso, etc)

replay111 commented 4 years ago

Is this plugin working with Xenserver 8.x ?

replay111 commented 4 years ago

On 7.6.0 working but I am given to interfaces: eth0 and eth1....:

nmcli -t -f device connection show --active

gives me:

eth0
eth1

but

nmcli c modify eth0 ipv4.addresses 10.0.10.2/24

gives me:

Error: unknown connection 'eth0'

Does anyone of you have had similar issue?