Hi 

I am using packer version v1.1.1 and trying to build vm template..here is 
my sample json

{
  "variables": {
     "ks_path" : "packer_ks.cfg"
  },
  "builders": [{
    "type": "vmware-iso",
    "iso_url": "/var/www/html/ISOs/CentOS-6.8-x86_64-minimal.iso",
    "iso_checksum" : "0ca12fe5f28c2ceed4f4084b41ff8a0b",
    "iso_checksum_type" : "md5",
    "disk_type_id": "thin",
    "disk_size": "200000",
    "vmx_data": {
        "memsize": "4096",
        "numvcpus": "2",
        "ethernet0.networkName": "hx-vm-kickstart-10",
        "ethernet0.virtualDev": "vmxnet3",
        "ethernet0.present": "TRUE"
    },
    "boot_command" : [
       "<tab> text ks=http://kickstart/kickstart/packer.ks<enter><wait>"
    ],
    "boot_wait" : "30s",
    "ssh_username": "<username>",
    "ssh_password" : "<password>",
    "ssh_timeout" : "10000s",
    "remote_datastore": "hx-ds1",
    "remote_host": "<esxi ip>",
    "remote_password": "<esxi password>",
    "remote_type": "ex5",
    "remote_username": "root",
    "version": "11",
    "vm_name": "packer-test1",
    "vmdk_name": "packer-test1",
    "keep_registered": "true",
    "shutdown_command": "/usr/bin/sudo /sbin/shutdown -h now"
  }],
  "post-processors": [
    {
   "type": "vsphere-template",
   "host": "<esxi ip>",
   "insecure": true,
   "datacenter": "ha-datacenter",
   "username": "root",
   "password": "<esxi password>",
   "folder": "/vmfs/volumes/hx-ds1/packer-template"
  }]
}

I see the vm getting created., but while running post processor i am 
getting the below error


2017/11/16 01:42:10 packer-2: 2017/11/16 01:42:10 Writing VMX to: 
/tmp/packer-vmx652966173/packer-test1.vmx
2017/11/16 01:42:10 ui: ==> vmware-iso: Cleaning VMX prior to finishing 
up...
2017/11/16 01:42:10 ui:     vmware-iso: Unmounting floppy from VMX...
2017/11/16 01:42:10 packer-2: 2017/11/16 01:42:10 Deleting key: 
floppy0.present
2017/11/16 01:42:10 ui:     vmware-iso: Detaching ISO from CD-ROM device...
2017/11/16 01:42:10 ui:     vmware-iso: Disabling VNC server...
2017/11/16 01:42:10 packer-2: 2017/11/16 01:42:10 Writing VMX to: 
/tmp/packer-vmx652966173/packer-test1.vmx
2017/11/16 01:42:10 ui: ==> vmware-iso: Skipping export of virtual machine 
(export is allowed only for ESXi and the format needs to be specified)...
2017/11/16 01:42:10 packer-2: 2017/11/16 01:42:10 opening new ssh session
2017/11/16 01:42:10 packer-2: 2017/11/16 01:42:10 starting remote command: 
vim-cmd vmsvc/power.getstate 107
2017/11/16 01:42:11 ui: ==> vmware-iso: Keeping virtual machine registered 
with ESX host (keep_registered = true)
2017/11/16 01:42:11 packer-2: 2017/11/16 01:42:11 opening new ssh session
2017/11/16 01:42:11 packer-2: 2017/11/16 01:42:11 starting remote command: 
ls -1p /vmfs/volumes/hx-ds1/output-vmware-iso
2017/11/16 01:42:11 [INFO] (telemetry) ending vmware-iso
2017/11/16 01:42:11 ui: ==> vmware-iso: Running post-processor: 
vsphere-template
2017/11/16 01:42:11 [INFO] (telemetry) Starting post-processor 
vsphere-template
2017/11/16 01:42:11 ui:     vmware-iso (vsphere-template): Waiting 10s for 
VMware vSphere to start
2017/11/16 01:42:21 ui:     vmware-iso (vsphere-template): Choosing 
datacenter...
2017/11/16 01:42:21 ui:     vmware-iso (vsphere-template): Creating or 
checking destination folders...
2017/11/16 01:42:21 ui:     vmware-iso (vsphere-template): Creating folder: 
vmfs
2017/11/16 01:42:21 ui error: ==> vmware-iso (vsphere-template): 
ServerFaultCode: The operation is not supported on the object.
2017/11/16 01:42:21 [INFO] (telemetry) ending vsphere-template
2017/11/16 01:42:21 [INFO] (telemetry) found error: ServerFaultCode: The 
operation is not supported on the object.
2017/11/16 01:42:21 Deleting original artifact for build 'vmware-iso'
2017/11/16 01:42:21 packer-2: 2017/11/16 01:42:21 opening new ssh session
2017/11/16 01:42:21 packer-2: 2017/11/16 01:42:21 starting remote command: 
rm -rf /vmfs/volumes/hx-ds1/output-vmware-iso
2017/11/16 01:42:21 ui error: Build 'vmware-iso' errored: 1 error(s) 
occurred:

* Post-processor failed: ServerFaultCode: The operation is not supported on 
the object.
2017/11/16 01:42:21 Builds completed. Waiting on interrupt barrier...
2017/11/16 01:42:21 machine readable: error-count []string{"1"}
2017/11/16 01:42:21 ui error:
==> Some builds didn't complete successfully and had errors:

Any idea why this is happening ..? I am using ip of an esxi running 6.0 
managed by vcenter 6.0 

Please provide assistance here.

Shan

-- 
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/8c8da37b-b1a3-4876-b629-ade329a6203b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to