Hi Alvaro,
Here is my Packer Json file for your information.
Thanks
# mukarram
{
"variables": {
},
"builders": [{
"type": "vmware-iso",
"iso_url": "{{ user `ISO_URL` }}",
"iso_checksum" : "{{ user `ISO_CHECKSUM` }}",
"iso_checksum_type" : "md5",
"disk_type_id": "thin",
"disk_size": "200000",
"output_directory": "{{ user `vm_name` }}",
"vmx_data": {
"memsize": "4096",
"numvcpus": "2",
"ethernet0.networkName": "{{ user `KS_NET` }}",
"ethernet0.virtualDev": "vmxnet3",
"ethernet0.present": "TRUE"
},
"boot_command" : [
"<tab> text ks=http://kickstart/kickstart/{{ user `KS_URL`
}}<enter><wait>"
],
"boot_wait" : "30s",
"ssh_timeout" : "1000s",
"ssh_username": "{{user `ssh_user`}}",
"ssh_password": "{{user `ssh_password`}}",
"remote_datastore": "{{ user `REMOTE_DATASTORE` }}",
"remote_host": "{{ user `REMOTE_ESXI` }}",
"remote_password": "{{user `source_esxi_password`}}",
"remote_type": "ex5",
"remote_username": "{{user `source_esxi_user`}}",
"version": "11",
"vm_name": "{{user `vm_name`}}",
"vmdk_name": "{{user `vm_name`}}",
"keep_registered": "true",
"shutdown_command": "/usr/bin/sudo /sbin/shutdown -h now"
}],
"post-processors": [
{
"type": "vsphere-template",
"host": "{{ user `VCENTER_IP` }}",
"insecure": true,
"datacenter": "{{ user `vcenter_dc` }}",
"username": "{{user `vcenter_user`}}",
"password": "{{user `source_esxi_password`}}",
"folder": "/Templates"
}]
}
On Thursday, December 21, 2017 at 10:29:15 AM UTC-8, Mukarram wrote:
>
> I have only tried to use 1.1.3 and 1.1.2....both these don't disconnect
> the "CD/DVD1 - Datastore ISO file". However I tried the 0.98 (I
> believe)...which errors out when I use the "vsphere-template" in the Post
> Processor.
> Having said this, I haven't tried any other Packer versions.
>
> Thanks
>
> # mukarram
>
> On Thursday, December 21, 2017 at 10:25:44 AM UTC-8, Mukarram wrote:
>>
>> Hi Alvaro,
>>
>> The guest OS is CentOS 7.4
>>
>> Thanks for the reply
>>
>> Regards
>>
>> # mukarram
>>
>> On Thursday, December 21, 2017 at 9:41:21 AM UTC-8, Alvaro Miranda
>> Aguilera wrote:
>>>
>>> when you weite 1.1.3/1.1.2 have issues, that means 1.1.1 and earlier do
>>> have not ?
>>>
>>> What os is the guest os ?
>>>
>>> Alvaro
>>>
>>>
>>>
>>> On Wed, Dec 20, 2017 at 4:22 AM, Mukarram <[email protected]> wrote:
>>>
>>>> Hi Guys,
>>>> I know you've seen this problem before, however I am having the issue
>>>> now.
>>>> I have tried these settings about a 100 times in the last 2 days but
>>>> none of them work.
>>>>
>>>> Basically the "vm_data_post" does not work...at least it looks that
>>>> way:
>>>>
>>>> I tried this:
>>>> "vmx_data_post": {
>>>> "ide1:0.startConnected": "TRUE",
>>>> "ide1:0.clientDevice": "TRUE",
>>>> "ide1:0.fileName": "emptyBackingString"
>>>> },
>>>>
>>>> This:
>>>> "vmx_data_post": {
>>>> "ide1:0.deviceType" : "atapi-cdrom",
>>>> "ide1:0.fileName" : "emptyBackingString",
>>>> "ide1:0.present" : "TRUE",
>>>> "ide1:0.clientDevice" : "TRUE"
>>>> },
>>>>
>>>> And also I tried the "inline" in the "post-processor" section with the
>>>> "vmware-cmd" script, that also didn't work. It "invalidates" the VM.
>>>> So before I create the template, I start the VM, try to disconnect the
>>>> "CD/DVD drive 1" and then power off the VM.
>>>>
>>>> "post-processors": [
>>>> [
>>>> {
>>>> "inline": [
>>>> "/opt/scripts/vmware-perl-sdk/bin/vmware-cmd -U {{ user
>>>> `source_esxi_user` }} -P {{ user `source_esxi_password` }} -H {{ user
>>>> `VCENTER_IP` }} --vihost {{ user `REMOTE_ESXI` }} /vmfs/volumes/{{ user
>>>> `REMOTE_DATASTORE` }}/output-vmware-iso/{{ user `vm_name` }}.vmx start
>>>> soft",
>>>> "/opt/scripts/vmware-perl-sdk/bin/vmware-cmd -U {{ user
>>>> `source_esxi_user` }} -P {{ user `source_esxi_password` }} -H {{ user
>>>> `VCENTER_IP` }} --vihost {{ user `REMOTE_ESXI` }} /vmfs/volumes/{{ user
>>>> `REMOTE_DATASTORE` }}/output-vmware-iso/{{ user `vm_name` }}.vmx
>>>> disconnectdevice \"CD/DVD drive 1\"",
>>>> "/opt/scripts/vmware-perl-sdk/bin/vmware-cmd -U {{ user
>>>> `source_esxi_user` }} -P {{ user `source_esxi_password` }} -H {{ user
>>>> `VCENTER_IP` }} --vihost {{ user `REMOTE_ESXI` }} /vmfs/volumes/{{ user
>>>> `REMOTE_DATASTORE` }}/output-vmware-iso/{{ user `vm_name` }}.vmx suspend
>>>> soft"
>>>> ],
>>>> "type": "shell-local"
>>>> }
>>>> ]
>>>>
>>>> So I am outta luck now.
>>>>
>>>> Please help.
>>>>
>>>> # mukarram
>>>>
>>>> --
>>>> 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/7fbceda7-ad74-40d4-b863-57b80a339186%40googlegroups.com
>>>>
>>>> <https://groups.google.com/d/msgid/packer-tool/7fbceda7-ad74-40d4-b863-57b80a339186%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/48feac89-e7c8-4b86-a641-7fcb9bc61cab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.