josenk / terraform-provider-esxi

Terraform-provider-esxi plugin
GNU General Public License v3.0
540 stars 154 forks source link

Error: No network mapping specified. OVF networks: bridged custom. Target networks: #219

Open andreireiand opened 4 weeks ago

andreireiand commented 4 weeks ago

looks like by adding:

--net:"bridged"="VM Network" --net:"custom"="Dummy"

this will work - i.e., running this in cli:

Covftool --acceptAllEulas --noSSLVerify --X:useMacNaming=false -dm=thin --name="fs24vm-01" --overwrite -ds="datastore1" --net:"bridged"="VM Network" --net:"custom"="Dummy" "abc.vmx" "vi://root:password@1.1.1.1:443//"

was successful. Can this be baked into the provider?

andreireiand commented 4 weeks ago

looking at the ovftool definition for --net and --network:

https://vdc-download.vmware.com/vmwb-repository/dcr-public/bb505ca7-88b5-4b11-aff4-f59125ab27bc/f3d05149-23e9-4ac2-8f99-0c851a8a5231/ovftool-430-userguide.pdf

looks like --net should be used when multiple NICs are defined within the ovf ... few implementation ideas: 1) either create a "custom parameter" addition to the full command (such that one can specify "--net:a=b" multiple times 2) detect when nics are present and convert --network to multiple --nic:a=b

hope it makes sense