Hi,
I am trying to create new VM using packer. I am using below json file. When I run packer tool with command ./packer build -debug packer_iso_1_1.json , I get below error, could you please suggest what could be the problem :
Debug mode enabled. Builds will not be parallelized.
vsphere-iso: output will be in this color.
==> vsphere-iso: Pausing after run of step ‘StepConnect’. Press enter to continue.
==> vsphere-iso: Creating VM…
==> vsphere-iso: Pausing after run of step ‘StepCreateVM’. Press enter to continue. ==> vsphere-iso: Customizing hardware…
==> vsphere-iso: Pausing before cleanup of step ‘StepCreateVM’. Press enter to continue.
==> vsphere-iso: Destroying VM…
==> vsphere-iso: Pausing before cleanup of step ‘StepConnect’. Press enter to continue.
Build ‘vsphere-iso’ errored: ServerFaultCode:
Unexpected element tag “nestedHVEnabled” seen
while parsing serialized DataObject of type vim.vm.ConfigSpec
at line 2, column 141
while parsing call information for method ReconfigVM_Task
at line 2, column 66
while parsing SOAP body
at line 2, column 60
while parsing SOAP envelope
at line 2, column 0
while parsing HTTP request for method reconfigure
on object of type vim.VirtualMachine
at line 1, column 0
==> Some builds didn’t complete successfully and had errors:
–> vsphere-iso: ServerFaultCode:
Unexpected element tag “nestedHVEnabled” seen
while parsing serialized DataObject of type vim.vm.ConfigSpec
at line 2, column 141
while parsing call information for method ReconfigVM_Task
at line 2, column 66
while parsing SOAP body
at line 2, column 60
while parsing SOAP envelope
at line 2, column 0
while parsing HTTP request for method reconfigure
on object of type vim.VirtualMachine
at line 1, column 0
==> Builds finished but no artifacts were created.
Below is json file I am using
{
“builders”: [
{
“type”: “vsphere-iso”,
"vcenter_server": "address",
"username": "root",
"password": "password",
"insecure_connection": "true",
"vm_name": "VikasTest1",
"host": "hostaddress",
"guest_os_type": "rhel6_64Guest",
"ssh_username": "root",
"ssh_password": "password",
"datastore": "delv3-datastore3",
"network": "LR-15.119.156.X",
"CPUs": 4,
"cpu_cores": 2,
"RAM": 8192,
"RAM_reserve_all": true,
"disk_controller_type": "pvscsi",
"disk_size": 16384,
"disk_thin_provisioned": true,
"network_card": "vmxnet3",
"iso_paths": [
"[delv3-datastore1] RHEL6.8/INTERNAL_USE_LABONLY_UNSUPPORTED_DONOT_DELIVER_BOOT_DVD_JA286-15043.iso"
],
"floppy_files": [
"/usr/local/packer/preseed.cfg"
]
}
],
“provisioners”: [
{
“type”: “shell”,
“inline”: [“ls /”]
}
]
}