vmware-archive / rvc

RVC is a Linux console UI for vSphere, built on the RbVmomi bindings to the vSphere API.
MIT License
240 stars 48 forks source link

no examples in help #53

Open pkirklewski opened 12 years ago

pkirklewski commented 12 years ago

Hi there, Could you please add some examples of the commands under the HELP command ? I am trying to create a resourcepool with no lick whatsoever, there is no info on the web on how to sort it out + there is no eamples of the commands when I query the RVC. What is 'parent' - I don't want to create a sub-pool so why do I need to give the name of the parent ? Please help.

Attempt1: xyz.com/Dev/datastores/upgr> resource_pool.create test-rpool missing argument 'parent' Attempt2: xyz.com/Dev/datastores/upgr>resource_pool.create test-rpool /xyz.com/Dev/datastores/upgr/DT1/ Expected ResourcePool but got Datastore at "/xyz.com/Dev/datastores/upgr/DT1/"

Attempt3: /xyz.com> resource_pool.create test-rpool /xyz.com/Development/datastores/upgr/DT1/Resources

no matches for "/xyz.com/Development/datastores/upgr/DT1/Resources"

codemonkeyjohn commented 12 years ago

If you're just looking for any resource pool to use, try /xyz.com/Development/computers/<hostname>/resourcePool

If you still want to create one, use that path as the parent of your resource pool. You should only need to create one if you want to limit the CPU or memory resources.

The documentation states "Each standalone host and each DRS cluster has an (invisible) root resource pool that groups the resources of that host or cluster." If you need more information, take a look at http://pubs.vmware.com/vsphere-50/topic/com.vmware.vsphere.resmgmt.doc_50/GUID-60077B40-66FF-4625-934A-641703ED7601.html.

pkirklewski commented 12 years ago

/MyVsphere> resource_pool.create Pool10test /MyVsphere/Development/computers/MyCluster/resourcePool/

InvalidArgument: A specified parameter was not correct.

/MyVsphere> resource_pool.create Pool10test /MyVsphere/Development/computers/MyCluster/resourcePool/pools/

Expected ResourcePool but got RVC::FakeFolder at "/MyVsphere/Development/computers/MyCluster/resourcePool/pools/"

I'am still having problem creating the resource_pool. What am I dooing wrong please ?

pkirklewski commented 12 years ago

I have just discovered something peculiar. The above problem only occurs while in v Sphere environment. The command works perfectly fine in my SINGLE ESXi setup:

/10.10.10.100/ha-datacenter/vm> resource_pool.create pool17 /10.10.10.100/ha-datacenter/computers/ESXi.LIPOWA/resourcePool/

No errors and the resoruce_pool gets created in a split of a second.

Why would this command not work in VSphere ?

cdickmann commented 12 years ago

If the error doesn't have enough info, do "debug" before issuing the command and then paste the raw SOAP. Also did you activate DRS (at least in manual mode)? Otherwise resource pools are deactivated.

pkirklewski commented 12 years ago
  1. DRS is ON in this DC
  2. in ESXi: type="ResourcePool">ha-root-pool< in vSphere: type="ResourcePool">resgroup-86<

/MyVsphere> debug debug mode enabled /MyVsphere> resource_pool.create pooltest10 /MyVsphere/Development/computers/MyCluster/resourcePool/ Request:

env:Body<_this type="PropertyCollector">propertyCollectorManagedEntitynamegroup-d11FolderchildEntity/env:Body/env:Envelope Response (in 0.004 s) soapenv:Body datacenter-12517nameMyDC001datacenter-2nameDevelopmentdatacenter-9802name /soapenv:Body /soapenv:Envelope Request: env:Body<_this type="PropertyCollector">propertyCollectorDatacentervmFolderdatastoreFoldernetworkFolderhostFolderdatacenter-2/env:Body/env:Envelope Response (in 0.003 s) soapenv:Body datacenter-2datastoreFoldergroup-s7533hostFoldergroup-h4networkFoldergroup-n7535vmFoldergroup-v3 /soapenv:Body /soapenv:Envelope Request: env:Body<_this type="SearchIndex">SearchIndexgroup-h4MyCluster/env:Body/env:Envelope Response (in 0.008 s) soapenv:Body domain-c84 /soapenv:Body /soapenv:Envelope Request: env:Body<_this type="PropertyCollector">propertyCollectorClusterComputeResourcehostresourcePooldomain-c84/env:Body/env:Envelope Response (in 0.006 s) soapenv:Body domain-c84hosthost-5118host-5265host-5455host-5805host-6180host-8100resourcePoolresgroup-86 /soapenv:Body /soapenv:Envelope Request: env:Body<_this type="ResourcePool">resgroup-86pooltest1000normal00normal/env:Body/env:Envelope Response (in 0.013 s) soapenv:Body soapenv:FaultServerFaultCodeA specified parameter was not correct. /soapenv:Fault /soapenv:Body /soapenv:Envelope RbVmomi::Fault: InvalidArgument: A specified parameter was not correct. /var/lib/gems/1.8/gems/rbvmomi-1.5.1/lib/rbvmomi/connection.rb:61:in `parse_response' /var/lib/gems/1.8/gems/rbvmomi-1.5.1/lib/rbvmomi/connection.rb:90:in`call' /var/lib/gems/1.8/gems/rbvmomi-1.5.1/lib/rbvmomi/basic_types.rb:203:in `_call' /var/lib/gems/1.8/gems/rbvmomi-1.5.1/lib/rbvmomi/basic_types.rb:74:in`CreateResourcePool' /var/lib/gems/1.8/gems/rvc-1.6.0/lib/rvc/modules/resource_pool.rb:61:in `create' /var/lib/gems/1.8/gems/rvc-1.6.0/lib/rvc/shell.rb:107:in`send' /var/lib/gems/1.8/gems/rvc-1.6.0/lib/rvc/shell.rb:107:in `eval_command' /var/lib/gems/1.8/gems/rvc-1.6.0/lib/rvc/shell.rb:57:in`eval_input' /var/lib/gems/1.8/gems/rvc-1.6.0/bin/rvc:184 /usr/local/bin/rvc:19:in `load' /usr/local/bin/rvc:19
cdickmann commented 12 years ago

