Packer VM name with timestamp

2,024 views
Skip to first unread message

Shyam J

unread,
Mar 6, 2019, 2:56:07 AM3/6/19
to Packer
Hello,

Looking for any option to add timestamp to the vm_name getting created. Sometime jenkins will create more VM back to back and errors out because VM with same name exists. So manually deleting VM's is a pain. So is there is an option to add timestamp or unique names? 
I am using vmware-iso builder.

Thanks
Shyam

Rickard von Essen

unread,
Mar 6, 2019, 5:27:17 AM3/6/19
to packe...@googlegroups.com

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/4837d5f2-2916-4402-a0c5-44055f6c7463%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Matthias Teege

unread,
Mar 8, 2019, 5:53:07 PM3/8/19
to packe...@googlegroups.com
On Tue, Mar 05, 2019 at 11:56:07PM -0800, Shyam J wrote:

Hi,

> Looking for any option to add timestamp to the vm_name getting created.

"managed_image_name": "imagename-{{timestamp}}",

> Sometime jenkins will create more VM back to back and errors out because VM
> with same name exists. So manually deleting VM's is a pain. So is there is

You can force packer to overwrite the old image with "packer build -force"

Matthias

Shyam J

unread,
Mar 21, 2019, 1:33:56 AM3/21/19
to Packer
Thank you. "managed_image_name" is for azure and im using vmware-iso. But I think the force option is going to help me
Reply all
Reply to author
Forward
0 new messages