Overview of the Issue
After upgrading from packer 1.3.5 to 1.5.1 (with no changes to our packer config or invocation options), it appears that the temporary packer ISO files in the esxi datastore packer_cache directory aren't being cleaned up after a successful build.
Comparing the checksums on the ISO files in the packer_cache directory they are definitely the same ISO file we provide in the builder config via iso_url for booting the VM.
Reproduction Steps
Run a packer build of type vmware-iso using an iso_url and observe the content of the packer_cache directory on the target ESXi datastore directory after the build completes successfully. A copy of the ISO file with some sort of temporary checksum hash and the .iso extension exists.
Packer version
1.5.1
Operating system and Environment details
OS, Architecture, and any other information you can provide about the
environment.
CentOS 7.6 (within docker)
After a period of successful builds, we found this in our ESXi datastore in the packer_cache directory (the count of .iso files is very close to the total number of builds we've had since the change from packer 1.3.5 to 1.5.1 and the datestamp on the oldest file seems to align with roughly the first build when the packer version was changed)
[root@packer-03-esxi:/vmfs/volumes/5d118314-e1ea5ba0-738b-005056913ea5/packer_cache] ls -alt
total 130997376
drwxr-xr-t 1 root root 73728 Mar 2 18:19 ..
-rw-r--r-- 1 root root 1048576 Mar 2 18:19 3665a0134a7a8ac3ff3beb3e4a615462416cc145.iso
drwxr-xr-x 1 root root 98304 Mar 2 18:19 .
-rw-r--r-- 1 root root 1340579840 Mar 2 14:12 99dd20cebf4a10d346d6391ad36e8c6d12d79057.iso
-rw-r--r-- 1 root root 1353361408 Mar 2 12:18 68d96e5b8d47e9b0508f331f011f1d44ff415c13.iso
-rw-r--r-- 1 root root 1353375744 Mar 2 07:06 004588eab0d1c13ac856b35f152879f3c8d5cefe.iso
-rw-r--r-- 1 root root 1353281536 Mar 2 01:09 cf403fe5069a1e2d81bedcbeecaca63431d0c84c.iso
-rw-r--r-- 1 root root 1317677056 Feb 29 23:53 output.iso
-rw-r--r-- 1 root root 1353535488 Feb 29 23:07 6c39472259d310af97234ac5f09e38a06b41a025.iso
-rw-r--r-- 1 root root 1353179136 Feb 29 16:06 47404505b15c34ea73f75c05ca1dee55815a1c78.iso
-rw-r--r-- 1 root root 1353273344 Feb 29 05:52 ef7ab3a417e536c6d25d3ac5c765c8336d35de16.iso
-rw-r--r-- 1 root root 1353367552 Feb 29 05:12 3588554978f3c8dce18c80fa243c8840141a0504.iso
-rw-r--r-- 1 root root 1340213248 Feb 29 04:28 7ecdbb296d580540be3b78212e74e83865a413bf.iso
-rw-r--r-- 1 root root 1340360704 Feb 29 02:58 a145313cabe307412a805cf8685a8a5304bf85e9.iso
-rw-r--r-- 1 root root 1340418048 Feb 28 21:02 c994bc98f77f907ba2dd1cc2706f48bcf76a04a4.iso
-rw-r--r-- 1 root root 1340241920 Feb 28 20:18 c9907c9afee81a7aee8d29cb750d24379686a783.iso
-rw-r--r-- 1 root root 1340377088 Feb 28 16:36 cfcf84db905620e8c5756104796f9f6b66d5b2d4.iso
-rw-r--r-- 1 root root 1340483584 Feb 28 15:54 fba9f9b9344b0e7f05382e2ea27b2f6052dc0a67.iso
-rw-r--r-- 1 root root 1339963392 Feb 28 00:09 1cd3ec8ac8361a47e82a0919bd668606d903ab8d.iso
-rw-r--r-- 1 root root 1339944960 Feb 27 23:28 1b2cc755a60ee6dd0c445d3c831918f99ecfe13b.iso
-rw-r--r-- 1 root root 1340262400 Feb 27 21:43 d0f302a6db9548f79d13bdae4693287d9ad12e83.iso
-rw-r--r-- 1 root root 1353426944 Feb 27 19:44 d2cea256cc45760f89617a0cbbe4113410dfa70e.iso
-rw-r--r-- 1 root root 1339959296 Feb 27 16:44 d15bc2a8aaf0709e6f0f9727919ff3e69e9c64f2.iso
-rw-r--r-- 1 root root 1339811840 Feb 27 16:03 dd0837f33e964aefb67b335a09be577a64b027fd.iso
-rw-r--r-- 1 root root 1340020736 Feb 27 14:24 0508e7176ef5985ce06b27cd3e4fa90729eabb4a.iso
-rw-r--r-- 1 root root 1353416704 Feb 27 08:21 fe92270c08b9c873c25ff92150a2e9a9e236e72c.iso
-rw-r--r-- 1 root root 1353304064 Feb 27 07:28 042d8d45643de7d21bdb2ab892544e32ea266944.iso
-rw-r--r-- 1 root root 1339957248 Feb 27 03:47 93f9effa04aec89f816364ce0b812b86c588ede7.iso
-rw-r--r-- 1 root root 1339811840 Feb 27 01:14 d7a85b49aed96f9b7ee711656acf8f2d27eb367b.iso
-rw-r--r-- 1 root root 1339981824 Feb 27 00:18 77c67a818b656dc0970dcf581e13159e56a9a8ac.iso
-rw-r--r-- 1 root root 1339787264 Feb 26 23:33 43fbe6c33b00fab5ca1b1a5c83274a67f370a328.iso
-rw-r--r-- 1 root root 1339809792 Feb 26 22:23 62533dadd982babad5e98ad12065e31686c46be1.iso
-rw-r--r-- 1 root root 1388761088 Feb 26 15:38 f683888aae07ecd5ce5da6c6ea1b5ff42c184ebc.iso
-rw-r--r-- 1 root root 1388756992 Feb 26 14:58 f3c26eb5f43bd12895ac8b21e4a19c5fbcae92a3.iso
-rw-r--r-- 1 root root 1388793856 Feb 26 02:30 06830f714f25a4ba1e1d69a209088975a5255294.iso
-rw-r--r-- 1 root root 1388650496 Feb 26 01:50 576b34eda47963fb5c38ca2e1a249fcb7a508ff0.iso
-rw-r--r-- 1 root root 1402271744 Feb 26 01:10 04d3ca76eee11c9abbc66d02567f1d615f678292.iso
-rw-r--r-- 1 root root 1402161152 Feb 25 18:16 9e4c04ea785f1fc0bda32f6dbb5c8d169ddc9e2f.iso
-rw-r--r-- 1 root root 1388795904 Feb 25 17:36 6a4a94ef469e442a7cbff6fa06cddf3dfd036950.iso
-rw-r--r-- 1 root root 1388783616 Feb 25 16:55 0d3627f9d661eb166b85455091eb1d664794d0ab.iso
-rw-r--r-- 1 root root 1388630016 Feb 25 16:13 042e54b558a70793bb47efc27792811f6574d56a.iso
-rw-r--r-- 1 root root 1401991168 Feb 25 12:12 0cfbe19356e2ae066dc113e3780d5e007a412d79.iso
-rw-r--r-- 1 root root 1388812288 Feb 25 11:28 b6d1e0439071d2a287c65c5a560afc429795b6d6.iso
-rw-r--r-- 1 root root 1388771328 Feb 25 03:24 60bade8a07f4052bf242c7547506f4063843e8c1.iso
-rw-r--r-- 1 root root 1388783616 Feb 25 02:45 6d9f8c3ca35c038bf7301eb964dd14a5b88378cf.iso
-rw-r--r-- 1 root root 1401821184 Feb 25 02:04 6ea3537ead2b3324b95b4685330e1fab5124a991.iso
-rw-r--r-- 1 root root 1401499648 Feb 24 21:45 884248b9750a18d3349a7e967f49e9133dc1b118.iso
-rw-r--r-- 1 root root 1401671680 Feb 24 18:43 12bfda91712b18b69bb47de72b2ed8231bb781c3.iso
-rw-r--r-- 1 root root 1401585664 Feb 24 18:03 7eb869ac7c521a3c31ba37e2aedae7088b41e0db.iso
-rw-r--r-- 1 root root 1401704448 Feb 24 11:56 96a703dc5f7c1d328559b88754d05afcceaf2487.iso
-rw-r--r-- 1 root root 1401667584 Feb 23 18:07 576d92e638af90ddb7fd708ed32788d1416ec195.iso
-rw-r--r-- 1 root root 1401554944 Feb 22 12:49 2e08f4201224385c000bbb6c25322513786726f5.iso
-rw-r--r-- 1 root root 1401657344 Feb 21 17:09 e96ed1c527ffaa48cfa1426c09d9856ed48dfeb5.iso
-rw-r--r-- 1 root root 1401675776 Feb 21 13:35 273a9376123511de430562a9794388f6e2effd91.iso
-rw-r--r-- 1 root root 1401516032 Feb 21 11:46 45861fdeda22f34de6960ad051d63126941bbdb7.iso
-rw-r--r-- 1 root root 1401954304 Feb 21 11:02 4c3a1d0528f88d1b63ef3b6018c84b51e8dd4058.iso
-rw-r--r-- 1 root root 1401483264 Feb 21 00:11 095f6f7e5f7f2719b99f5eef10c3edb594a44662.iso
-rw-r--r-- 1 root root 1401802752 Feb 20 23:32 3e97b8bb71b96e6baf8e8e52b1b0e7b779b30b70.iso
-rw-r--r-- 1 root root 1401847808 Feb 20 20:42 f958d193aa204f3beaf7901bf175f5b197cf12e7.iso
-rw-r--r-- 1 root root 1401661440 Feb 20 19:56 d50436b00bfbd15a4ef097561169ef427a86d447.iso
-rw-r--r-- 1 root root 1401661440 Feb 20 19:04 e5b562be1b7a6d0056618dd6e407e896ba6cb707.iso
-rw-r--r-- 1 root root 1401993216 Feb 20 12:11 ff399f602e25d4a1f513bf2f0e609417377a168e.iso
-rw-r--r-- 1 root root 1401845760 Feb 20 11:31 6a22f66c69998ab962c56cf7ad11c7f2429877fb.iso
-rw-r--r-- 1 root root 1402089472 Feb 20 04:58 db585b1783360646e250bc47e30f5f6f10359b18.iso
-rw-r--r-- 1 root root 1402173440 Feb 20 04:18 c514beed54a3b01bb2be9deb8ec9fbf9ee9a63b0.iso
-rw-r--r-- 1 root root 1401778176 Feb 19 23:58 23e9a0dab04acf27d5a8c9eab4f2af93682ed4c5.iso
-rw-r--r-- 1 root root 1401972736 Feb 19 23:04 f93b6cd43292d2aa6f93b40e42e7087cf5c77204.iso
-rw-r--r-- 1 root root 1401722880 Feb 19 19:42 c87f5ff3d2ca476b0627cd3d0f8b0c4215ec47fe.iso
-rw-r--r-- 1 root root 1401645056 Feb 19 18:59 dea994c5f95fa6d8c1d08e17aa6a1efb2bbe9b52.iso
-rw-r--r-- 1 root root 1400471552 Feb 19 17:36 4726daaed2663d59ab334be91cfc068c0e639d9b.iso
-rw-r--r-- 1 root root 1400242176 Feb 19 16:55 d69accea35672cdd55a04204c7a80727145d3c7d.iso
-rw-r--r-- 1 root root 1399990272 Feb 19 15:31 9b8379e3fcea2cb30683ca3f38fe53ad93f83b79.iso
-rw-r--r-- 1 root root 1399846912 Feb 18 19:48 40bf0bd49e8d46555ec7d6b087564ad75c958f1c.iso
-rw-r--r-- 1 root root 1399951360 Feb 18 18:01 3cb831cf65a347dca5e8f8ba7757fbf36285d561.iso
-rw-r--r-- 1 root root 1399853056 Feb 18 17:21 81fd1a01d44b17c4ea4104da84ee3f7f4889724f.iso
-rw-r--r-- 1 root root 1398945792 Feb 18 16:41 6216140c90e0bbe34a2bfa209264e2761eef1baa.iso
-rw-r--r-- 1 root root 1399277568 Feb 18 15:41 39b9f4176643f4ee5ed63a5697ce3e5b8bb39a30.iso
-rw-r--r-- 1 root root 1399113728 Feb 17 10:55 1322a04ac3bb5791a94e8dc7d86688e51abd1dac.iso
-rw-r--r-- 1 root root 1399146496 Feb 16 17:34 50680f31b6578fedf5088b960420db51a0fff90e.iso
-rw-r--r-- 1 root root 1398978560 Feb 15 16:27 25255de7fe593a700e7fb750f4490e0c009ae28a.iso
-rw-r--r-- 1 root root 1399087104 Feb 15 14:53 821f27aed1ceb6ef0b0e1b496ec66379380cd151.iso
-rw-r--r-- 1 root root 1398953984 Feb 14 17:21 41e269b1b40c86bb9dbd9f25fb44ef7b39ea879d.iso
-rw-r--r-- 1 root root 1399134208 Feb 14 16:40 402fd61f6da129cc771b6341984dfc995ab3a5ec.iso
-rw-r--r-- 1 root root 1399164928 Feb 14 15:59 da414e2467893e7f2e8442a05ff5234667ca09b9.iso
-rw-r--r-- 1 root root 1399091200 Feb 14 14:40 b066ecb7804c935555a69719ce1c29c2cbb96a45.iso
-rw-r--r-- 1 root root 1398956032 Feb 13 23:41 cbb9ac15e0b9f4d8e87fcc0c26b53816a09e2c8e.iso
-rw-r--r-- 1 root root 1399130112 Feb 13 23:01 942f31a93d1a50fcd188dfd31fc2cd04ca18a102.iso
-rw-r--r-- 1 root root 1399103488 Feb 13 21:39 07f3036644ced750b0bb19521f3dab5ba39ffb59.iso
-rw-r--r-- 1 root root 1399113728 Feb 13 20:59 4885d4595edb308bf279ae0c77c5c2bed581d2d3.iso
-rw-r--r-- 1 root root 1399128064 Feb 13 18:39 86389d99659b512eacdcfc6deb2a158bd8438b49.iso
-rw-r--r-- 1 root root 1399156736 Feb 13 17:17 e33bd6a93a410e164b51bf45cefa98469c0d405b.iso
-rw-r--r-- 1 root root 1399103488 Feb 13 04:47 89c9485273548b57ea646766414c551ec3687225.iso
-rw-r--r-- 1 root root 1399171072 Feb 13 04:07 74afca0c3ce7d38f73f2d6660aeee6a145ee8cdf.iso
-rw-r--r-- 1 root root 1399226368 Feb 13 02:45 410ecde43429e92680e688ade9b4755612142b7c.iso
-rw-r--r-- 1 root root 1399066624 Feb 13 01:22 2307521a7fe3b1f555e166d957c38be2b1e24af9.iso
-rw-r--r-- 1 root root 1399236608 Feb 13 00:00 d4870910abd15f435c5090ccc622c58cca467299.iso
-rw-r--r-- 1 root root 1399226368 Feb 12 23:19 1b2b4f74e69261cc0cb7b46ace2b739e2ff1f09b.iso
-rw-r--r-- 1 root root 1399062528 Feb 12 22:34 7c8d1011663c91979adf1326f0f2ecbc45ae5f65.iso
-rw-r--r-- 1 root root 1398996992 Feb 12 17:21 23ca1eca66e60cf433ba1bfc709e1794d8a6f72a.iso
-rw-r--r-- 1 root root 1398874112 Feb 12 14:40 4a33dd03bc100179c7719966cb0a3617ee9b1025.iso
Overview of the Issue
After upgrading from packer 1.3.5 to 1.5.1 (with no changes to our packer config or invocation options), it appears that the temporary packer ISO files in the esxi datastore
packer_cachedirectory aren't being cleaned up after a successful build.Comparing the checksums on the ISO files in the packer_cache directory they are definitely the same ISO file we provide in the builder config via
iso_urlfor booting the VM.Reproduction Steps
Run a packer build of type
vmware-isousing aniso_urland observe the content of thepacker_cachedirectory on the target ESXi datastore directory after the build completes successfully. A copy of the ISO file with some sort of temporary checksum hash and the.isoextension exists.Packer version
1.5.1
Operating system and Environment details
OS, Architecture, and any other information you can provide about the
environment.
CentOS 7.6 (within docker)
After a period of successful builds, we found this in our ESXi datastore in the
packer_cachedirectory (the count of.isofiles is very close to the total number of builds we've had since the change from packer 1.3.5 to 1.5.1 and the datestamp on the oldest file seems to align with roughly the first build when the packer version was changed)