-
Notifications
You must be signed in to change notification settings - Fork 454
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
network_interface
in the wrong order of IP configuration for r/virtual_machine
#1147
Comments
@skydion - are you still seeing this issue? The Can you provide a redacted but reusable version of your configuration for reproduction? Ryan |
network_interface
in the wrong order of IP configuration for r/virtual_machine
If an OVA has two or more networks, when deployed, potentially the wrong networks are assigned to the adapters. Confirmed with multiple provider versions including the latest 2.1.0. Example OVA used - VMware Data Management for VMware Tanzu - DMS Provider OVA - dms-provider-va-1.1.0.1577-18978276.ova Example code can be found here In the below code, the wrong network labels are configured for the two networks mapped in my OVA file. When the VM is powered on, network connectivity cannot be made (ping), but if I go and manually edit the VM properties and change the VM networks around, the VM now responds to ping. data "vsphere_ovf_vm_template" "ovf" {
name = "${var.name}"
resource_pool_id = "${var.resource_pool_id}"
datastore_id = "${data.vsphere_datastore.datastore.id}"
host_system_id = "${data.vsphere_host.host.id}"
local_ovf_path = "${var.local_ovf_path}"
ovf_network_map = {
"Management Network": "${data.vsphere_network.mgmt_network.id}"
"Control Plane Network": "${data.vsphere_network.control_plane_network.id}"
}
}
resource "vsphere_virtual_machine" "vm" {
name = "${var.name}"
num_cpus = 8
memory = 16384
resource_pool_id = "${var.resource_pool_id}"
datastore_id = "${data.vsphere_datastore.datastore.id}"
folder = "${var.folder}"
wait_for_guest_net_timeout = 0
wait_for_guest_ip_timeout = 0
datacenter_id = "${data.vsphere_datacenter.dc.id}"
host_system_id = "${data.vsphere_host.host.id}"
dynamic "network_interface" {
for_each = "${data.vsphere_ovf_vm_template.ovf.ovf_network_map}"
content {
network_id = network_interface.value
}
}
ovf_deploy {
ovf_network_map = "${data.vsphere_ovf_vm_template.ovf.ovf_network_map}"
local_ovf_path = "${data.vsphere_ovf_vm_template.ovf.local_ovf_path}"
disk_provisioning = "thin"
} |
i ran through a test and this worked for me as the code has it written:
|
Marking as closed. Please open a new issue and reference #1147 is the problem persists. |
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. |
Terraform Version
Terraform v0.12.29
vSphere Provider Version
provider.vsphere v1.19.0
Affected Resource(s)
vsphere_virtual_machine
Terraform Configuration Files
Debug Output
Panic Output
Expected Behavior
I except than inside VM interfaces will have IP addresses like decribed in terraform output
Actual Behavior
But I have like this
Steps to Reproduce
Important Factoids
References
Community Note
The text was updated successfully, but these errors were encountered: