You can use variables for almost everything. And you need to have the
ovftool installed and on the path for the vmware-iso builder.

On Tue, Jan 22, 2019, 16:00 Pietto Vasco <[email protected] wrote:

> I am trying to do the same thing. I have a packer test later today  I'll
> update you
>
> On Tue, Jan 22, 2019, 8:45 AM Andrew Meyer <[email protected] wrote:
>
>> Also,
>> Now I am getting this error:
>>
>>  packer validate vmware/new-centos2.json
>> Template validation failed. Errors are shown below.
>>
>> Errors validating build ''. 1 error(s) occurred:
>>
>> * ovftool validation error: fork/exec : no such file or directory;
>>
>>
>>
>> On Tuesday, January 22, 2019 at 8:21:50 AM UTC-6, Andrew Meyer wrote:
>>>
>>> Can I not use variables with this?  Can I not have a separate
>>> variables.json file?  Or should this all be monolithic?
>>>
>>> On Tuesday, January 22, 2019 at 8:00:35 AM UTC-6, Rickard von Essen
>>> wrote:
>>>>
>>>> Your type is still vsphere-iso.
>>>>
>>>> On Tue, Jan 22, 2019, 14:47 Andrew Meyer <[email protected] wrote:
>>>>
>>>>> So now I'm getting this:
>>>>> Template validation failed. Errors are shown below.
>>>>>
>>>>> Errors validating build 'vsphere-iso'. 6 errors occurred:
>>>>>
>>>>> * unknown configuration key: "keep_registered"
>>>>> * unknown configuration key: "remote_datastore"
>>>>> * unknown configuration key: "remote_host"
>>>>> * unknown configuration key: "remote_password"
>>>>> * unknown configuration key: "remote_type"
>>>>> * unknown configuration key: "remote_username"
>>>>> I made the following changes:
>>>>>
>>>>> {
>>>>>   "builders": [
>>>>>     {
>>>>>       "type": "vsphere-iso",
>>>>>
>>>>>
>>>>>       "remote_type": "esx5",
>>>>>       "remote_host": "{{user `esxi_host`}}",
>>>>>       "remote_datastore": "{{user `esxi_datastore`}}",
>>>>>       "remote_username": "{{user `esxi_username`}}",
>>>>>       "remote_password": "{{user `esxi_password`}}",
>>>>>       "keep_registered": true,
>>>>>       "insecure_connection": "true",
>>>>>       "username": "username",
>>>>>       "password": "password",
>>>>>       "host": "10.150.1.35",
>>>>>
>>>>>       "vm_name":  "centos7base",
>>>>>       "convert_to_template": "false",
>>>>>       "cpu": "1",
>>>>>       "ram": "2048",
>>>>>       "network": "v10101-prod",
>>>>>       "network_adapter": "vmxnet3",
>>>>>       "guest_os_type": "centos7_64Guest",
>>>>>       "datastore": "datastore-nas",
>>>>>       "disk_size": "60GB",
>>>>>       "iso":
>>>>> "/vmfs/volumes/datastore02/ISO/CentOS-7-x86_64-DVD-1810.iso",
>>>>>       "iso_datastore": "datastore02"
>>>>>
>>>>>     }
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Tuesday, January 22, 2019 at 12:58:12 AM UTC-6, Rickard von Essen
>>>>> wrote:
>>>>>>
>>>>>> The vsphere-iso builder will only work against the vSphere API. If
>>>>>> you want to build on a single ESXi server you should use vmware-iso (with
>>>>>> remote_XX options set).
>>>>>>
>>>>>> On Tue, Jan 22, 2019, 07:17 Andrew Meyer <[email protected] wrote:
>>>>>>
>>>>>>> I am having some issues getting packer to create VMs on my single
>>>>>>> ESX host.  Everything I have found requires the vsphere appliance.  I 
>>>>>>> have
>>>>>>> enabled all the changes for this to work on the host itself.
>>>>>>>
>>>>>>> Here is my config
>>>>>>>
>>>>>>> {
>>>>>>>   "builders": [
>>>>>>>     {
>>>>>>>       "type": "vsphere-iso",
>>>>>>>
>>>>>>>       "vcenter_server": "10.150.1.35",
>>>>>>>       "insecure_connection": "true",
>>>>>>>       "username": "root",
>>>>>>>       "password": "",
>>>>>>>       "host": "10.150.1.35",
>>>>>>>
>>>>>>>       "vm_name":  "centos7base",
>>>>>>>       "convert_to_template": "false",
>>>>>>>       "cpu": "1",
>>>>>>>       "ram": "2048",
>>>>>>>       "network": "v10101-prod",
>>>>>>>       "network_adapter": "vmxnet3",
>>>>>>>       "guest_os_type": "centos7_64Guest",
>>>>>>>       "datastore": "datastore-nas",
>>>>>>>       "disk_size": "60GB",
>>>>>>>       "iso":
>>>>>>> "/vmfs/volumes/datastore02/ISO/CentOS-7-x86_64-DVD-1810.iso",
>>>>>>>       "iso_datastore": "datastore02"
>>>>>>>
>>>>>>>     }
>>>>>>>   ]
>>>>>>> }
>>>>>>>
>>>>>>>
>>>>>>> Here is the output I get when I try to run it:
>>>>>>> packer build new-centos1.json
>>>>>>> vsphere-iso output will be in this color.
>>>>>>>
>>>>>>> ==> vsphere-iso: Creating VM...
>>>>>>> Build 'vsphere-iso' errored: resource pool
>>>>>>> '/ha-datacenter/host//Resources/' not found
>>>>>>>
>>>>>>> ==> Some builds didn't complete successfully and had errors:
>>>>>>> --> vsphere-iso: resource pool '/ha-datacenter/host//Resources/' not
>>>>>>> found
>>>>>>>
>>>>>>> ==> Builds finished but no artifacts were created.
>>>>>>>
>>>>>>>
>>>>>>> What am I doing wrong?
>>>>>>>
>>>>>>> --
>>>>>>> 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/5167c411-a6e8-4afd-95ab-aba0ed4059b7%40googlegroups.com
>>>>>>> <https://groups.google.com/d/msgid/packer-tool/5167c411-a6e8-4afd-95ab-aba0ed4059b7%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>>> .
>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>
>>>>>> --
>>>>> 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/f5b697d7-fe85-4ec8-a302-616cd47034ea%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/packer-tool/f5b697d7-fe85-4ec8-a302-616cd47034ea%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>> --
>> 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/1e60d8e9-2efd-4d2e-9701-ff0cc04028fe%40googlegroups.com
>> <https://groups.google.com/d/msgid/packer-tool/1e60d8e9-2efd-4d2e-9701-ff0cc04028fe%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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/CAC0gkf0v0918m8gqSt_V2cyYEgfwSdN204scbEySDr8beyVDQw%40mail.gmail.com
> <https://groups.google.com/d/msgid/packer-tool/CAC0gkf0v0918m8gqSt_V2cyYEgfwSdN204scbEySDr8beyVDQw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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-OFcvsN%3Dr6Ldfycw_2mef3%3DbKxgLfjJ5Xx3foHFqOW2g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to