Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't create new servers #13

Closed
scarpellini opened this issue Mar 10, 2016 · 6 comments
Closed

Can't create new servers #13

scarpellini opened this issue Mar 10, 2016 · 6 comments

Comments

@scarpellini
Copy link

Hi.

I'm able to list catalog items and servers, and show details about them without problems.

But when I try to create a new server (w/ --subtenant-id), I receive following error message:

knife vra server create "5b1881e8-5788-4de1-a25a-a80d7336d7d8" --cpus "2" --memory "2048" --subtenant-id 'COMPANYNAME_81-LQ93UR' --requested-for "eduardo.scarpellini@companyname.com.br" --ssh-password "p4ssw0rd"

ERROR: Vra::Exception::RequestError: Unable to submit request: Could not read JSON: Unable to unmarshal (to type [simple type, class com.vmware.vcac.catalog.domain.rest.OrganizationReference]): Invalid argument. (through reference chain: 
com.vmware.vcac.catalog.domain.request.CatalogItemRequest["organization"]); nested exception is com.fasterxml.jackson.databind.JsonMappingException:  Unable to unmarshal (to type [simple type, class com.vmware.vcac.catalog.domain.rest.OrganizationReference]): 
Invalid argument. (through reference chain: com.vmware.vcac.catalog.domain.request.CatalogItemRequest["organization"]) [acceptableTypes: [application/*+json;charset=UTF-8, application/json;charset=UTF-8]]

Am I doing something wrong?

@adamleff
Copy link
Contributor

@scarpellini The subtenant-id is expected to be the ID of the subtenant/business group, not the name of it. This is usually a string formatted like a UUID (i.e. 4a76bb82-fb04-46d4-9675-98d2a08f44d2)

The error you're getting is coming from the vRA API itself which has a tendency to provide less-than-useful error messages, so it's hard to tell exactly why your request is failing. But I'd bet money it's because of your subtenant ID. You may need to ask your vRA administrator for assistance in getting the ID as regular users cannot access the API endpoint to get the ID of a given subtenant.

~Adam

@scarpellini
Copy link
Author

@adamleff

I was using that value as subtenant-id because is what I see on the web-panel.
I'll contact the VMWare administrator to get the right ID.

Thanks so much.

@adamleff
Copy link
Contributor

You're welcome, @scarpellini! I'm going to close out this issue for now, but if you continue to have troubles with this, feel free to reopen with some more details and we'll do our best to help.

@scarpellini
Copy link
Author

It works!
Thanks again.

@adamleff
Copy link
Contributor

Great to hear! You're very welcome, and thanks for confirming.

@digitaljedi2
Copy link

digitaljedi2 commented Aug 2, 2016

Why can't we obtain the subtenant-reference via the knife vra catalog list --entitled or knife vra catalog list without asking our Administrator to get the right ID?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants