This works for me:
seems you are missing network Name but your network seems to be different
from standard one.
Can you create or instpect a working VM in that network and check what you
may be missing on ethernet0. ?
"vmx_data": {
"memsize": "2048",
"ethernet0.startConnected": "TRUE",
"ethernet0.virtualDev": "vmxnet3",
"ethernet0.networkName": "{{user `esx5_network`}}",
"ethernet0.addressType": "generated",
"ethernet0.wakeOnPcktRcv": "FALSE",
"ethernet0.uptCompatibility": "TRUE",
"ethernet0.present": "TRUE"
}
On Sat, Dec 9, 2017 at 11:52 PM, Sergey Kharnam <[email protected]> wrote:
>
> - VM is coming up with disconnected interface.
> - If I try to tick the Connect check-box it throws an error "Failed to
> connect virtual device"
> - If I switch over to another network and back again to the initial one
> and only tick the Connect check-box it becomes up and running.
>
> See below my vmx_data defines the networking:
>
> {
> "variables": {
> "version": "1.0"
> },
>
> "builders": [
> {
> "name": "rhel7.3",
> "vm_name": "rhel7.3",
> "vmdk_name": "rhel7.3",
> "type": "vmware-iso",
> "communicator": "ssh",
> "ssh_pty": "true",
> "headless": false,
> "disk_size": 102400,
> "guest_os_type": "rhel7-64",
> "iso_url":
> "/mnt/framework_bin_repo/rhel_7.3/rhel-server-7.3-x86_64-dvd.iso",
> "iso_checksum":
> "120acbca7b3d55465eb9f8ef53ad7365f2997d42d4f83d7cc285bf5c71e1131f",
> "iso_checksum_type": "none",
> "vnc_disable_password": "true",
> "shutdown_command": "echo 'packer' | sudo -S shutdown -P now",
>
> "remote_host": "{{user `packer_remote_host`}}",
> "remote_datastore": "{{user `packer_remote_datastore`}}",
> "remote_username": "{{user `packer_remote_username`}}",
> "remote_password": "{{user `packer_remote_password`}}",
> "remote_type": "esx5",
>
> "ssh_username": "packer",
> "ssh_password": "packer",
> "ssh_wait_timeout": "20m",
> "tools_upload_flavor": "linux",
> "http_directory": "",
> "boot_wait": "5s",
> "vmx_data": {
> "memsize": "4096",
> "numvcpus": "2",
> "ethernet0.virtualDev": "vmxnet3",
> "ethernet0.dvs.switchId": "01 e1 20 50 95 72 e5 7a-8b 9f 44 1a 6c 1e
> 24 af",
> "ethernet0.dvs.portgroupId": "dvportgroup-12221",
> "ethernet0.addressType": "vpx",
> "ethernet0.uptCompatibility": "TRUE",
> "ethernet0.present": "TRUE",
> "ethernet0.startConnected": "TRUE"
> },
> "vmx_data_post": {
> "ide1:0.startConnected": "TRUE",
> "ide1:0.clientDevice": "TRUE",
> "ide1:0.fileName": "emptyBackingString"
> },
>
> "boot_command": [
> "<esc><wait>",
> "vmlinuz initrd=initrd.img quite ",
>
> "inst.ks=http://bitbucket.agile.bns/projects/PRVCT/repos/framework/raw/applications/os_template_generator/kickstart/kickstart_template_generic_rhel_7.3.cfg",
> "<enter>"
> ]
> }
> ],
>
> "provisioners": [{
> "type": "shell",
> "execute_command": "echo 'packer' | {{.Vars}} sudo -S -E bash
> '{{.Path}}'",
> "scripts": [
>
> "/mnt/framework/applications/os_template_generator/packer/scripts/packer_postprovisioning_rhel_7.3.sh",
>
> "/mnt/framework/applications/os_template_generator/packer/scripts/localyumsetup.sh",
>
> "/mnt/framework/applications/os_template_generator/packer/scripts/vraguestagent.sh"
> ]
> }]
> }
>
>
>
> --
> 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 [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/packer-tool/11bbc002-43d3-4745-9d69-83e391eee43f%40googlegroups.com
> <https://groups.google.com/d/msgid/packer-tool/11bbc002-43d3-4745-9d69-83e391eee43f%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/packer-tool/CAHqq0ewKqPzDSOkGOENYwDe%3D57%2B7WTPLmufaMm5g2Q66HsnqEQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.