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

Getting following error while connecting to Guest OS: Client received SOAP Fault from server: Permission to perform this operation was denied. Please see the server log to find more detail regarding exact cause of the failure #77

Open
1 of 3 tasks
LakshmanPatil opened this issue Aug 22, 2019 · 1 comment
Assignees

Comments

@LakshmanPatil
Copy link

LakshmanPatil commented Aug 22, 2019

  • I am using the latest SDK version
  • This API is compatible with my vCenter version (You can get this info from the API documentation )
  • I have searched existing issues

Description

Environment

  • SDK version:
    6.7.0

  • Java version:
    1.8

  • vSphere version:
    6.7.0

Steps or code snippet to reproduce

String[] opts = new String[]{"guest.guestOperationsReady"};
String[] opt = new String[]{"guest.guestOperationsReady"};
wV.wait(ob, opts, opt,new Object[][]{{true}});
Map<String, ManagedObjectReference> var1 = VimUtil.inFolderByType(vimPort,serviceContent,serviceContent.getRootFolder(), "VirtualMachine");
ManagedObjectReference var2 = (ManagedObjectReference)var1.get(vmName);
if (var2 != null) {
System.out.println("Virtual Machine " + vmName + " found");
System.out.println("Guest Operations are ready for the VM");
ManagedObjectReference guestOpManger =
serviceContent.getGuestOperationsManager();
ManagedObjectReference fileManagerRef =
(ManagedObjectReference) VimUtil.entityProps(vimPort,serviceContent,guestOpManger,
new String[]{"fileManager"}).get("fileManager");
System.out.println(fileManagerRef);
System.out.println(fileManagerRef.getType());
System.out.println(fileManagerRef.getValue());
NamePasswordAuthentication auth = new NamePasswordAuthentication();
auth.setUsername("username");
auth.setPassword("password");
auth.setInteractiveSession(false);
vimPort.validateCredentialsInGuest(fileManagerRef, var2, auth);
System.out.println("validation for guest Credentials");
List li=new ArrayList<>();
li.add("open notepad.exe");
System.out.println("Executing CreateTemporaryFile guest operation");
System.out.println("FileInitailization"+vimPort.initiateFileTransferFromGuest(fileManagerRef, var2, auth, "C:\Users\"));
vimPort.createFolder(fileManagerRef, "C:\Users\Public\dsfsfs");
String result =
vimPort.createTemporaryFileInGuest(fileManagerRef, var2, auth,"TestAfter", "BeforeTest", "C:\Users\Public");
System.out.println("Temporary file was successfully created at: "
+ result + " inside the guest");

Actual behavior

Unable to login to Guest OS and not fetching any files

Expected behavior

Login to Guest OS should happen, file directory inside Guest os should be available to perform read and write operation.

Note: I am not sure that the methods i am trying is the correct one. Please help me with correct one. Even I am not able to fetch the ip address of the VM using sdk.

@LakshmanPatil
Copy link
Author

@kunal-pmj Could you please me help on this issue???

@jobingeo jobingeo self-assigned this Oct 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants