Network Adapter not connecting on Power ON - Vsphere Provider

Hello Everyone,

Could someone help me to solve this on Vmware using “vsphere” provider?

Problem: Network Adapter not connecting automatically. Refer screenshot!

I have to manually stop the VM and change the settings in Vsphere to connect this adapter. Let me know any other option can we use to control from terraform?

If this Adapter is not connecting during Power ON then there is no remote SSH and unable to execute remote scripts.

Below is the VM code used:

resource “vsphere_virtual_machine” “vm” {
name = “test-node01”
num_cpus = 2
memory = 4096
guest_id = “oracleLinux8_64Guest”
firmware = “efi”
efi_secure_boot_enabled = true
resource_pool_id = data.vsphere_compute_cluster.cluster.resource_pool_id
datastore_id = data.vsphere_datastore.datastore.id

network_interface {
  network_id = data.vsphere_network.network.id
}

}

Thanks!
Suresh Mahe :slightly_smiling_face:

Not enough information is provided in the thread to assist. But, it’s likely related to open-vm-tools not being installed on the template.

I am experiencing the same issue with Ubuntu 24.04, but not with 22.04 or 20.04. Does anyone have a solution for this problem?