[JIRA] [vsphere-cloud-plugin] (JENKINS-33129) Unable to change virtual machine port group

5 views
Skip to first unread message

wellumies@gmail.com (JIRA)

unread,
Feb 24, 2016, 9:19:02 AM2/24/16
to jenkinsc...@googlegroups.com
veli pekka jutila created an issue
 
Jenkins / Bug JENKINS-33129
Unable to change virtual machine port group
Issue Type: Bug Bug
Assignee: Unassigned
Attachments: vsphere_plugin_failure.png
Components: vsphere-cloud-plugin
Created: 24/Feb/16 2:18 PM
Environment: Debian 8, Jenkins 1.646, vsphere cloud plugin 2.9
Labels: vsphere
Priority: Minor Minor
Reporter: veli pekka jutila

Trying to change the port group of my virtual machine to one that is used for all virtual machines in a particular Resource Pool. I get a null pointer exception, when I try to use the vsphere cloud plugin. Cloud user account is able to do that through Vcenter GUI

Building on master in workspace /var/lib/jenkins/jobs/test vcenter networking reconfiguration/workspace
[vSphere]
[vSphere] Performing vSphere build step: "Power-Off VM"
[vSphere] Attempting to use server configuration: "vcenter"
[vSphere] Shutting Down VM FW-DEV...
[vSphere] Successfully shutdown "FW-DEV"
[vSphere]
[vSphere] Performing vSphere build step: "Reconfigure VM"
[vSphere] Attempting to use server configuration: "vcenter"
[vSphere] Reconfiguring VM "FW-DEV". Please wait ...
[vSphere] Preparing reconfigure: Edit Network Adapter ""
[vSphere] Reconfiguring Distributed Switch Port Group -> pgFirewall Port Id ->
[vSphere] Exception
org.jenkinsci.plugins.vsphere.tools.VSphereException: java.lang.NullPointerException
at org.jenkinsci.plugins.vsphere.tools.VSphere.getDistributedVirtualSwitchByPortGroup(VSphere.java:883)
at org.jenkinsci.plugins.vsphere.builders.ReconfigureNetworkAdapters.perform(ReconfigureNetworkAdapters.java:173)
at org.jenkinsci.plugins.vsphere.builders.Reconfigure.reconfigureVm(Reconfigure.java:81)
at org.jenkinsci.plugins.vsphere.builders.Reconfigure.perform(Reconfigure.java:58)
at org.jenkinsci.plugins.vsphere.VSphereBuildStepContainer.perform(VSphereBuildStepContainer.java:91)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
at hudson.model.Build$BuildExecution.build(Build.java:205)
at hudson.model.Build$BuildExecution.doRun(Build.java:162)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
at hudson.model.Run.execute(Run.java:1738)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Caused by: java.lang.NullPointerException
at org.jenkinsci.plugins.vsphere.tools.VSphere.getDistributedVirtualSwitchByPortGroup(VSphere.java:878)
... 13 more
Build step 'vSphere Build Step' marked build as failure
Finished: FAILURE

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

wellumies@gmail.com (JIRA)

unread,
Mar 2, 2016, 3:15:02 AM3/2/16
to jenkinsc...@googlegroups.com
veli pekka jutila commented on Bug JENKINS-33129
 
Re: Unable to change virtual machine port group

It seems this is also a permission issue. Access to the port group is not enough. You need 'read' to datacenter root or something else. Maybe because of this method that I suspect crawls to the pgGroup from bottom-up. closing this issue

getVsphere().getDistributedVirtualPortGroupByName(getVM(), expandedDistributedPortGroup);

wellumies@gmail.com (JIRA)

unread,
Mar 2, 2016, 3:16:03 AM3/2/16
to jenkinsc...@googlegroups.com
veli pekka jutila closed an issue as Not A Defect
 

user must have suficient permissons to change port groups. This might include permissions to the datacenter root. Permission to the port group is not enough

Change By: veli pekka jutila
Status: Open Closed
Resolution: Not A Defect

jorgelon@gmail.com (JIRA)

unread,
Sep 13, 2016, 12:34:01 PM9/13/16
to jenkinsc...@googlegroups.com
Jorge Lon reopened an issue
 

