ipv4_gateway
address attached to only a single network_interface
when multiple attached to the same r/network
#1232
Labels
acknowledged
Status: Issue or Pull Request Acknowledged
area/guest
Area: Guest Operating System
bug
Type: Bug
confirmed
Issue: Confirmed
Milestone
Terraform Version
Terraform v0.13.2
vSphere Provider Version
1.24.0
Affected Resource(s)
vsphere_virtual_machine
Terraform Configuration Files
Debug Output
https://gist.github.com/wsf11/7950094d1ec67e91c61d62bab0ca2caf
Completes normally, no errors
Expected Behavior
I expect that two NICs are created, with two separate IP addresses, in the same subnet, both having the default gateway attached to the NIC.
Actual Behavior
Both NICs are created, but only one NIC has the default gateway attached. The gateway appears to be randomly assigned to one NIC or the other. Therefore, I cannot reach the VM through the NIC that does not have the gateway attached.
I remote into the machine and run
ipconfig
to see that only one NIC, theEthernet0
, has the default gateway IP address correct. It is empty for the other NIC,Ethernet 1
Steps to Reproduce
terraform init & apply
Important Factoids
I have reproduced this in the vSphere client using
VM Customization Specifications
and it worked fine. The template used was created using two NICs. I do customize the NICs and change the types as part of the deployment. This is a Windows 2019 Image. Also failing for Windows 2016The terraform state file reports the
default_ip_address
to be the IP address that doesn't have the gateway attached. I read that thedefault_ip_address
is the first IP address that the gateway can communicate with? Is something being overwritten?I put the DNS Server IP addresses into the NIC, but do not domain join yet as I domain join later. The IP addresses being used live inside a subnet and are available.
References
Community Note
The text was updated successfully, but these errors were encountered: