While creating VM with JSON file, the following error came.
1>Vcenter details is not given, but vm is created(not complete)
2>Memory(RAM) is not mapped properly.
3>with normal mode VM is creating and due to bad configuration , it’s destroying. Need a proper template.
ERROR:
vsphere-iso: output will be in this color.
==> vsphere-iso: Creating VM…
==> vsphere-iso: Customizing hardware…
==> vsphere-iso: ServerFaultCode:
==> vsphere-iso: Unexpected element tag “nestedHVEnabled” seen
==> vsphere-iso:
==> vsphere-iso: while parsing serialized DataObject of type vim.vm.ConfigSpec
==> vsphere-iso: at line 2, column 141
==> vsphere-iso:
==> vsphere-iso: while parsing call information for method ReconfigVM_Task
==> vsphere-iso: at line 2, column 66
==> vsphere-iso:
==> vsphere-iso: while parsing SOAP body
==> vsphere-iso: at line 2, column 60
==> vsphere-iso:
==> vsphere-iso: while parsing SOAP envelope
==> vsphere-iso: at line 2, column 0
==> vsphere-iso:
==> vsphere-iso: while parsing HTTP request for method reconfigure
==> vsphere-iso: on object of type vim.VirtualMachine
==> vsphere-iso: at line 1, column 0
==> vsphere-iso: Step “StepConfigureHardware” failed
JSON file details:
{
“builders”: [
{
“type”: “vsphere-iso”,
"vcenter_server": "delv3.xxx.com",
"username": "root",
"password": "iso*help",
"insecure_connection": "true",
"vm_name": "absTest3",
"host": "delv3.xxx.com",
"guest_os_type": "rhel6_64Guest",
"ssh_username": "root",
"ssh_password": "iso*help",
"datastore": "delv3-datastore3",
"network": "LR-15.112.155.X",
"CPUs": 2,
"RAM": 2048,
"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"
],
"boot_command": [
"<enter><wait><enter><wait><HOCOE><wait><enter>",
"<enter><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs>",
"<enter>"
]
}
],
“provisioners”: [
{
“type”: “shell”,
“inline”: [“ls /”]
}
]
}