Hi Plam,
Thank you for your input. Indeed, I use a logged in VIM-Session. In the example they use the Java SDK, which allows to get the Session Manager without logging in. In my case I have to use the Perl SDK and there I didn't find a way to get a SessionManager Object without logging in.
What I do now is to use an unprivileged service account to log in at the vCenter, get the SessionManager Object, logout and then use the logged out SessionManager object to clone the session.
my $sessionManager = $vimSession->get_view(mo_ref => $vimSession->get_service_content()->sessionManager);
$sessionManager->Logout();
my $returnSession = $sessionManager->CloneSession(cloneTicket => $cloneTicket);
And this finally works for me. Is it a good solution? I don't know, but it's the only one I found. Does anyone know how to reach this with the Perl SDK without logging in before?
Best regards,
Martin