Overview of the Issue
NB This is a migration of the issue jetbrains-infra/packer-builder-vsphere#244 to this repository, as it also applies.
I have a vm with a vm_name example in the folder vagrant-templates, but when I try to create another one with the same vm_name inside the empty folder vagrant-templates/packer, packer 1.5.4 refuses to start with:
example already exists, you can use -force flag to destroy it: <nil>
This is a bug that should be fixed by making sure vm_name is only unique within the folder and not the entire cluster.
It seems the calls to find_vm, err := d.FindVM(s.Location.VMName) as in
|
vm, err := d.FindVM(s.Location.VMName) |
need to be changed to
find_vm, err := d.FindVM(fmt.Sprintf("%s/%s", s.Location.Folder, s.Location.VMName)).
The PR at jetbrains-infra/packer-builder-vsphere#245 was migrated to this packer repository at #8938.
Packer version
Packer v1.5.4
Overview of the Issue
NB This is a migration of the issue jetbrains-infra/packer-builder-vsphere#244 to this repository, as it also applies.
I have a vm with a
vm_nameexamplein thefoldervagrant-templates, but when I try to create another one with the samevm_nameinside the emptyfoldervagrant-templates/packer, packer 1.5.4 refuses to start with:This is a bug that should be fixed by making sure
vm_nameis only unique within thefolderand not the entire cluster.It seems the calls to
find_vm, err := d.FindVM(s.Location.VMName)as inpacker/builder/vsphere/iso/step_create.go
Line 98 in 764b4cb
find_vm, err := d.FindVM(fmt.Sprintf("%s/%s", s.Location.Folder, s.Location.VMName)).The PR at jetbrains-infra/packer-builder-vsphere#245 was migrated to this packer repository at #8938.
Packer version
Packer v1.5.4