packer v1.2.3 with vSphere and vmware-iso builder - Template VMs do not have ethernet connected

617 views
Skip to first unread message

Ayesha Sultana

unread,
May 16, 2018, 12:03:35 PM5/16/18
to Packer
Hello All,

I am using builder vmware-iso and have set the vmx_data and vmx_data_post to define the behavior of the generated template but having some issues.  The VMs deployed from the generated template are not connecting the vNIC.  I checked the generated VM by converting it to a VM and I see the Connect at power on is ticked.  I looked at the .vmx file of the generated template and it is missing the  "ethernet0.startConnected": "TRUE" - is there something I am missing in my json template?

Here is the snippet of the vmx_data and the vmx_data_post from my template:

            "vmx_data": {
                "memsize": "{{ user `memsize` }}",
                "numvcpus": "{{ user `numvcpus` }}",
                "scsi0.virtualDev": "lsisas1068",
                "RemoteDisplay.vnc.enabled": "false",
                "RemoteDisplay.vnc.port": "5900"
            },
            "vmx_data_post": {
                "ethernet0.present": "TRUE",
                "ethernet0.virtualDev": "vmxnet3",
                "ethernet0.networkName": "{{user `vsphere_network`}}",
                "ethernet0.startConnected": "TRUE"
            }

Will really appreciate help in getting this working.  I have to manually edit settings of the deployed VM and select the connected and connect at power on as a workaround for now.

Thanks

Alvaro Miranda Aguilera

unread,
May 16, 2018, 2:45:26 PM5/16/18
to packe...@googlegroups.com
Hello

VMWare-iso on ESXI, runs on the ESXi server where not all the features from vsphere exists.

you can leave the netowork part to when you deploy the VM.

is a common practice to pack the box with a plan network, and setup the required network at provision/run time,


if you are having vsphere features that are not present in esxi that may explain the issue you are seeing. ie distributed switches exist on vsphere but not on esxi.

thanks
alvaro.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/077521a3-0fb0-44eb-827e-3ff1d76bc364%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Ayesha Sultana

unread,
May 16, 2018, 3:23:21 PM5/16/18
to packe...@googlegroups.com
The post processors I use are vsphere and vsphere-template and all other settings in the vmx_data and vmx_data_post are applied like vCPU, RAM, Network, vmxnet3 type etc except for making it connected at power on (technically the uploaded template if converted to VM shows this ticked) for deployed VMs off the template.

Thanks


j.r.haw...@googlemail.com

unread,
May 16, 2018, 3:37:37 PM5/16/18
to Packer
Just a thought... I had trouble with using VMXNET3 adaptor in vm templates.  I think VMXNET3 depends on vmware tools being installed and so it might be worth trying a different network driver (or ensuring vmware tools is packed too).

Hope this helps,

Jon
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.



--
Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages