-
Notifications
You must be signed in to change notification settings - Fork 174
Build 'vsphere-iso' errored: error creating vm: folder '/datacenter/vm/' not found #285
Comments
Try adding this line to your config "vm_folder": "Templates/Packer" This assumes you have a folder called "Packer" in another folder called "Templates" right under your datacenter object called "datacenter". |
there is not a configuration key called "vm_folder" but there is one called "folder" And when i use this |
I'm also wondering if this is a problem since the datacenter in our non production is nested in a folder like so, FOLDER/datacenter |
Seems related to the version of vsphere |
Interesting we are on vSphere Client version 6.7.0.40000 |
As far as I can tell the vpshere_folder variable (config key) is used for where the template is stored when it's exported. Not where it is actually on the datastore. I've been banging my head against the same wall for a few days. So under the "vms and templates" view in vsphere (ctrl + alt + 2) if you create a folder (Template) that key should now work. Hope that helps. |
Upon further investigation, it may not be vSphere version related. My vSphere 6.0 environment has the datacenter nested in a folder (as per @Klashblack case). My vSphere 6.7 environment doesnt. |
Our vsphere is on 6.7 as well. Hoping someone has a idea to get this working. Would really love to implement this in our environment to create monthly templates |
Do you use folders in the vcenter hierarchy? In this screen shot the values for the packer config are as such "datacenter": "Home", However for where I want the templates to be created I have to fully specify the path to the folder like so "folder": "Templates/Packer-Builds", Hope this helps |
I am also experiencing this, vcenter 6 & 6.5. |
We use folders but the problem is that the DataCenter is in a Folder. So that is the issue it seems. I talked to the VMware team and they won't remove the Datacenter out of a folder.. So in your case it would be |
I have numerous vcenter setups I can play with so just tried this. In the VM view of vcenter6.5 |
I sorted the resourcepool issue by putting host as foldername/foldername2/hostname. Similar for folder doesn't work. |
Were you able to get it to work with FOLDER/DATACENTER/HOST ? my Vmware team won't move our datacenter out of a folder. They like to seperate them by EAST and WEST folders |
We have experienced this problem as well due to our datacenters being under a folder. There is a solution to this! This works on our environment (packer 1.5.4 vCenter 6.7u2). Our structure looks like this: vCenter When running packer build file.json it would spit out the error: To fix this we had to recompile packer after making modifications. This may sound scary but its actually not that bad. Steps to resolve: Hopefully this is helpful! Problem: |
Thanks @austness !! Much appreciated. Yeah we ended up finding this solution as well. My next step is maybe if there is a way we can create it as a Variable? But i'm a novice in GO. I really appreciate your help! Looks like this is what we will have to do for now though. At least it is working! |
When one's vsphere data center(s) are contained within a data center folder, vsphere-iso is broken. There is no way to specificy a "folder" in the packer template to allow builds to complete. See jetbrains-infra/packer-builder-vsphere#285 for more details. This change and removal of the folder template key, allows successful builds. DCO 1.1 Signed-off-by: David Ohlemacher <[email protected]>
When one's vsphere data center(s) are contained within a data center folder, vsphere-iso is broken. There is no way to specificy a "folder" in the packer template to allow builds to complete. See jetbrains-infra/packer-builder-vsphere#285 for more details. This change and removal of the folder template key, or using a folder value that includes "vm/..." allows successful builds. It is not clear why vm/ must be in this key and is also in the code. DCO 1.1 Signed-off-by: David Ohlemacher <[email protected]>
If anyone hits this bug, it was also reported here: hashicorp/packer#9328 |
Hi! We are on packer version 1.7.2 and still get this issue, I did see that the bug that @sqqqrly post for this is closed but it seams not been fixed or mayby this is something else?, anyone else that still has this problem? vsphere-iso: output will be in this color. ==> vsphere-iso: Creating VM... ==> Wait completed after 144 milliseconds 234 microseconds ==> Some builds didn't complete successfully and had errors: ==> Builds finished but no artifacts were created. |
Absolutely still an issue that does not store the image. Between this and the Waiting for IP issue this provisioner is maddening right now for a first time user. |
I am at a loss here. I have this working in my Lab but soon as i try in our Production environment i am running into this issue. The only thing that is different is our datacenter is nested in a folder.
I get the following error
vsphere-iso output will be in this color.
==> vsphere-iso: Creating VM...
Build 'vsphere-iso' errored: error creating vm: folder '/DATACENTER/vm/' not found
==> Some builds didn't complete successfully and had errors:
--> vsphere-iso: error creating vm: folder '/DATACENTER/vm/' not found
==> Builds finished but no artifacts were created.
{
}
The text was updated successfully, but these errors were encountered: