Terraform-VMWare-Modules / terraform-vsphere-vm

Terraform vSphere module for provisioning Virtual Machines
https://registry.terraform.io/modules/Terraform-VMWare-Modules/vm/vsphere/
MIT License
167 stars 175 forks source link

Error: cannot find OS family for guest ID "other5xLinux64Guest": could not find guest ID "other5xLinux64Guest" #163

Open gowthamakanthan opened 2 months ago

gowthamakanthan commented 2 months ago

Team,

Am getting the following error while executing tf plan based on the latest tag.

Error:

Error: cannot find OS family for guest ID "other5xLinux64Guest": could not find guest ID "other5xLinux64Guest"

Code:

module "vm_creation" {
  for_each        = var.vm
  source          = "Terraform-VMWare-Modules/vm/vsphere"
  version         = "3.8.0"
  cpu_number      = var.vm_cpu
  dc              = var.dc_name[var.vsphere_datacentre]
  disk_datastore  = var.datastore_name[var.vsphere_datacentre]
  dns_server_list = var.dns_list
  dns_suffix_list = var.dns_search
  domain          = var.domain_name
  network         = each.value.network
  ram_size        = var.vm_ram
  staticvmname    = "${var.vsphere_datacentre}-${each.value.vmname}"
  vmfolder        = var.folder_name
  vmgateway       = each.value.vmgateway
  vmrp            = var.pool_name[var.vsphere_datacentre]
  vmtemp          = var.vm_template[var.vsphere_datacentre]
  io_share_level  = ["normal", "normal"]
}
damnsam commented 2 months ago

What version of vCenter are you connecting to? A quick google suggests that you may be using a vm template too "new" for the version of vCenter you are deploying to, and may require a manual edit of the vmtx file to say "other4xLinux64Guest"

gowthamakanthan commented 2 months ago

@damnsam Thanks for the followup. Am working with 7.0.3 vcenter version.

Looks like the code has downloaded thehashicorp/vsphere v2.2.0 plugin, Have tried to use the tf init -upgrade and which downloaded the latest plugin (hashicorp/vsphere v2.8.2) which fixed the issue. please close this.

Refer: https://github.com/Terraform-VMWare-Modules/terraform-vsphere-vm/blob/master/versions.tf#L5