Skip to content

vsphere-iso: unable to overwrite ISO in packer_cache even though checksum has changed #55

@ghost

Description

This issue was originally opened by @ryan-jan as hashicorp/packer#10809. It was migrated here as a result of the Packer plugin split. The original body of the issue is below.


Overview of the Issue

Apologies in advance if I am misunderstanding how this is supposed to work. I am using the vsphere-iso builder and am specifying an ISO and checksum file as follows.

  iso_url = "file:/E:\\WindowsServer-2019\\WindowsServer-2019.iso"
  iso_checksum = "file:E:\\WindowsServer-2019\\WindowsServer-2019.iso.sum"

This WindowsServer-2019.iso is created via a script which integrates the latest updates into the ISO before then kicking off my packer build using the generated ISO. However, packer is not uploading the ISO to the packer_cache directory as there is already an ISO of the same name in the directory (the ISO I created last month with last months updates).

==> vsphere-iso.msftserver2019std: Trying file://E:/WindowsServer-2019/WindowsServer-2019.iso?checksum=sha1%3Ac52a8e7b050a939d8e5669f7e3c2170369524b9b

==> vsphere-iso.msftserver2019std: file://E:/WindowsServer-2019/WindowsServer-2019.iso?checksum=sha1%3Ac52a8e7b050a939d8e5669f7e3c2170369524b9b => E:/WindowsServer-2019/WindowsServer-2019.iso

==> vsphere-iso.msftserver2019std: File [DATASTORE1] packer_cache//WindowsServer-2019.iso already exists; skipping upload.

I had assumed that because the checksum no longer matches the file in the packer_cache directory that packer would upload my new ISO file and overwrite the previous one. Is this not how this should work? If not, how should I deal with this situation where each month I want to overwrite the ISO in the cache with a new one?

Packer version

From 1.7.0

Operating system and Environment details

Packer is running on a Windows Server 2019 (1809) virtual machine.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions