Open mashiutz opened 4 years ago
Can you confirm that superman@vsphere.local has a proper rights to create VMs on hosts within the cluster? Most people define cluster level permissions without propagate checkbox enabled.If you login to vsphere using superman@vsphere.local can you create VMs on IT-256GB cluster?
Yep, i have just logged in with that user and created a VM in the cluster. Maybe there are some special permissions that are needed? The API logs on the VCenter server show nothing :(
@mkuzmin please, maybe some input?
@mkuzmin will not respond as he is not involved in vsphere packer builder project anymore. Try to change value for insecure_connection to true, also remove cpu_cores value for testing purposes.
also if above will not solve your problem, could you try use builder from fallowing link? https://teamcity.jetbrains.com/viewLog.html?buildId=2529292&buildTypeId=PackerVSphere_Build&tab=artifacts
Thank you very much! I'll update you. are you involved with the project now?
I'm not involved with the project, but same as you I use vsphere-iso and vsphere-clones builders provided by jetbrains. I use it successfully on vSphere 6.7 although some updates for the builder would be advised. More info about @mkuzmin involvement into this project can be found here: https://github.com/hashicorp/packer/pull/7168
First, thank you for your help :) I have tried your suggestions above, but I’m getting the same results. Hope someone has more input on this.
Everything looks good with your template file. I would assume it's a vSphere permission issue, although you said you have checked that already. Can you give superman@vsphere.local full administrator rights to your vCenter server for testing purposes (if you work on production environment better don't do that)? If not, check permissions on WinTemplate-IT folder and on your vswitch/dvswitch, for superman@vsphere.local. I had similar problem yesterday when someone took my permissions off from my esxi host (I used it in non-clustered environment). Take a look here for permissions settings: https://github.com/jetbrains-infra/packer-builder-vsphere/issues/97
What gets people a lot times is when their cluster is in a folder structure. If it is then you need to provide the full path for example "FolderName/ClusterName". I use the same structure for the vm_folder field. Hope that helps.
@nslracer I've been running into this issue today. 2 node esxi cluster, and am running vcenter as a VM on one of the nodes. Still cant seem to get passed the issue (running DRS BTW). Driving me a bit mad. Could vcenter as VM on one of the nodes be an issue? SO close, but cant seem to figure out this same error:
This is specifying a resource pool:
`vsphere-iso output will be in this color.
==> vsphere-iso: Creating VM... Build 'vsphere-iso' errored: error creating vm: resource pool 'Arkham Asylum/Resources/deployments' not found
==> Some builds didn't complete successfully and had errors: --> vsphere-iso: error creating vm: resource pool 'Arkham Asylum/Resources/deployments' not found`
this is NOT specifying a resource pool:
`==> vsphere-iso: Creating VM... Build 'vsphere-iso' errored: error creating vm: resource pool 'Arkham Asylum/Resources/' not found
==> Some builds didn't complete successfully and had errors: --> vsphere-iso: error creating vm: resource pool 'Arkham Asylum/Resources/' not found
==> Builds finished but no artifacts were created. `
any ideas? thx
@jasonwilliams14 - I also run a 2 node ESXi cluster with vCenter as one of the VM's so I know for sure that's not your issue.
I believe the issue might be the space in your resource names. The builder just does not handle spaces well in the datacenter, cluster, folder and resource pool fields. If it's an option I would remove all spaces on your VMware object names (Cluster, Datacenter, folders, etc), update your code and try again.
@nslracer I will give that a shot. Thx
@jasonwilliams14 Any luck?
@nslracer heya...was going to respond today. I did get it working. i cleaned up the naming convention with no spaces and that seemed to be the issue. Now I can pull ubuntu/debian and centos images just fine now with my setup. Much appreciated!
@jasonwilliams14 Nice!!
Hi everyone Involved,
I know its been a while...
I'm still getting the same result:
Build 'vsphere-iso' errored: error creating vm: host '' not found.
My resource pool's does not have any spaces in their names, only dashes.
I'm using the latest version of Packer which is currently 1.5.4.
I know that the vsphere-iso builder was integrated into packer.exe. Still no luck.
Any take on this?
Should I file an issue on the official Packer GitHub?
Thanks again :)
I can also reproduce this issue with Packer 1.5.4 and vSphere 6.7 (having a cluster name containing a dash in the middle).
Can confirm on Packer 1.5.4 with a cluster name with 2 dashes
Removing the dash from the cluster name did not change the behavior for our system:
Build 'vsphere-iso' errored: error creating vm: host '' not found
Probably some other aspect is causing this error.
Have anyone found a way around this issue? Do you know if this will get fixed in the next version? I'll open an issue on the official Packer GitHub as well
See if the answer on this thread will help
https://github.com/jetbrains-infra/packer-builder-vsphere/issues/285#issuecomment-589819250
For future reference, if anyone here has a /
in their network
, you'll need to escape it with%2f
...semi-related
Hello There :) Im trying to build a new Windows template (using latest version - 2.3). We have a Cluster with DRS Enabled, so im only specifying a Cluster in my Json. If im also specifying a Resource Pool, i'm getting the same error. Through vSphere web UI, i have made sure that the cluster do no reside in any folder. vSphere version is 6.7 Im using the following json file :
`{ "builders": [ { "type": "vsphere-iso",
}`
Many thanks!