-
Notifications
You must be signed in to change notification settings - Fork 449
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The terraform-provider-vsphere_v2.4.1_x5.exe plugin crashed! #1953
Comments
Hello, nprasadnurani! 🖐 Thank you for submitting an issue for this provider. The issue will now enter into the issue lifecycle. If you want to contribute to this project, please review the contributing guidelines and information on submitting pull requests. |
Hi, I would like to check on the progress of this issue, got the same problem on my machine.
Cheers, |
Update: Problem solved. In my case, from provider version 2.4.x it is not compatible with vSphere version 6.x. anymore Provider downgrade to 2.3.1 solved the problem, no crashes. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Community Guidelines
Terraform
Terraform v1.5.3
Terraform Provider
v2.4.1
VMware vSphere
7.0.3.01400
Description
while running terraform import to get the existing infrastruture details it crashed
Affected Resources or Data Sources
resource "vsphere_virtual_machine" "vm" {
name = <VM_NAME>
resource_pool_id = "${data.vsphere_resource_pool.pool.id}"
datastore_id = "${data.vsphere_datacenter.Awesome.id}"
num_cpus = 4
memory = 4096
network_interface {
network_id = data.vsphere_network.network.id
}
disk {
label = "Hard disk 1"
size = 232
thin_provisioned = true
}
}
Terraform Configuration
No resource pool or cluster defined so used the following vpshere_resource_pool to get resouce_id for vpshere_vitrual_machine
data "vsphere_resource_pool" "pool" {
name = "${vsphere_folder.parent.path}/Resources"
datacenter_id = "${data.vsphere_datacenter.Awesome.id}"
}
resource "vsphere_virtual_machine" "vm" {
name = <VM_NAME>
resource_pool_id = "${data.vsphere_resource_pool.pool.id}"
datastore_id = "${data.vsphere_datacenter.Awesome.id}"
num_cpus = 4
memory = 4096
network_interface {
network_id = data.vsphere_network.network.id
}
disk {
label = "Hard disk 1"
size = 232
thin_provisioned = true
}
Debug Output
https://gist.github.com/nprasadnurani/a7690368d7dddcb536a50ce409352a7b
Panic Output
No resource pool or cluster defined so used the following vpshere_resource_pool to get resouce_id for vpshere_vitrual_machine
data "vsphere_resource_pool" "pool" {
name = "${vsphere_folder.parent.path}/Resources"
datacenter_id = "${data.vsphere_datacenter.Awesome.id}"
}
resource "vsphere_virtual_machine" "vm" {
name = <VM_NAME>
resource_pool_id = "${data.vsphere_resource_pool.pool.id}"
datastore_id = "${data.vsphere_datacenter.Awesome.id}"
num_cpus = 4
memory = 4096
network_interface {
network_id = data.vsphere_network.network.id
}
disk {
label = "Hard disk 1"
size = 232
thin_provisioned = true
}
Crash trace
vsphere_virtual_machine.vm: Import prepared!
Prepared vsphere_virtual_machine for import
vsphere_virtual_machine.vm: Refreshing state... [id=4220dd3b-2f07-4d9a-3395-c0a806a81622]
╷
│ Error: Plugin did not respond
│
│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more details.
╵
Stack trace from the terraform-provider-vsphere_v2.4.1_x5.exe plugin:
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x8 pc=0x17b5274]
goroutine 88 [running]:
github.com/hashicorp/terraform-provider-vsphere/vsphere.resourceVSphereVirtualMachineRead(0x134e17c0, {0x19630a0, 0x136025b8})
github.com/hashicorp/terraform-provider-vsphere/vsphere/resource_vsphere_virtual_machine.go:450 +0x6b4
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0x13888850, {0x1d80500, 0x13602528}, 0x134e17c0, {0x19630a0, 0x136025b8})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/resource.go:712 +0x166
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).RefreshWithoutUpgrade(0x13888850, {0x1d80500, 0x13602528}, 0x135b96c0, {0x19630a0, 0x136025b8})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/resource.go:1015 +0x547
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadResource(0x1392a010, {0x1d80500, 0x136024c8}, 0x13a0cee0)
github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/grpc_provider.go:613 +0x4f4
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ReadResource(0x13930050, {0x1d80500, 0x1345ff38}, 0x13628630)
github.com/hashicorp/terraform-plugin-go@v0.14.3/tfprotov5/tf5server/server.go:748 +0x4c5
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler({0x1b50ac0, 0x13930050}, {0x1d80500, 0x1345ff38}, 0x13752d40, 0x0)
github.com/hashicorp/terraform-plugin-go@v0.14.3/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:349 +0x18a
google.golang.org/grpc.(*Server).processUnaryRPC(0x13704360, {0x1d82188, 0x13704000}, 0x13a0a460, 0x13916138, 0x262d1e8, 0x0)
google.golang.org/grpc@v1.51.0/server.go:1340 +0xe22
google.golang.org/grpc.(*Server).handleStream(0x13704360, {0x1d82188, 0x13704000}, 0x13a0a460, 0x0)
google.golang.org/grpc@v1.51.0/server.go:1713 +0xa17
google.golang.org/grpc.(*Server).serveStreams.func1.2()
google.golang.org/grpc@v1.51.0/server.go:965 +0xb1
created by google.golang.org/grpc.(*Server).serveStreams.func1
google.golang.org/grpc@v1.51.0/server.go:963 +0x25f
Error: The terraform-provider-vsphere_v2.4.1_x5.exe plugin crashed!
Expected Behavior
import successful
should have imported the infrastructure details into tfstate
Actual Behavior
The terraform-provider-vsphere_v2.4.1_x5.exe plugin crashed!
Steps to Reproduce
run terraform import vsphere_virtual_machine.vm <VM_PATH>
Environment Details
windows
Screenshots
References
No response
The text was updated successfully, but these errors were encountered: