terraform-provider-libvirt: Terraform Error: Failed to instantiate provider "registry.terraform.io/dmacvicar/libvirt" to obtain schema: Unrecognized remote plugin message
I tried this in two different systems. First System is Centos 7.8, the other system is Ubuntu 18.04.5 LTS Bionic. My Terraform version is v0.13.4.
I used the following provider information in my main.tf:
terraform {
required_providers {
libvirt = {
source = "dmacvicar/libvirt"
version = "0.6.2"
}
}
}
Also, I downloaded the “terraform-provider-libvirt” version 0.6.2 to “~/.local/share/terraform/plugins/registry.terraform.io/dmacvicar/libvirt/0.6.2/linux_amd64” directory. I saw this directory in some examples.
When I run the “terraform init” command, there was no error. After that, when I run the “terraform apply” command, I encountered the following error:
Error: Could not load plugin
Plugin reinitialization required. Please run “terraform init”.
Plugins are external binaries that Terraform uses to access and manipulate resources. The configuration provided requires plugins which can’t be located, don’t satisfy the version constraints, or are otherwise incompatible.
Terraform automatically discovers provider requirements from your configuration, including providers used in child modules. To see the requirements and constraints, run “terraform providers”.
Failed to instantiate provider “registry.terraform.io/dmacvicar/libvirt” to obtain schema: Unrecognized remote plugin message:
This usually means that the plugin is either invalid or simply needs to be recompiled to support the latest protocol.
How can I get rid of this problem, what is the solution?
About this issue
- Original URL
- State: open
- Created 3 years ago
- Comments: 22 (8 by maintainers)
Hi everybody. Thanks a lot for the feedback. 🙏
I am not going to invest much time debugging these problems. Most of the work is happening on the
pure-gobranch, where we get rid of libvirt client side. 🧑🏭This means:
If anyone wants to improve the situation, I welcome helping us testing the pure-go branch so that we can realease as soon as possible.
Confirmed, this works:
If you put your plugin at:
.terraform.d/plugins/local/macvicar/libvirt/0.6.3/linux_amd64.Building from source and moving the executable to the directory and using the name @bnevis-i suggested using terraform v0.13.6 worked for me.
I have the same problem.
I’ve had better results with
~/.terraform.d/plugins/registry.terraform.io/dmacvicar/libvirt/0.6.3/linux_amd64/terraform-provider-libvirt_v0.6.3instead. (I am using 0.6.3.)