Give your builder a name and then refer to the name (no the type) in the 
provisioner.

On Thursday, May 7, 2020 at 1:19:00 AM UTC-5, jz wrote:
>
> Pack 1.5.5
> vsphere-iso v2.3
> Photon 3
>
> Running into an issue: the provisioner section seems never be executed. 
> Here is the json file:
>
>   "builders": [
>     {
>       "type": "vsphere-iso",
>
>       "vcenter_server":      "vcsas11001.mycompany.com",
>       "username":            "[email protected]",
>       "password":            "XXXXXXXXXXXXX",
>       "insecure_connection": "true",
>       "vm_name": "photon3-ga-1",
>       "notes": "Build via Packer",
>       "cluster": "VxRail-Virtual-SAN-Cluster-XXXXX",
>       "host": "esxas11001.mycompany.com",
>       "datastore": "VxRail-Virtual-SAN-Datastore-XXXXX",
>       "folder": "MY VMs",
>
>       "guest_os_type": "vmwarePhoton64Guest",
>
>       "ssh_username": "sshuser",
>       "ssh_password": "XXXXXX",
>
>       "CPUs":             2,
>       "RAM":              4096,
>       "RAM_reserve_all": false,
>       "network": "Management Network-XXXXX",
>
>       "convert_to_template": false,
>
>       "disk_controller_type":  "pvscsi",
>       "disk_size":        25000,
>       "disk_thin_provisioned": true,
>
>       "network_card": "vmxnet3",
>       "shutdown_command": "",
>
>       "iso_paths": ["[VxRail-Virtual-SAN-Datastore-XXXXX] 
> iso/photon-os-3.0-ga/photon-3.0-58f9c74-bundle.iso"],
>       "floppy_files": [
>         "{{user `ks_path`}}/photon_ks.cfg"
>       ],
>       "boot_command": ["<esc><wait>",
>                                 "vmlinuz initrd=initrd.img root=/dev/ram0 
> loglevel=3 ks=cdrom:/isolinux/photon_ks.cfg photon.media=cdrom",
>                                 "<enter>"]
>       }
>   ],
>
>    "provisioners": [
>    {
>      "type": "shell",
>      "inline": ["mkdir -p /tmp/threetimes"],
>      "only": ["vsphere-iso"]
>    }
>   ]
> }
>
> All I am doing is to create a dummy directory under /tmp. With or without  
> "only": ["vsphere-iso"] is the same result - no directory is created. 
> Anything wrong here?
>
> Thanks,
>
> J
>

-- 
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/af595c28-ed7e-4e38-b0a5-8622d79b7b1d%40googlegroups.com.

Reply via email to