Closed gudipudipradeep closed 4 years ago
` SPS-Linux-Nodexx.vmx .vmx is missing from following source code i think and virtual_networks[0][0] might be a problem
if (strings.HasSuffix(src_path, ".ova") || strings.HasSuffix(src_path, ".ovf")) && virtual_networks[0][0] != "" { net_param = " --network='" + virtual_networks[0][0] + "'" } ` is this condition is really required (strings.HasSuffix(src_path, ".ova") || strings.HasSuffix(src_path, ".ovf")) i think this alone fine virtual_networks[0][0] != ""
If you take a look at the ovftool manual, the --network option is for ova/ovf only...
Also, you might be able to do mapping using vmx files, but it gets complex when the number of network interfaces on the source doesn't match the requirement on the destination. For example, how would you handle 4 network interfaces configured in the source VMX file, but you want to use only one nic on the destination? There is no way to map many to none, or none to many....
I found the best way to use local VMX source files is to strip out all the "network" configuration from the vmx file. The plugin will happily add whatever is needed. I'll update the README to better clarify local source VMX files should not have any networks configured.
I updated the "Known Issues" section...
` Code: network_interfaces { virtual_network = "${var.virtual_network}" # Required for each network interface, Specify the Virtual Network name. } Plan Command
resource "esxi_guest" "K8SMaster" {
boot_disk_size = (known after apply)
disk_store = "data2"
guest_name = "check-Linux-Master"
guest_shutdown_timeout = (known after apply)
guest_startup_timeout = 600
guestinfo = {
guestos = (known after apply)
id = (known after apply)
ip_address = (known after apply)
memsize = "8192"
notes = (known after apply)
numvcpus = "2"
ovf_source = "/mnt/SPS-Linux-Nodexx/SPS-Linux-Nodexx/SPS-Linux-Nodexx.vmx"
power = "on"
resource_pool_name = (known after apply)
virthwver = (known after apply)
network_interfaces {
` Apply command showing following issue Getting issue with Error: There was an ovftool Error: Opening VMX source: /mnt/SPS-Linux-Nodexx/SPS-Linux-Nodexx/SPS-Linux-Nodexx.vmx Opening VI target: vi://UserName@hypervisor.test.fileraft.com:443/ Error: No network mapping specified. OVF networks: bridged. Target networks: ML Subnet .61 VM Network Completed with errors
` I think network switch is missing --network="ML Subnet .61" from command line. Please can you help on this issue.