packer-builder-vsphere icon indicating copy to clipboard operation
packer-builder-vsphere copied to clipboard

Uploading floppy image fails with isotime in vm_name

Open agowa opened this issue 6 years ago • 2 comments

Everytime I add {{ isotime }} to the vm_name attribute uploading the floppy image fails with no special reason besides Step "StepAddFloppy" failed and Build 'vsphere-iso' errored: cannot find '/Win server 2016 standard template GUI (english) - 2018-12-08T02:29:06Z.vmx'.

What I've observed: The VM Name contains : characters. The filenames on the storage do not. I think the builder is trying to upload the file without replacing this character correctly and therefore failing.

agowa avatar Dec 08 '18 03:12 agowa

yes, that's a bug - we need to escape the string. I solve this issue by using {{timestamp}}

mkuzmin avatar Dec 16 '18 23:12 mkuzmin

I think I came across a similar issue.

I tried using a vm_name with [ and ] in the name, causing this error:

Build 'vsphere-iso.ubuntu-1804' errored after 2 seconds 135 milliseconds: Invalid datastore path '[Template] Ubuntu 18.04/packer-tmp-created-floppy.flp'.

Looks like the problem is mainly that [ is the first character.

sjurtf avatar Jan 05 '22 13:01 sjurtf