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

Deploy fails with certain characters in hostname #54

Open
derchrisuk opened this issue Nov 1, 2015 · 1 comment
Open

Deploy fails with certain characters in hostname #54

derchrisuk opened this issue Nov 1, 2015 · 1 comment

Comments

@derchrisuk
Copy link

Not sure if this is a problem of ezmomi of pyvmomi.
When I try to deploy a template, and use a . or _ in the hostname, the deploy fails with this:

pyVmomi.VmomiSupport.InvalidArgument: (vmodl.fault.InvalidArgument) {
dynamicType = <unset>,
dynamicProperty = (vmodl.DynamicProperty) [],
msg = 'A specified parameter was not correct. \nspec.identity.hostName',
faultCause = <unset>,
faultMessage = (vmodl.LocalizableMessage) [],
invalidProperty = u'spec.identity.hostName'
}
@derchrisuk
Copy link
Author

I fixed my issue buy using the following to remove certain special characters from the hostname:

ident.hostName.name = self.config['hostname'].translate(None, '._!@#^%$&')

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

1 participant