Hello,
I would like to create a temporary directory in the vm by using the inbuilt vCenter (version : 6.0.2 ) plug-in library workflow "Create temporary directory in guest" in vRO 7.0.
But during execution of this Workflow, I received the error message “Guest Operation Agent Couldn’t be Contacted”. As the error it seems that there is some issue with vmtools in that vm.S
Can you please help me out how to resolve this issue ? Thanks for your help.
Thanks,
Koushik
oh, that points towards you still having double \\ backslash in the string that is send to vmware tools.
So just try to replace with a forward slash / , it should even work on windows. Or play around with the different escaping strategies in javascript (or wherever the string containing the path name originates from.)… yes, might be some trial and error 😉
Joerg
Hi,
This error could happen if the user you are using is not connected to the machine and hence there is no open session.
Try adding the following line on line 7 in the workflow (after setting username/password properties on guestAuth object)
guestAuth.interactiveSession = false;
Hello Illian,
Thanks for your suggestion. I have already tried with this one. And now I am getting an error "A specified parameter was not correct".
Below is the code. It seems that the error happened during calling the "createTemporaryDirectoryInGuest" function. (marked in red colour).
I am not sure why this error happened. Can you please help me out ?
Thanks,
koushik
Could you provide the full error message log + values of the input parameters?
hello,
Please find attached the input parameters and error log.
Thanks,
Koushik
Hmm, I'm out of ideas why it doesn't work. The parameters seem correct. I tried the same workflow in my environment and it worked as expected.
I'd suggest to check vCenter logs for more information (eg. which parameter is not correct).
Dear,
Thanks, Can you please provide me the name of the vCenter logs/ which logs I need to check ?
Thanks,
Koushik
Hello,
I captured the log from hostd.log file and found the error there also. Below are the traces.
But I am not much sure about the error. Can you please check and help me out.
Thanks,
Koushik
2016-04-12T09:21:21.193Z info hostd[2F640B70] [Originator@6876 sub=Vimsvc.ha-eventmgr] Event 814 : Guest operation Create Temporary Directory performed on Virtual machine vRA-IT073.
2016-04-12T09:21:21.194Z info hostd[2F640B70] [Originator@6876 sub=Vmsvc.vm:/vmfs/volumes/554a661c-513d79ed-95e9-b282fa200008/vRA-IT073/vRA-IT073.vmx] State Transition (VM_STATE_GUEST_OPERATION -> VM_STATE_ON)
2016-04-12T09:21:21.194Z info hostd[2F4C2B70] [Originator@6876 sub=Guestsvc.GuestFileTransferImpl] Entered VmPowerStateListener
2016-04-12T09:21:21.194Z info hostd[2F4C2B70] [Originator@6876 sub=Guestsvc.GuestFileTransferImpl] VmPowerStateListener succeeded
2016-04-12T09:21:21.194Z info hostd[2F4C2B70] [Originator@6876 sub=Hbrsvc] Replicator: powerstate change VM: 14 Old: 1 New: 1
2016-04-12T09:21:21.194Z info hostd[2F640B70] [Originator@6876 sub=Vmsvc.vm:/vmfs/volumes/554a661c-513d79ed-95e9-b282fa200008/vRA-IT073/vRA-IT073.vmx] [N8Guestsvc30CreateTemporaryFileRequestImplE:0x2e8d96f0] opCode=8 auth=<hidden> prefix=p suffix=s directoryPath=C:\\temp failed
2016-04-12T09:21:21.194Z info hostd[2F640B70] [Originator@6876 sub=Solo.Vmomi] Activation [N5Vmomi10ActivationE:0x2e9fdcb8] : Invoke done [createTemporaryDirectory] on [vim.vm.guest.FileManager:ha-guest-operations-file-manager]
2016-04-12T09:21:21.194Z verbose hostd[2F640B70] [Originator@6876 sub=Solo.Vmomi] Arg vm:
--> 'vim.VirtualMachine:14'
2016-04-12T09:21:21.194Z verbose hostd[2F640B70] [Originator@6876 sub=Solo.Vmomi] Arg auth:
--> (vim.vm.guest.NamePasswordAuthentication) {
--> interactiveSession = false,
--> username = ".\administrator",
--> password = (not shown)
--> }
2016-04-12T09:21:21.194Z verbose hostd[2F640B70] [Originator@6876 sub=Solo.Vmomi] Arg prefix:
--> "p"
2016-04-12T09:21:21.194Z verbose hostd[2F640B70] [Originator@6876 sub=Solo.Vmomi] Arg suffix:
--> "s"
2016-04-12T09:21:21.194Z verbose hostd[2F640B70] [Originator@6876 sub=Solo.Vmomi] Arg directoryPath:
--> "C:\\temp"
2016-04-12T09:21:21.194Z info hostd[2F640B70] [Originator@6876 sub=Solo.Vmomi] Throw vmodl.fault.InvalidArgument
2016-04-12T09:21:21.194Z info hostd[2F640B70] [Originator@6876 sub=Solo.Vmomi] Result:
--> (vmodl.fault.InvalidArgument) {
--> faultCause = (vmodl.MethodFault) null,
--> invalidProperty = <unset>,
--> msg = ""
--> }
2016-04-12T09:21:21.512Z info hostd[2FB40B70] [Originator@6876 sub=Hostsvc] VsanSystemVmkProvider : StorageHotPlugListener: VSAN service not configured to automatically claim storage: ignoring storage event
2016-04-12T09:21:21.512Z info hostd[2FB40B70] [Originator@6876 sub=Hostsvc] VsanSystemVmkProvider : ClaimUnmountedDiskgroup: ClaimUnmountedDiskgroup is already scheduled
Hello Ilian,
Did you get any clue ? Please let me know if you find anything more ?
Thanks,
Koushik
oh, that points towards you still having double \\ backslash in the string that is send to vmware tools.
So just try to replace with a forward slash / , it should even work on windows. Or play around with the different escaping strategies in javascript (or wherever the string containing the path name originates from.)… yes, might be some trial and error 😉
Joerg
Dear,
I tried with all options but still have no luck.
Is this issue related to others like 'storage' linked to vm ?
Thanks,
koushik
can you try to run the logic completely without the vmDir parameter of the createTemporaryDirectoryInGuest() method?
this will create the directory in the default temp directory of the Guest OS (I think that's %TEMP% in windows, /tmp in linux).
So we can rule out problems with the pathname...
tried with blank value in vmdir parameter but still got the same error.
Thanks,
koushik
Hello,
Is there any more clue ? I am having the same issue still now.
Thanks,
Koushik
so what's the exact error message when you try without vmdir parameter?
Did you verify that from an rdp session you can login with the administrator account?
Dear,
I am getting an error "A specified parameter was not correct" even I executed the WF without any value in vmdir parameter.
Thanks,
Koushik
Dear,
Yes, I have verified that it is successfully logged in to the guest machine/vm with administrator account via RDP session.
In case there is an issue with credentials then it will throw un-authentication error. But here is it throwing another error which is very disappointing to me.
Any more clue ?
Thanks,
Koushik
Thanks Everyone. I resolved the issue related to error “A specified parameter was not correct” .
The root cause of this issue was passing the value of the parameter - ‘vmUsername’ in wrong format.
The correct format is : (administrator) not (.\administrator).
Thanks,
Koushik