Open msyretis opened 6 months ago
Hello, msyretis! 🖐
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.
A second thing I just noticed, the ovf template and the VM you spawn, if you try to use different networks, the vm is deployed with what the template is deployed:
+ ovf_deploy {
+ allow_unverified_ssl_cert = true
+ deployment_option = "large"
+ disk_provisioning = "thin"
+ enable_hidden_properties = false
+ ovf_network_map = {
+ "VM Network" = "network-117418"
}
+ remote_ovf_url = "[http://<somefqdn>/nsx-unified-appliance-4.1.2.1.0.22667794.ova"](http://<somefqdn>/nsx-unified-appliance-4.1.2.1.0.22667794.ova%22)
}
# data.vsphere_network.mgmt_network:
data "vsphere_network" "mgmt_network" {
datacenter_id = "datacenter-21"
distributed_virtual_switch_uuid = "50 09 09 87 b5 3b 3f 4a-61 fa 56 74 89 0b 1f bd"
id = "dvportgroup-117407"
name = "gb1-sdn-management"
type = "DistributedVirtualPortgroup"
}
for the three VMs I am using a DVS PG,
network_interface {
network_id = data.vsphere_network.mgmt_network.id
}
while for the ovf I have to use a dummy PG on a dummy standard vswitch
ovf_network_map = {
"VM Network" : data.vsphere_network.template_network.id
}
Community Guidelines
Terraform
1.6.6
Terraform Provider
2.5.1 and 2.6.1
VMware vSphere
vcentre v8.0.2 esxi 7.0.3
Description
For resource data "vsphere_ovf_vm_template" "nsx-ova" when the ovf_network_map is a portgroup on a standard switch the planning works as expected, but fails when the ovf_network_map is a portgroup on a DVS
Affected Resources or Data Sources
fails:
succeeds:
Terraform Configuration
Ultimately after the OVA is described, three VMs are spawned
the problem is that none of the hosts in the mgmt cluster have a standard switch, I tried to split the template and the VMs to different clusters/hosts but that fails again.
Debug Output
link to outputs:
https://gist.github.com/msyretis/1904b12f4655f43ac65493a91cb13679
Panic Output
No response
Expected Behavior
I would love to be able to have the template on a distributed switch, or at least have terraform understand that the ovf/ova template can be pulled to a different host to where the VM would be eventually deployed.
Actual Behavior
Fails with different error depending on the scenario. See the outputs in the gist
Steps to Reproduce
create a template and point the network map to a DVS backed PG. Split the template and the VM to different hosts.
Environment Details
No response
Screenshots
No response
References
No response