OK here is what you do: a) You use the UI and make sure it allows you to create resource pools b) You check the vpxd.log (vCenter logs) to get the full error message c) If it doesn't have enough data, change VC logging to trivia, rerun your experiment, grab the logs and change logging back to whatever it was before.

pkirklewski commented 12 years ago
  1. I'm having no issues creating the resource pool from the vSphere Client
  2. When I am trying the same from rvc I can see the error in the vSphere Client windows wwith info that the command was initiated by MYDOMAIN\MYUSER
  3. Here is a small portion of the log - the most interestig one: If you need me to copy more lines please let me know.

17352 2012-08-21T08:35:12.363+02:00 [02148 verbose 'QsAdapter.HTTPService'] User agent is 'VMware vim-java 1.0'^M 17353 2012-08-21T08:35:12.363+02:00 [02148 verbose 'QsAdapter.HTTPService'] HTTP Response: Complete (processed 3896 bytes)^M 17354 2012-08-21T08:35:12.363+02:00 [03988 info 'Default' opID=8bed6eed] [VpxLRO] -- BEGIN task-39639 -- resgroup-86 -- vim.ResourcePool.createResourcePool -- 52205233 -d1c5-2f87-85dc-72eeeaff6d59(529925d5-8be2-6840-4ced-e6bce89b4728)^M 17355 2012-08-21T08:35:12.363+02:00 [03988 error 'Default' opID=8bed6eed](Log recursion level 2) vmodl.fault.InvalidArgument^M 17356 17357 ------ In-memory logs end -------- 17358 2012-08-21T08:35:12.363+02:00 [03988 error 'Default' opID=8bed6eed] Section for VMware VirtualCenter, pid=3164, version=5.0.0, build=build-755629, option=Release 17359 --> ^M 17360 2012-08-21T08:35:12.363+02:00 [03988 info 'Default' opID=8bed6eed] [VpxLRO] -- FINISH task-39639 -- resgroup-86 -- vim.ResourcePool.createResourcePool -- 5220523 3-d1c5-2f87-85dc-72eeeaff6d59(529925d5-8be2-6840-4ced-e6bce89b4728)^M 17361 2012-08-21T08:35:12.363+02:00 [03988 info 'Default' opID=8bed6eed] [VpxLRO] -- ERROR task-39639 -- resgroup-86 -- vim.ResourcePool.createResourcePool: vmodl.faul t.InvalidArgument: 17362 --> Result: 17363 --> (vmodl.fault.InvalidArgument) { 17364 --> dynamicType = , 17365 --> faultCause = (vmodl.MethodFault) null, 17366 --> invalidProperty = , 17367 --> msg = "", 17368 --> } 17369 --> Args: 17370 --> 17371 --> Arg name: 17372 --> "pooltest10" 17373 --> Arg spec: 17374 --> (vim.ResourceConfigSpec) { 17375 --> dynamicType = , 17376 --> entity = , 17377 --> changeVersion = , 17378 --> lastModified = , 17379 --> cpuAllocation = (vim.ResourceAllocationInfo) { 17380 --> dynamicType = , 17381 --> reservation = , 17382 --> expandableReservation = false, 17383 --> limit = , 17384 --> shares = (vim.SharesInfo) { 17385 --> dynamicType = , 17386 --> shares = 0, 17387 --> level = "normal", 17388 --> }, 17389 --> overheadLimit = , 17390 --> }, 17391 --> memoryAllocation = (vim.ResourceAllocationInfo) { 17392 --> dynamicType = , 17393 --> reservation = , 17394 --> expandableReservation = false, 17395 --> limit = , 17396 --> shares = (vim.SharesInfo) { 17397 --> dynamicType = , 17398 --> shares = 0, 17399 --> level = "normal", 17400 --> }, 17401 --> overheadLimit = , 17402 --> }, 17403 --> }^M 17404 2012-08-21T08:35:12.363+02:00 [03012 info 'Default' opID=HB-host-5118@160268-95030db] [VpxdInvtHost::SaveFieldsToDb] IPMI info of host esx04.mydomain.com is n ot set^M 17405 2012-08-21T08:35:12.378+02:00 [03012 info 'Default' opID=HB-host-5118@160268-95030db] [VpxdHostSync] Completed host synchronization for host-5118^M 17406 2012-08-21T08:35:12.378+02:00 [03012 info 'Default' opID=HB-host-5118@160268-95030db] [VpxLRO] -- FINISH task-internal-538398 -- host-5118 -- VpxdInvtHostSyncHos tLRO.Synchronize -- ^M 17407 2012-08-21T08:35:15.034+02:00 [01036 info 'Default' opID=HB-host-5805@125258-1ca3699a] [VpxLRO] -- BEGIN task-internal-538403 -- host-5805 -- VpxdInvtHostSyncHos tLRO.Synchronize -- ^M 17408 2012-08-21T08:35:15.081+02:00 [01036 info 'Default' opID=HB-host-5805@125258-1ca3699a] [VpxdHostSync] Synchronizing host: host-5805 (esx01.mydomain.com, 10.145.50.70)^M 17409 2012-08-21T08:35:15.112+02:00 [01036 info 'Default' opID=HB-host-5805@125258-1ca3699a] [ClientAdapterBase] InvokeOnSoap leaving^M 17410 2012-08-21T08:35:15.112+02:00 [01036 info 'Default' opID=HB-host-5805@125258-1ca3699a] [ClientAdapterBase] InvokeOnSoap leaving^M 17411 2012-08-21T08:35:15.112+02:00 [02936 info 'Default'] [ClientAdapterBase] InvokeOnSoap leaving^M 17412 2012-08-21T08:35:15.253+02:00 [02936 info 'Default'] [ClientAdapterBase] InvokeOnSoap leaving^M 17413 2012-08-21T08:35:15.253+02:00 [01036 info 'Default' opID=HB-host-5805@125258-1ca3699a] [ClientAdapterBase] InvokeOnSoap leaving^M 17414 2012-08-21T08:35:15.269+02:00 [01036 info 'Default' opID=HB-host-5805@125258-1ca3699a] [ClientAdapterBase] InvokeOnSoap leaving^M 17415 2012-08-21T08:35:15.269+02:00 [01036 info 'Default' opID=HB-host-5805@125258-1ca3699a] [VpxdHostSync] Retrieved host update to 125258 for host-5805^M 17416 2012-08-21T08:35:15.456+02:00 [01036 info 'Default' opID=HB-host-5805@125258-1ca3699a] [VpxdInvtHost::SaveFieldsToDb] IPMI info of host esx01.mydomain.com is not set^M 17417 2012-08-21T08:35:15.503+02:00 [01036 info 'Default' opID=HB-host-5805@125258-1ca3699a] [VpxdHostSync] Completed host synchronization for host-5805^M 17418 2012-08-21T08:35:15.503+02:00 [01036 info 'Default' opID=HB-host-5805@125258-1ca3699a] [VpxLRO] -- FINISH task-internal-538403 -- host-5805 -- VpxdInvtHostSyncHo stLRO.Synchronize -- ^M 17419 2012-08-21T08:35:18.284+02:00 [02240 info 'Default' opID=HB-host-5265@180139-cecb503e] [VpxLRO] -- BEGIN task-internal-538404 -- host-5265 -- VpxdInvtHostSyncHos tLRO.Synchronize -- ^M

cdickmann commented 12 years ago

OK, I was able to reproduce the issue. The issue stems from some fields not being optional it seems. From the looks of it, limits and reservations are mandatory. Now, one further issue is that RVC doesn't allow negative numbers, but no limit is expressed as -1. I will put together a fix.

cunnie commented 10 years ago

Thanks @cdickmann & @pkirklewski: I was able to create a resource pool. Apparently 2^64 - 1 is equivalent to "unlimited":

resource_pool.create duck_pool /vcentercf.nono.com/private/computers/private/resourcePool/ --cpu-reservation 0 --cpu-limit 18446744073709551615 --cpu-expandable --mem-limit 18446744073709551615 --mem-reservation 0 --mem-expandable