VMware Cloud Community
ITenGriTR
Contributor
Contributor

About ListProcessesInGuest error

Hello guys,

i am writing api for my vcenter with sdk but i have a problem about ListProcessesInGuest command

https://vdc-repo.vmware.com/vmwb-repository/dcr-public/bd170cdc-e03a-4701-b468-bcfba05da6b2/946a76df...

is interactiveSession == true => The guest operations agent could not be contacted.

is interactiveSession == false => The operation is not supported on the object.

request data:

 array(3) {
 ["_this"]=>
 array(2) {
 ["_"]=>
 string(29) "guestOperationsProcessManager"
 ["type"]=>
 string(19) "GuestProcessManager"
 }
 ["vm"]=>
 array(2) {
 ["_"]=>
 string(6) "vm-212"
 ["type"]=>
 string(14) "VirtualMachine"
 }
 ["auth"]=>
 array(3) {
 ["username"]=>
 string(4) "root"
 ["password"]=>
 string(11) "test"
 ["interactiveSession"]=>
 bool(true)
 }
 }
 

 

so i test invoke-vmscript command in powercli and its working perfectly for this vm what can i do ?

0 Kudos
13 Replies
LucD
Leadership
Leadership

What kind of Guest OS do you have running in that VM?

And InteractiveSession should be set to $false.
Same as I do in my Invoke-VMScriptPlus function.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
ITenGriTR
Contributor
Contributor

centos7

i set to false and response is : The operation is not supported on the object.

i check the vm data and guestOperationsReady is true and guestState is true everything looks good idk why its happening

0 Kudos
LucD
Leadership
Leadership

This is a listed fault for that method.
Can you check the vmware.log if that gives any additional info?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
ITenGriTR
Contributor
Contributor

where is the file

in esxi

in vcenter

in vm ?

0 Kudos
LucD
Leadership
Leadership

In the folder where the VM's files are located


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
ITenGriTR
Contributor
Contributor

i tried but nothing changing on log file size

0 Kudos
LucD
Leadership
Leadership

Perhaps you have to enable debugging.
See KB1007873


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
ITenGriTR
Contributor
Contributor

i checked 3 times logging enabled not about guest process

[2021-11-26T18:00:29.226Z] [   debug] [vmtoolsd] Setting option 'broadcastIP' to '1'.
[2021-11-26T18:00:59.251Z] [   debug] [vmtoolsd] Setting option 'broadcastIP' to '1'.
[2021-11-26T18:01:29.180Z] [   debug] [vmtoolsd] Setting option 'broadcastIP' to '1'.
[2021-11-26T18:01:59.228Z] [   debug] [vmtoolsd] Setting option 'broadcastIP' to '1'.
0 Kudos
LucD
Leadership
Leadership

Strange, and you say that INvoke-VMScript works?
You could try my Invoke-VMScriptPlus with the Verbose switch, that provides more info.
And you can check if that shows up in the vmware.log


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
ITenGriTR
Contributor
Contributor

yes INvoke-VMScript its working

but sdk api is giving error its my code on php

                $mess= [];
                $mess["_this"] = (array)$guestOperations[4]->val; // this line correct
                $mess["vm"] = [
                    "_" => $vmid,
                    "type" => "VirtualMachine"
                ];
                $mess["auth"] = [
                    "username" => "root",
                    "password" => "test",
                    "interactiveSession" => false
                ];
                return $this->client->ListProcessesInGuest($mess);
 
 
0 Kudos
LucD
Leadership
Leadership

Sorry, I don't know anything about PHP


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
ITenGriTR
Contributor
Contributor

which reasons are giving this error if you tell me i can check them

0 Kudos
ITenGriTR
Contributor
Contributor

its log about this function

 

2021-12-08T12:40:03.092Z info vpxa[2827388] [Originator@6876 sub=vpxLro opID=2945e1db-f1] [VpxLRO] -- BEGIN lro-206 -- guestOperationsProcessManager -- vim.vm.guest.ProcessManager.listProcesses -- 520ee7f8-86df-a7fc-7f16-33df53fed4a9
2021-12-08T12:40:03.107Z error vpxa[2827388] [Originator@6876 sub=vpxaVmomi opID=2945e1db-f1] [VpxaClientAdapter::InvokeCommon] Re-throwing method-fault 'N5Vmomi5Fault12NotSupported9ExceptionE(Fault cause: vmodl.fault.NotSupported
--> )
--> [context]something deleted[/context]' received while invoking listProcesses on vim.vm.guest.ProcessManager:ha-guest-operations-process-manager
2021-12-08T12:40:03.113Z info vpxa[2827388] [Originator@6876 sub=vpxLro opID=2945e1db-f1] [VpxLRO] -- FINISH lro-206
2021-12-08T12:40:03.113Z info vpxa[2827388] [Originator@6876 sub=Default opID=2945e1db-f1] [VpxLRO] -- ERROR lro-206 -- guestOperationsProcessManager -- vim.vm.guest.ProcessManager.listProcessesvmodl.fault.NotSupported:
--> Result:
--> (vmodl.fault.NotSupported) {
-->    faultCause = (vmodl.MethodFaultnull,
-->    faultMessage = <unset>
-->    msg = "Received SOAP response fault from [<cs p:00000060e45746b0, TCP:localhost:8307>]: listProcesses
--> The operation is not supported on the object."
--> }
--> Args:
-->
--> Arg vm:
--> 'vim.VirtualMachine:124'
--> Arg auth:
--> (vim.vm.guest.GuestAuthentication) {
-->    interactiveSession = false
--> }
--> Arg pids:
--> (long) []
0 Kudos