VMware Cloud Community
Dirty_Hipster
Enthusiast
Enthusiast
Jump to solution

Unable to Read XML File from vCO - Permission Denied

Hello Guys,

I was trying to read/write some xml files from vCO workflows:

  • I've configured the vCO server's js-io-right.conf according to: http://pubs.vmware.com/vsphere-51/index.jsp?topic=%2Fcom.vmware.vsphere.vco_install_config.doc%2FGUI...  I've set the /Orchestrator/xml folder to be +rwx, from which I will read .xml file later. And I even tried to set "+rwx /Orchestrator/xml/sample.xml". But, still I received "Permission Denied" Error message from vCO when I run the workflow
  • I am currently using vCO 5.1, with highest rights to do anything I want.
  • The Guest OS of the Orchestrator server is Linux SUSE, but that shouldn't be a problem, right?

I am kinda stuck here, and I would like to see if anyone else has ever encountered this problem before, and how did you fix it?

Any insight into this issue will be much appreciated.Smiley Happy

Thanks,

DH

0 Kudos
1 Solution

Accepted Solutions
cdecanini_
VMware Employee
VMware Employee
Jump to solution

Odd.

What is your use case ? Does this file need to to be accessed from an external system or not ? If not storing the file in a resource element is a better option.

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you! Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator for vCenter Orchestrator tips and tutorials - @vCOTeam on Twitter

View solution in original post

0 Kudos
15 Replies
Dirty_Hipster
Enthusiast
Enthusiast
Jump to solution

Someone? Anyone?:smileyconfused:

0 Kudos
cdecanini_
VMware Employee
VMware Employee
Jump to solution

Is /Orchestrator/xml/ a valid path ?

You have to use relative path starting by ".." or path from the root of the appliance.

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you! Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator for vCenter Orchestrator tips and tutorials - @vCOTeam on Twitter
0 Kudos
Dirty_Hipster
Enthusiast
Enthusiast
Jump to solution

Thanks for your reply and sorry for the confusion.

In my default setting, I have:

-rwx /

+rwx /var/run/orchestrator

I changed that to:

+rwx /

+rwx /var/run/orchestrator/xml

The filePath I input for the workflow is:

/var/run/orchestrator/xml/sample.xml  I also copied the sample.xml file to the root and tried /sample.xml

The results are all the same - permission denied.

Can I ask what will the relative path be like in this case?

Many thanks

0 Kudos
cdecanini_
VMware Employee
VMware Employee
Jump to solution

The paths have changed since earlier release of the appliance but your relative bath should start from the bin directory (if this still exist) or from wherever orchestrator.sh is.

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you! Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator for vCenter Orchestrator tips and tutorials - @vCOTeam on Twitter
0 Kudos
Dirty_Hipster
Enthusiast
Enthusiast
Jump to solution

Thanks for the prompt reply, the followings are the settings in my js-io.rights.conf, are they seem to be right?

Capture.PNG

I don't quite understand what do you mean by the "start from bin directory", what should the filepath in the workflow be?

0 Kudos
Dirty_Hipster
Enthusiast
Enthusiast
Jump to solution

I've found out the orchestrator.sh file, it is located on the "./opt/vmo/app-server/bin"

I tried to copy the xml file in the bin folder, and called it from WF as "/opt/vmo/app-server/bin/samle.xml", still "permission denied"

0 Kudos
cdecanini_
VMware Employee
VMware Employee
Jump to solution

Forgot my comment on the change of path. this is on a version of vCO that is not publicly available yet.

+rwx /var/run/orchestrator/xml should allow you to write there.

You can also use System.getTempDirectory as a place to read / write temp data.

the relative path start from within the bin directory so it is going to be ../xml if you create a directory a the same level of the bin directory.

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you! Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator for vCenter Orchestrator tips and tutorials - @vCOTeam on Twitter
0 Kudos
cdecanini_
VMware Employee
VMware Employee
Jump to solution

because you would need to change it to +rwx ../bin

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you! Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator for vCenter Orchestrator tips and tutorials - @vCOTeam on Twitter
0 Kudos
cdecanini_
VMware Employee
VMware Employee
Jump to solution

This may seems obvious but have you restarted the vCO service after doing the change

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you! Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator for vCenter Orchestrator tips and tutorials - @vCOTeam on Twitter
0 Kudos
Dirty_Hipster
Enthusiast
Enthusiast
Jump to solution

Our vCenter server is temporarily down, so I haven't got a chance to restart the vCO service from the web configuration.

But very likely, you are right, I'm about to find out in a very short time...

0 Kudos
Dirty_Hipster
Enthusiast
Enthusiast
Jump to solution

Hi cdecanini,

I restarted the vCO service several times, I've changed it to +rwx ../bin,  and I also put the sample.xml file directly into the bin folder, but still permission denied.

It's really like a pain in the ass...

0 Kudos
cdecanini_
VMware Employee
VMware Employee
Jump to solution

Odd.

What is your use case ? Does this file need to to be accessed from an external system or not ? If not storing the file in a resource element is a better option.

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you! Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator for vCenter Orchestrator tips and tutorials - @vCOTeam on Twitter
0 Kudos
Dirty_Hipster
Enthusiast
Enthusiast
Jump to solution

The case here is like I'd like to use a xml file to keep track of all the vms provisioned, and I may also extract some parameters from that file to provision new machine.

What do you mean by resource element?

0 Kudos
cdecanini_
VMware Employee
VMware Employee
Jump to solution

In the design tab of the vCO client there is a resources tab.

You can create a folder there and import any kind of file (I think the limit is 4096 KB).

Once done you can add an attribute of type resource element and set it to your file.

From a scriptable task you can access the file content like this

var xmlString = resource.getContentAsMimeAttachment().content;

If you need to change it you can do :

var mimeAttachment = new MimeAttachment();

mimeAttachment.content = xmlString;

mimeAttachment.mimeType = "text/xml";

mimeAttachment.name = resource.name;

Resource element are stored in the vCO database.

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you! Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator for vCenter Orchestrator tips and tutorials - @vCOTeam on Twitter
Dirty_Hipster
Enthusiast
Enthusiast
Jump to solution

It works!!

And it really helped me.

Thanks so much!

Gob bless you!

0 Kudos