I'm running at commit 132dfa7c8 (but it's approximately master) using the vmware-iso builder and a remote ESXi builder.
The build fails with:
==> vmware-rhel7: Error getting virtual disk file info pre compaction: stat output-vmware-rhel7/disk.vmdk: no such file or directory
I'm looking at master https://github.com/hashicorp/packer/blob/0d785cca75aa0c20e3b9bbbab661cdf65aa87713/builder/vmware/common/step_compact_disk.go#L40-L52
and by my reading (first time i've looked in here) that's doing a local os.Stat() for the file, before calling driver to do the work. Well yea, that's not going to work, my file's on a remote ESX host :)
Looks like this came from #6186
Config, though i'm pretty sure it's not important in this case:
{
"type": "vmware-iso",
"name": "vmware-rhel7",
"remote_type": "esx5",
"remote_host": "{{ user `esx_remote_host` }}",
"remote_username": "{{ user `esx_remote_username` }}",
"remote_password": "{{ user `esx_remote_password` }}",
"remote_datastore": "ps0991ntxsc001_cnt1",
"iso_url": "http://satellite/pulp/repos/NSW_DET/Library/content/dist/rhel/server/7/7.4/x86_64/kickstart/images/boot.iso",
"iso_checksum": "e26a4ed9efb1d657fe83765f6039904f1afa5366",
"iso_checksum_type": "sha1",
"guest_os_type": "rhel7-64",
"tools_upload_flavor": "linux",
"ssh_username": "root",
"ssh_password": "password",
"ssh_timeout": "15m",
"headless": true,
"keep_registered": true,
"skip_export": true,
"vnc_disable_password": true,
"vnc_port_min": 5900,
"vnc_port_max": 5910,
"vmx_data": {
"ethernet0.addressType": "vpx",
"ethernet0.present": "true",
"ethernet0.startConnected": "true",
"ethernet0.dvs.portgroupid": "dvportgroup-9045",
"ethernet0.dvs.switchid": "50 16 05 3d dc a8 26 fb-0a f1 94 73 f7 9d f3 a2"
},
"boot_command": [
"<tab> inst.text inst.ks=hd:fd0:/ks.cfg <enter><wait>"
],
"shutdown_command": "shutdown -P now",
"floppy_files": [
"scripts/vmware/ks.cfg"
]
}
pinging @DanHam and @SwampDragons as the contributors to that PR.
My preference would be to make this a release blocker for upcoming-05-2018-ish that the PR is tagged against (but obviously that's not my call).
Completely agree with the triaging.
Well yea, that's not going to work, my file's on a remote ESX host :)
@jamielennox Yep! Quite right! Really sorry about the oversight there! Glad that was found before a release, so thanks for reporting!
@rickard-von-essen @SwampDragons
For the time being I think it would just be easier to revert the commits that added 'reporting results' for the disk compaction step.
I'll see if I can take another (better!) run at this later.
@jamielennox If you could test and report back it would be much appreciated? Please see #6274
The PR in #6274 works for me. Thanks for jumping on this so quickly.
@jamielennox thanks so much for catching this!
I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Most helpful comment
The PR in #6274 works for me. Thanks for jumping on this so quickly.