I have the same issue and i think it is not solved because the user has administrator privileges. i have tried with pipeline and graphically. same result. this is the code in pipeline

step([$class: 'VSphereBuildStepContainer', buildStep: [$class: 'Reconfigure', reconfigureSteps: [[$class: 'ReconfigureNetworkAdapters', deviceAction: 'ADD', deviceLabel: '', distributedSwitch: false, macAddress: env.MAC, portGroup: 'vlan2223', standardSwitch: true]], vm: 'env.VMCLONED'], serverName: 'myserver'])

does the virtual machine name accept variables?

and the error

[vSphere] Performing vSphere build step: "Reconfigure VM"

[vSphere] Attempting to use server configuration: "PRE"
[vSphere] Reconfiguring VM "env.VMCLONED". Please wait ...
[vSphere] Preparing reconfigure: Add Network Adapter ""
[vSphere] Reconfiguring MAC Address -> 00:50:56:00:00:04
[vSphere] Reconfiguring Network Port Group -> vlan2223
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: java.lang.NullPointerException
Finished: FAILURE

Change By: Jorge Lon
Resolution: Not A Defect
Status: Closed Reopened
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

jorgelon@gmail.com (JIRA)

unread,
Sep 13, 2016, 12:35:01 PM9/13/16
to jenkinsc...@googlegroups.com
I have the same issue and i think it is not solved because the user has administrator privileges. i have tried with pipeline and graphically. same result. this is the code in pipeline

step([$class: 'VSphereBuildStepContainer', buildStep: [$class: 'Reconfigure', reconfigureSteps: [[$class: 'ReconfigureNetworkAdapters', deviceAction: 'ADD', deviceLabel: '', distributedSwitch: false, macAddress: env.MAC, portGroup: 'vlan2223', standardSwitch: true]], vm: 'env.VMCLONED'], serverName: 'myserver'])

does the virtual machine name accept variables?

and the error

[vSphere] Performing vSphere build step: "Reconfigure VM"
[vSphere] Attempting to use server configuration: "PRE"
[vSphere] Reconfiguring VM "env.VMCLONED". Please wait ...
[vSphere] Preparing reconfigure: Add Network Adapter ""
[vSphere] Reconfiguring MAC Address -> 00: 50 20 :56:00: 00 32 :04

[vSphere] Reconfiguring Network Port Group -> vlan2223
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: java.lang.NullPointerException
Finished: FAILURE

jorgelon@gmail.com (JIRA)

unread,
Sep 13, 2016, 12:35:01 PM9/13/16
to jenkinsc...@googlegroups.com
Jorge Lon edited a comment on Bug JENKINS-33129
I have the same issue and i think it is not solved because the user has administrator privileges. i have tried with pipeline and graphically. same result. this is the code in pipeline

step([$class: 'VSphereBuildStepContainer', buildStep: [$class: 'Reconfigure', reconfigureSteps: [[$class: 'ReconfigureNetworkAdapters', deviceAction: 'ADD', deviceLabel: '', distributedSwitch: false, macAddress: env.MAC, portGroup: 'vlan2223', standardSwitch: true]], vm: 'env.VMCLONED'], serverName: 'myserver'])

does the virtual machine name accept variables?

and the error

[vSphere] Performing vSphere build step: "Reconfigure VM"
[vSphere] Attempting to use server configuration: " PRE myserver "

[vSphere] Reconfiguring VM "env.VMCLONED". Please wait ...
[vSphere] Preparing reconfigure: Add Network Adapter ""
[vSphere] Reconfiguring MAC Address -> 00:20:56:00:32:04

[vSphere] Reconfiguring Network Port Group -> vlan2223
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: java.lang.NullPointerException
Finished: FAILURE

pjdarton@gmail.com (JIRA)

unread,
Sep 24, 2019, 6:08:02 AM9/24/19
to jenkinsc...@googlegroups.com
pjdarton closed an issue as Not A Defect
 

While the exception handling could be improved (y'all free to submit a PR for that...) this was user-error.

Change By: pjdarton
Status: Reopened Closed
Resolution: Not A Defect
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages