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

Using ansible vmware_guest module getting "msg": "A specified parameter was not correct: spec.pool" #616

Open
skirk234 opened this issue Oct 12, 2017 · 7 comments

Comments

@skirk234
Copy link

skirk234 commented Oct 12, 2017

Trying to create a VM with the required fields on the ansible vmware_guest module and getting spec.pool parameter is not correct. What is the spec.pool parameter referring to?

@prziborowski
Copy link

Hi skirk234, you might have to provide more details, or possibly ask in ansible as we don't maintain that code.
I'm not sure what function is being called, nor what parameters are provided for this.

@skirk234
Copy link
Author

fatal: [127.0.0.1]: FAILED! => {
"changed": true,
"clone_method": "Clone",
"clonespec": {
"config": {
"alternateGuestName": null,
"annotation": null,
"bootOptions": null,
"changeTrackingEnabled": null,
"changeVersion": null,
"consolePreferences": null,
"cpuAffinity": null,
"cpuAllocation": null,
"cpuFeatureMask": [],
"cpuHotAddEnabled": true,
"cpuHotRemoveEnabled": null,
"crypto": null,
"deviceChange": [],
"dynamicProperty": [],
"dynamicType": null,
"extraConfig": [],
"files": null,
"firmware": null,
"flags": null,
"ftInfo": null,
"guestAutoLockEnabled": null,
"guestId": "windows8Server64Guest",
"instanceUuid": null,
"latencySensitivity": null,
"locationId": null,
"managedBy": null,
"maxMksConnections": null,
"memoryAffinity": null,
"memoryAllocation": null,
"memoryHotAddEnabled": true,
"memoryMB": null,
"memoryReservationLockedToMax": null,
"messageBusTunnelEnabled": null,
"migrateEncryption": null,
"name": null,
"nestedHVEnabled": null,
"networkShaper": null,
"npivDesiredNodeWwns": null,
"npivDesiredPortWwns": null,
"npivNodeWorldWideName": [],
"npivOnNonRdmDisks": null,
"npivPortWorldWideName": [],
"npivTemporaryDisabled": null,
"npivWorldWideNameOp": null,
"npivWorldWideNameType": null,
"numCPUs": null,
"numCoresPerSocket": null,
"powerOpInfo": null,
"repConfig": null,
"scheduledHardwareUpgradeInfo": null,
"swapPlacement": null,
"tools": null,
"uuid": null,
"vAppConfig": null,
"vAppConfigRemoved": null,
"vAssertsEnabled": null,
"vPMCEnabled": null,
"version": null,
"virtualICH7MPresent": null,
"virtualSMCPresent": null,
"vmProfile": []
},
"customization": null,
"dynamicProperty": [],
"dynamicType": null,
"location": {
"datastore": "xxxxxxxxxxxxxxxx",
"deviceChange": [],
"disk": [],
"diskMoveType": null,
"dynamicProperty": [],
"dynamicType": null,
"folder": null,
"host": null,
"pool": "xxxxxxxxxxxxxxxxxx",
"profile": [],
"service": null,
"transform": null
},
"memory": null,
"powerOn": false,
"snapshot": null,
"template": false
},
"configspec": {
"alternateGuestName": null,
"annotation": null,
"bootOptions": null,
"changeTrackingEnabled": null,
"changeVersion": null,
"consolePreferences": null,
"cpuAffinity": null,
"cpuAllocation": null,
"cpuFeatureMask": [],
"cpuHotAddEnabled": true,
"cpuHotRemoveEnabled": null,
"crypto": null,
"deviceChange": [],
"dynamicProperty": [],
"dynamicType": null,
"extraConfig": [],
"files": null,
"firmware": null,
"flags": null,
"ftInfo": null,
"guestAutoLockEnabled": null,
"guestId": "windows8Server64Guest",
"instanceUuid": null,
"latencySensitivity": null,
"locationId": null,
"managedBy": null,
"maxMksConnections": null,
"memoryAffinity": null,
"memoryAllocation": null,
"memoryHotAddEnabled": true,
"memoryMB": null,
"memoryReservationLockedToMax": null,
"messageBusTunnelEnabled": null,
"migrateEncryption": null,
"name": null,
"nestedHVEnabled": null,
"networkShaper": null,
"npivDesiredNodeWwns": null,
"npivDesiredPortWwns": null,
"npivNodeWorldWideName": [],
"npivOnNonRdmDisks": null,
"npivPortWorldWideName": [],
"npivTemporaryDisabled": null,
"npivWorldWideNameOp": null,
"npivWorldWideNameType": null,
"numCPUs": null,
"numCoresPerSocket": null,
"powerOpInfo": null,
"repConfig": null,
"scheduledHardwareUpgradeInfo": null,
"swapPlacement": null,
"tools": null,
"uuid": null,
"vAppConfig": null,
"vAppConfigRemoved": null,
"vAssertsEnabled": null,
"vPMCEnabled": null,
"version": null,
"virtualICH7MPresent": null,
"virtualSMCPresent": null,
"vmProfile": []
},
"failed": true,
"invocation": {
"module_args": {
"annotation": null,
"cluster": null,
"customization": {},
"customvalues": [],
"datacenter": "xxxxxxxxxxxxxxx",
"disk": [],
"esxi_hostname": null,
"folder": "/vm",
"force": false,
"guest_id": "windows8Server64Guest",
"hardware": {},
"hostname": "xxxxxxxxxxxxxxxxx",
"is_template": false,
"linked_clone": false,
"name": "xxxxxxxxxxxxxxxxxxxxxx",
"name_match": "first",
"networks": [],
"password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"resource_pool": "Resources",
"snapshot_src": null,
"state": "poweredon",
"template": "2008R2Template",
"username": "xxxxxxxxxxxxxxxx",
"uuid": null,
"validate_certs": false,
"wait_for_ip_address": false
}
},
"msg": "A specified parameter was not correct: spec.pool"

@prziborowski
Copy link

"host": null,
"pool": "xxxxxxxxxxxxxxxxxx",

So it looks like pool is specified, but host is not.
"if resource pool is specified and the target pool represents a cluster without DRS enabled, an InvalidArgument exception be thrown." (ref)

Can you confirm based on the blacklisted information whether that resource pool belongs to a non-DRS cluster?

@skirk234
Copy link
Author

I confirmed that the resource pool (it was pulling the default resource pool) was a DRS cluster. We tested with creating a resource pool and specifying it in the call to vcenter and that worked. We also tried declaring the default resource pool and the call to vcenter. It failed. So declaring the resource pool as default or leaving it blank and it getting the default resource pool from the template (I am assuming) fails. but creating a resource pool besides a default and specifying works. We would like to not have to create a resource pool and just let it take the default.

@aaronk1
Copy link

aaronk1 commented Oct 26, 2018

Thank, @prziborowski ! That was helpful

"host": null,
"pool": "xxxxxxxxxxxxxxxxxx",

So it looks like pool is specified, but host is not.
"if resource pool is specified and the target pool represents a cluster without DRS enabled, an InvalidArgument exception be thrown." (ref)

Can you confirm based on the blacklisted information whether that resource pool belongs to a non-DRS cluster?

@aaronk1
Copy link

aaronk1 commented Oct 26, 2018

I confirmed that the resource pool (it was pulling the default resource pool) was a DRS cluster. We tested with creating a resource pool and specifying it in the call to vcenter and that worked. We also tried declaring the default resource pool and the call to vcenter. It failed. So declaring the resource pool as default or leaving it blank and it getting the default resource pool from the template (I am assuming) fails. but creating a resource pool besides a default and specifying works. We would like to not have to create a resource pool and just let it take the default.

@skirk234 We don't use Resource Pools (used to pass in the default one as a var), but I was able to pass the following to vmware_guest and the VM cloned I was trying to clone (got the same error as you prior to changing these):

  • cluster:

Omitted the following arguments to vmware_guest:

  • esxi_hostname
  • resource_pool

@ssaammoo
Copy link

ssaammoo commented Oct 9, 2019

Hi people ... is there a resolution for this issue as of now :-)

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

No branches or pull requests

5 participants