Hi,
I'm trying to snapshot some VM's via vcbmounter.exe from a perl script. The first backup works fine, but on the second I got a authentication failure. I use this code in the beginning of the script for authentication (how do code tags work here?):
eval ;
if ($@) {
error
print LOG $@ . "\n";
}
This seems to work, since the first VM gets backup'ed. It takes about 1:15h, since in the first run I got an error about it not being able two write back the backup date to a custom field, I added exactly the same authentication into the loop after the backup. So the login should be valid when the next one starts. However I do get a
SOAP Fault:
-
Fault string: Die Sitzung wurde nicht authentifiziert.
Fault detail: NotAuthenticatedFault
(the first one translates into "session not authenticated")
Before I had added the additional authenication into the loop, I just would get a "Unable to find VM " from this within the loop:
my $vm = Vim::find_entity_view(view_type => 'VirtualMachine',
filter => {"config.name" => $_});
unless ($vm) {
print "Unable to find VM: \"$_\"!\n";
exit 1
}
So it seems the authentication works fine for the first backup, and then times out. But why does the same authentication code from the start of the script not work again? How would I reauthenticate?
I've attached the script if anyone wants to take a look...
Lars