-
Notifications
You must be signed in to change notification settings - Fork 174
Issues with sample script #94
Comments
Which sample script are you referring to? What is the issue with it? |
JR, I accidentally hit 'submit' before typing anything, apologies. I've updated my OP with the relevant information, and will update this thread with the exact error messages tomorrow and some better detail on what exactly I've tried to manipulate the hostFolder children tree to return me ClusterComputerResources. I noticed that the rbvmomi/lib/vim/ directory doesnt have a ClusterComputeResource.rb file. Does the current release of rbvmomi support such a hostFolder child object? Yours in confusion. |
I've got this resolved now. 2 things:
So my 'issues' are mostly specific to my env, but hopefully someone having issues getting started with rbvmomi and the example scripts might read this and understand that IF you do not have full vsphere administrator privs associated with your vcenter login then the example scripts wont work 'out of the box' |
Thanks for the feedback! I'll definitely look at updating this script to be a bit easier to use. |
JR, here's my simple nested interation for a specific ClusterComputeResource.resourcePool and a specific child of vmFolder. Should be easy enough to modify to pass in values for a specific resourcePool and child of vmFolder. Im fairly new to ruby, so I'm finding variable scoping to be a bit of a pain. Maybe split it into two different methods and pass references in and out?
|
Thanks for that! |
I'm facing issue while creating new vm using create_VM.rb, it gives below error:
|
Without seeing your code I cant be 100%, but that kind of error is almost certainly related to the way in which you are defining your VM object and its associated devices. |
here is my code:vm_cfg = { |
Please use the "<code>" tags when posting code so the formatting doesnt get all munged, Here's a sample that I'm 99% sure still works (havent used it in over 2 years, api may have changed?) from my code at https://github.com/ChrisPr1/infra_automation/blob/master/vcenter/create_vm.rb
|
I'm new to rbvmomi, and trying to get the create_vm-1.9.rb script working.
I'm at home now, and will post the exact error output tomorrow (no access to the dev system from home, a blessing really ;) ), but my issue seems to be with the following code, specifically that I get an exception on the rb = hosts.first.resourcePool with an error message that seems to indicate that no resourcePool objects exist. Indeed, if I simply do a 'puts hosts' I get two 'Folder' object types and two ClusterComputeResource object types as the children of the dc.hostFolder managed object.
Assuming that 'resourcePool' in the API maps to configured 'Resource Pools' visible in vcenter I can confirm that I do NOT have any resource pools configured, only clusters. This is on vSphere 5.5 .
I've been digging through the vSphere SDK reference guide, and have been trying to alter the parsing of the dc.hostFolder tree to return me the clusstercomputeresource's instead of resourcePools, but I'm a bit confused.
The text was updated successfully, but these errors were encountered: