We had these issue in the past ... and this is what we discovered:
1) VSphereNotFoundException is raised also in the case the user don't have 
permission to see it.
So, considering you are 100% sure the name is correct, I can tell you that 
it's a permission error.

2) I know it may seems strange ... I'm still scratching my head ... but 
even if a user is an administrator on vCenter, it may not have enough 
permissions on an ESXi datastore.
How this happens ... we never figure it out ... but the guy who is managing 
vCenter in our case, he was setting explicit permission on the single 
entity directly on the EXSi host and vCenter to workaround this issue.
I don't have more details than that about this permission issues, sorry

Cheers,
Gianluca.


On Wednesday, 1 April 2020 20:40:02 UTC+1, Christoph Fetzer wrote:
>
> Hi Gianluca,
>
> OK, the log was a good idea, thank you very much!
> There I found:
>
> Started provisioning VC9BuildSlave97yt3vpya79krvglcpcgevei4 from vSphereCloud 
> with 1 executors. Remaining excess workload: 0
>
> Apr 01, 2020 5:13:01 PM WARNING 
> org.jenkinsci.plugins.vSphereCloud$VSpherePlannedNode$1 call
>
> Failed to provision new slave VC9BuildSlave97yt3vpya79krvglcpcgevei4
> org.jenkinsci.plugins.vsphere.tools.VSphereNotFoundException: vSphere Error: 
> Datastore "XXX_RAID5_Datastore" not found
>         at 
> org.jenkinsci.plugins.vsphere.tools.VSphere.createRelocateSpec(VSphere.java:336)
>         at 
> org.jenkinsci.plugins.vsphere.tools.VSphere.cloneOrDeployVm(VSphere.java:235)
>         at 
> org.jenkinsci.plugins.vSphereCloudSlaveTemplate.provision(vSphereCloudSlaveTemplate.java:428)
>         at 
> org.jenkinsci.plugins.vSphereCloudSlaveTemplate.provision(vSphereCloudSlaveTemplate.java:403)
>         at 
> org.jenkinsci.plugins.vSphereCloud$VSpherePlannedNode.provisionNewNode(vSphereCloud.java:534)
>         at 
> org.jenkinsci.plugins.vSphereCloud$VSpherePlannedNode.access$100(vSphereCloud.java:496)
>         at 
> org.jenkinsci.plugins.vSphereCloud$VSpherePlannedNode$1.call(vSphereCloud.java:510)
>         at 
> org.jenkinsci.plugins.vSphereCloud$VSpherePlannedNode$1.call(vSphereCloud.java:506)
>         at 
> jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
>         at 
> jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:71)
>         at java.util.concurrent.FutureTask.run(Unknown Source)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>         at java.lang.Thread.run(Unknown Source)
>
>
> Unfortunately this exactly matches the name of the datastore as displayed 
> in vSphere (copy'n'pasted - replace the triple X with the actual hostname).
> [image: Capture.PNG]
>
>
>
>
>
>
>
>
>
>
> Sorry for the german UI. Did I get something wrong? Isn't this the proper 
> ID for the datastore?
> The user is administrator on the whole server (I know but that's the next 
> step).
>
> BR,
> Christoph
>
>
> Am Mittwoch, 1. April 2020 17:38:11 UTC+2 schrieb Gianluca:
>>
>> Hi,
>> we use vSphere cloud plugin and some hints to help you debug:
>> 1) go to the Jenkins log and check any error there
>> Some errors we had in the past:
>> - typo in the node label and the clone never started
>> - clone started but it was failing due to permission errors in vSphere 
>> (the user is not able to do the action, test connection only check that you 
>> can connect ... not all permission needed)
>>
>> 2) go to the vCenter and check that the VM is actually created; we had 
>> issues with the VM not being powered on or wrong networking into the 
>> template
>>
>> 3) go to the "Nodes" on Jenkins and check that the node appears there
>>
>> 4) go to the Node page and check any logs for any error
>>
>>
>>
>> On Wednesday, 1 April 2020 16:13:45 UTC+1, Christoph Fetzer wrote:
>>>
>>> Hi,
>>>
>>> I have access to an Esxi-Server used by a vSphere instance. I set up a 
>>> vsphere cloud in my Jenkins installation properly ("Test connection" works).
>>> I set up a template VM (Windows 10) with a Snapshot, Autologon and 
>>> Autostart according to 
>>> https://github.com/jenkinsci/vsphere-cloud-plugin/blob/master/docs/vm-configuration.md
>>> I configured a startup template in the vSphere cloud according to: 
>>> https://github.com/jenkinsci/vsphere-cloud-plugin/blob/master/docs/jenkins-configuration.md
>>> I'd like to use the approch "Static configuration" mentioned for startup 
>>> of the nodes.
>>> In the vSphere cloud I made the plugin use "VC9-build" als label for the 
>>> nodes.
>>> Then I changed a build job based on that Jenkinsfile (declarative):
>>>
>>> #!groovy
>>> pipeline {
>>>     agent { 
>>>         label 'VC9-build'
>>>     }
>>> ...
>>> }
>>>
>>>
>>> My expectation is that after start of the job the vsphere plugin would 
>>> clone a VM in ESXI, start that up, connect it to jenkins and make the job 
>>> run there.
>>> Instead I only have a job in may waiting queue with the name "part of 
>>> ${jobname}" and I can't see anything on vSpere so I guess clone of the 
>>> machine didn't even start.
>>> Am I missing a link somewhere in to make the node creation start?
>>>
>>> BR,
>>> Christoph
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/e719cd3f-ee09-4432-8bb9-06f7283e696a%40googlegroups.com.

Reply via email to