Yes provisioner depends on the communicator, in this case ssh.

On Thu, May 7, 2020, 16:58 jz <[email protected]> wrote:

> Just clarify - the reason I am doing this is try to run a command line to
> create a new user in inline. Also this user is meant to be a ssh user from
> Packer host to VM. I am using Photon so the root shh is blocked by default.
> Long story short - if provisioner shell relies on ssh between packer host
> and the VM this provisioner will not work anyway. Is this true that
> provisioner shell type depends on ssh?
>
> On Thursday, May 7, 2020 at 2:19:00 AM UTC-4, 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/5cf5ffd2-d419-4098-aea9-27849b9274e3%40googlegroups.com
> <https://groups.google.com/d/msgid/packer-tool/5cf5ffd2-d419-4098-aea9-27849b9274e3%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CALz9Rt_twTQNM3T7u%2B3oeC5%2BUEtbhu-0BAeuJNL1kTVXDaC8hg%40mail.gmail.com.

Reply via email to