Closed pradeep-git23 closed 10 months ago
hi @josenk Can you please help me with this.
Not really any details in your output to point to any possible problems??? Do you have any additional details you can add?
Is this the first time you are trying to use this plugin? Is this a new problem, or existing problem? Did you compile it yourself? Did you try running this on another system, etc... and anything else you could add...
Yes, first time i am using the plugin. No, i used the existing plugin. I didnt make any changes on the plugin side i simply install terraform and run my piece of code.
You'll need to provide more details... Did you try the examples?
my terraform file looks like this and on executing terraform apply on this i am facing the subjected issue:
terraform { required_providers { esxi = { source = "kube-cloud/esxi" version = "1.9.5" } } } provider "esxi" { esxi_hostname = "***" esxi_hostport = 22 esxi_username = "root" esxi_password = "**" }
resource "esxi_guest" "vmtest02" { guest_name = "vmtest02" disk_store = "datastore1" boot_disk_type = "thin" boot_disk_size = "35" memsize = "2048" numvcpus = "2" power = "on"
ovf_source = "https://*.*.*.*/ui/#/host/storage/datastores/63d111ce-e393b6 e5-9e7c-000c29215e4b/Rhel-08-con/Rhel-08-con.vmx"
network_interfaces { virtual_network = "VM Network" nic_type = "e1000" }
guest_startup_timeout = 45 guest_shutdown_timeout = 30 }
i also tried with multiple version of provider but same error
source = "kube-cloud/esxi
I don't support the kube-cloud fork. Try one of the examples from this GitHub project.
i have tested with this provider as well unfortunatelly same error:
terraform { required_version = ">= 0.13" required_providers { esxi = { source = "registry.terraform.io/josenk/esxi" #
#
# https://github.com/josenk/terraform-provider-esxi
# https://registry.terraform.io/providers/josenk/esxi
#
}
} }
Are you able run ovftool manually?
No i didnt , is it mandatory to run ovftool before executing provisioning on esxi using this module ?
Yes, it's required and documented in the readme.
Hi @josenk i have installed ovftool now. Ovftool version: VMware ovftool 4.4.3 (build-18663434)
But still same issue. Throwing an error like "plugin is crashing"
you are using vSphere 8 ? If yes, i don't think this provider supports ESXi 8.x+
Hi @josenk ,
The terraform-provider-esxi_v1.10.0 plugin crashed!
Error: Plugin did not respond │ │ with esxi_guest.vmtest02, │ on main.tf line 17, in resource "esxi_guest" "vmtest02": │ 17: resource "esxi_guest" "vmtest02" { │ │ The plugin encountered an error, and failed to respond to the │ plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may contain more details. ╵
Stack trace from the terraform-provider-esxi_v1.10.0 plugin:
panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0xde2808]
goroutine 56 [running]: github.com/josenk/terraform-provider-esxi/esxi.guestCREATE(0xc00023a730, 0xc000266b10, 0x8, 0xc000266af0, 0xa, 0xc0001f1ce0, 0x70, 0x1977baf, 0x1, 0xc000266b68, ...) github.com/josenk/terraform-provider-esxi/esxi/guest-create.go:211 +0x1ef8 github.com/josenk/terraform-provider-esxi/esxi.resourceGUESTCreate(0xc00031bc00, 0xef9c20, 0xc00023a730, 0x2, 0x1a244e0) github.com/josenk/terraform-provider-esxi/esxi/resource_guest.go:403 +0x1968 github.com/hashicorp/terraform/helper/schema.(Resource).Apply(0xc00012ea00, 0xc00023bc70, 0xc0004b99c0, 0xef9c20, 0xc00023a730, 0xf0b401, 0xc0000f89c8, 0xc00042ccc0) github.com/hashicorp/terraform@v0.12.2/helper/schema/resource.go:286 +0x365 github.com/hashicorp/terraform/helper/schema.(Provider).Apply(0xc00012ed00, 0xc0005398d0, 0xc00023bc70, 0xc0004b99c0, 0xc00042e508, 0xc000113110, 0xf0d560) github.com/hashicorp/terraform@v0.12.2/helper/schema/provider.go:285 +0x99 github.com/hashicorp/terraform/helper/plugin.(GRPCProviderServer).ApplyResourceChange(0xc0001124c8, 0x12be040, 0xc0004224b0, 0xc00022fc80, 0xc0001124c8, 0xc0004224b0, 0xc000458a48) github.com/hashicorp/terraform@v0.12.2/helper/plugin/grpc_provider.go:851 +0x892 github.com/hashicorp/terraform/internal/tfplugin5._Provider_ApplyResourceChange_Handler(0x1020160, 0xc0001124c8, 0x12be040, 0xc0004224b0, 0xc00023b9a0, 0x0, 0x12be040, 0xc0004224b0, 0xc000312480, 0x46e) github.com/hashicorp/terraform@v0.12.2/internal/tfplugin5/tfplugin5.pb.go:3217 +0x217 google.golang.org/grpc.(Server).processUnaryRPC(0xc000001680, 0x12c95a0, 0xc000302f00, 0xc0003b5400, 0xc00030c630, 0x19ea200, 0x0, 0x0, 0x0) google.golang.org/grpc@v1.18.0/server.go:966 +0x46a google.golang.org/grpc.(Server).handleStream(0xc000001680, 0x12c95a0, 0xc000302f00, 0xc0003b5400, 0x0) google.golang.org/grpc@v1.18.0/server.go:1245 +0xc9e google.golang.org/grpc.(Server).serveStreams.func1.1(0xc000126190, 0xc000001680, 0x12c95a0, 0xc000302f00, 0xc0003b5400) google.golang.org/grpc@v1.18.0/server.go:685 +0xa1 created by google.golang.org/grpc.(*Server).serveStreams.func1 google.golang.org/grpc@v1.18.0/server.go:683 +0xa1
Error: The terraform-provider-esxi_v1.10.0 plugin crashed!