I have a DR script that worked perfectly using the alpha tool kit and to be fair it still does!!! so why post this?
well, when I run my script now I get the following warnings however the script still runs ok and I get the expected results.
warning is(are):
Use of uninitialized value in string ne at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm
line 496.
Use of uninitialized value in string eq at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm
line 516.
VMX Path found: [VMS01Local] DRTestLocal/DRTestLocal.vmx
VMX Path found: [VMS01Local] DRTestLocalUUID/DRTestLocalUUID.vmx
Registering VM with VMX path: [VMS01Local] DRTestLocal/DRTestLocal.vmx
Use of uninitialized value in string ne at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm
line 496.
Use of uninitialized value in string eq at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm
line 516.
Use of uninitialized value in string ne at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm
line 496.
Use of uninitialized value in string eq at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm
line 516.
Registering VM with VMX path: [VMS01Local] DRTestLocalUUID/DRTestLocalUUID.vmx
Use of uninitialized value in string ne at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm
line 496.
Use of uninitialized value in string eq at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm
line 516.
Use of uninitialized value in string ne at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm
line 496.
Use of uninitialized value in string eq at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm
line 516.
Use of uninitialized value in string ne at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm
line 496.
Use of uninitialized value in string eq at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm
line 516.
I have started to comment out large sections of the script to try and narrow this down but I am not that advanced with perl debug so really need to know two things:
1. is this a bug in the beta toolkit? why did the alpha version of VI2Runtime.pm not throw this error?
2. if this is not a bug can anyone tell me what is wrong here?
I have always been using "use strict" in both the alpha and beta builds so am struggling here. I did add the following to my script to try and nail this:
use Carp ();
local $SIG{__WARN__} = \&Carp::cluck;
this gave me following additional information:
Use of uninitialized value in string ne at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm
line 496.
at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm line 496
ViewBase::update_view_data('Task=HASH(0x3e38068)') called at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl
/lib/VMware/VIM2Runtime.pm line 570
ViewBase::waitForTask('HostDatastoreBrowser=HASH(0x3e3b0c8)', 'ManagedObjectReference=HASH(0x3d93f70)') called a
t C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm line 1335
HostDatastoreBrowserOperations::SearchDatastoreSubFolders('HostDatastoreBrowser=HASH(0x3e3b0c8)', 'datastorePath
', '[VMS01Local]', 'searchSpec', 'HostDatastoreBrowserSearchSpec=HASH(0x3d942a0)') called at mors.pl line 671
main::getVMXPathsFromDatastore('Datastore=HASH(0x3c97c00)') called at mors.pl line 357
main::registerVMsinDatacenters('Datacenter=HASH(0x3beac14)') called at mors.pl line 209
eval {...} called at mors.pl line 206
Use of uninitialized value in string eq at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm
line 516.
at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm line 516
ViewBase::set_view_data('Task=HASH(0x3e38068)', 'ObjectContent=HASH(0x3a9ecfc)', 'undef') called at C:/Program F
iles/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm line 507
ViewBase::update_view_data('Task=HASH(0x3e38068)') called at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl
/lib/VMware/VIM2Runtime.pm line 570
ViewBase::waitForTask('HostDatastoreBrowser=HASH(0x3e3b0c8)', 'ManagedObjectReference=HASH(0x3d93f70)') called a
t C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm line 1335
HostDatastoreBrowserOperations::SearchDatastoreSubFolders('HostDatastoreBrowser=HASH(0x3e3b0c8)', 'datastorePath
', '[VMS01Local]', 'searchSpec', 'HostDatastoreBrowserSearchSpec=HASH(0x3d942a0)') called at mors.pl line 671
main::getVMXPathsFromDatastore('Datastore=HASH(0x3c97c00)') called at mors.pl line 357
main::registerVMsinDatacenters('Datacenter=HASH(0x3beac14)') called at mors.pl line 209
eval {...} called at mors.pl line 206
VMX Path found: [VMS01Local] DRTestLocal/DRTestLocal.vmx
VMX Path found: [VMS01Local] DRTestLocalUUID/DRTestLocalUUID.vmx
Registering VM with VMX path: [VMS01Local] DRTestLocal/DRTestLocal.vmx
Use of uninitialized value in string ne at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm
line 496.
at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm line 496
ViewBase::update_view_data('Task=HASH(0x3beace0)') called at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl
/lib/VMware/VIM2Runtime.pm line 570
ViewBase::waitForTask('Folder=HASH(0x3d4de64)', 'ManagedObjectReference=HASH(0x3cd9cec)') called at C:/Program F
iles/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm line 1214
FolderOperations::RegisterVM('Folder=HASH(0x3d4de64)', 'path', '[VMS01Local] DRTestLocal/DRTestLocal.vmx', 'asTe
mplate', 'false', 'pool', 'ResourcePool=HASH(0x3bdfe90)') called at mors.pl line 369
main::registerVMsinDatacenters('Datacenter=HASH(0x3beac14)') called at mors.pl line 209
eval {...} called at mors.pl line 206
Use of uninitialized value in string eq at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm
line 516.
at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm line 516
ViewBase::set_view_data('Task=HASH(0x3beace0)', 'ObjectContent=HASH(0x3cd9b6c)', 'undef') called at C:/Program F
iles/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm line 507
ViewBase::update_view_data('Task=HASH(0x3beace0)') called at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl
/lib/VMware/VIM2Runtime.pm line 570
ViewBase::waitForTask('Folder=HASH(0x3d4de64)', 'ManagedObjectReference=HASH(0x3cd9cec)') called at C:/Program F
iles/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm line 1214
FolderOperations::RegisterVM('Folder=HASH(0x3d4de64)', 'path', '[VMS01Local] DRTestLocal/DRTestLocal.vmx', 'asTe
mplate', 'false', 'pool', 'ResourcePool=HASH(0x3bdfe90)') called at mors.pl line 369
main::registerVMsinDatacenters('Datacenter=HASH(0x3beac14)') called at mors.pl line 209
eval {...} called at mors.pl line 206
Use of uninitialized value in string ne at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm
line 496.
at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm line 496
ViewBase::update_view_data('Task=HASH(0x3beace0)') called at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl
/lib/VMware/VIM2Runtime.pm line 570
ViewBase::waitForTask('Folder=HASH(0x3d4de64)', 'ManagedObjectReference=HASH(0x3cd9cec)') called at C:/Program F
iles/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm line 1214
FolderOperations::RegisterVM('Folder=HASH(0x3d4de64)', 'path', '[VMS01Local] DRTestLocal/DRTestLocal.vmx', 'asTe
mplate', 'false', 'pool', 'ResourcePool=HASH(0x3bdfe90)') called at mors.pl line 369
main::registerVMsinDatacenters('Datacenter=HASH(0x3beac14)') called at mors.pl line 209
eval {...} called at mors.pl line 206
Use of uninitialized value in string eq at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm
line 516.
at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm line 516
ViewBase::set_view_data('Task=HASH(0x3beace0)', 'ObjectContent=HASH(0x3a97dc8)', 'undef') called at C:/Program F
iles/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm line 507
ViewBase::update_view_data('Task=HASH(0x3beace0)') called at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl
/lib/VMware/VIM2Runtime.pm line 570
ViewBase::waitForTask('Folder=HASH(0x3d4de64)', 'ManagedObjectReference=HASH(0x3cd9cec)') called at C:/Program F
iles/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm line 1214
FolderOperations::RegisterVM('Folder=HASH(0x3d4de64)', 'path', '[VMS01Local] DRTestLocal/DRTestLocal.vmx', 'asTe
mplate', 'false', 'pool', 'ResourcePool=HASH(0x3bdfe90)') called at mors.pl line 369
main::registerVMsinDatacenters('Datacenter=HASH(0x3beac14)') called at mors.pl line 209
eval {...} called at mors.pl line 206
best regards,
smoggy
well, when I run my script now I get the following warnings however the script still runs ok and I get the expected results.
warning is(are):
Use of uninitialized value in string ne at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm
line 496.
Use of uninitialized value in string eq at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm
line 516.
VMX Path found: [VMS01Local] DRTestLocal/DRTestLocal.vmx
VMX Path found: [VMS01Local] DRTestLocalUUID/DRTestLocalUUID.vmx
Registering VM with VMX path: [VMS01Local] DRTestLocal/DRTestLocal.vmx
Use of uninitialized value in string ne at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm
line 496.
Use of uninitialized value in string eq at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm
line 516.
Use of uninitialized value in string ne at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm
line 496.
Use of uninitialized value in string eq at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm
line 516.
Registering VM with VMX path: [VMS01Local] DRTestLocalUUID/DRTestLocalUUID.vmx
Use of uninitialized value in string ne at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm
line 496.
Use of uninitialized value in string eq at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm
line 516.
Use of uninitialized value in string ne at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm
line 496.
Use of uninitialized value in string eq at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm
line 516.
Use of uninitialized value in string ne at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm
line 496.
Use of uninitialized value in string eq at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm
line 516.
I have started to comment out large sections of the script to try and narrow this down but I am not that advanced with perl debug so really need to know two things:
1. is this a bug in the beta toolkit? why did the alpha version of VI2Runtime.pm not throw this error?
2. if this is not a bug can anyone tell me what is wrong here?
I have always been using "use strict" in both the alpha and beta builds so am struggling here. I did add the following to my script to try and nail this:
use Carp ();
local $SIG{__WARN__} = \&Carp::cluck;
this gave me following additional information:
Use of uninitialized value in string ne at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm
line 496.
at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm line 496
ViewBase::update_view_data('Task=HASH(0x3e38068)') called at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl
/lib/VMware/VIM2Runtime.pm line 570
ViewBase::waitForTask('HostDatastoreBrowser=HASH(0x3e3b0c8)', 'ManagedObjectReference=HASH(0x3d93f70)') called a
t C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm line 1335
HostDatastoreBrowserOperations::SearchDatastoreSubFolders('HostDatastoreBrowser=HASH(0x3e3b0c8)', 'datastorePath
', '[VMS01Local]', 'searchSpec', 'HostDatastoreBrowserSearchSpec=HASH(0x3d942a0)') called at mors.pl line 671
main::getVMXPathsFromDatastore('Datastore=HASH(0x3c97c00)') called at mors.pl line 357
main::registerVMsinDatacenters('Datacenter=HASH(0x3beac14)') called at mors.pl line 209
eval {...} called at mors.pl line 206
Use of uninitialized value in string eq at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm
line 516.
at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm line 516
ViewBase::set_view_data('Task=HASH(0x3e38068)', 'ObjectContent=HASH(0x3a9ecfc)', 'undef') called at C:/Program F
iles/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm line 507
ViewBase::update_view_data('Task=HASH(0x3e38068)') called at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl
/lib/VMware/VIM2Runtime.pm line 570
ViewBase::waitForTask('HostDatastoreBrowser=HASH(0x3e3b0c8)', 'ManagedObjectReference=HASH(0x3d93f70)') called a
t C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm line 1335
HostDatastoreBrowserOperations::SearchDatastoreSubFolders('HostDatastoreBrowser=HASH(0x3e3b0c8)', 'datastorePath
', '[VMS01Local]', 'searchSpec', 'HostDatastoreBrowserSearchSpec=HASH(0x3d942a0)') called at mors.pl line 671
main::getVMXPathsFromDatastore('Datastore=HASH(0x3c97c00)') called at mors.pl line 357
main::registerVMsinDatacenters('Datacenter=HASH(0x3beac14)') called at mors.pl line 209
eval {...} called at mors.pl line 206
VMX Path found: [VMS01Local] DRTestLocal/DRTestLocal.vmx
VMX Path found: [VMS01Local] DRTestLocalUUID/DRTestLocalUUID.vmx
Registering VM with VMX path: [VMS01Local] DRTestLocal/DRTestLocal.vmx
Use of uninitialized value in string ne at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm
line 496.
at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm line 496
ViewBase::update_view_data('Task=HASH(0x3beace0)') called at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl
/lib/VMware/VIM2Runtime.pm line 570
ViewBase::waitForTask('Folder=HASH(0x3d4de64)', 'ManagedObjectReference=HASH(0x3cd9cec)') called at C:/Program F
iles/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm line 1214
FolderOperations::RegisterVM('Folder=HASH(0x3d4de64)', 'path', '[VMS01Local] DRTestLocal/DRTestLocal.vmx', 'asTe
mplate', 'false', 'pool', 'ResourcePool=HASH(0x3bdfe90)') called at mors.pl line 369
main::registerVMsinDatacenters('Datacenter=HASH(0x3beac14)') called at mors.pl line 209
eval {...} called at mors.pl line 206
Use of uninitialized value in string eq at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm
line 516.
at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm line 516
ViewBase::set_view_data('Task=HASH(0x3beace0)', 'ObjectContent=HASH(0x3cd9b6c)', 'undef') called at C:/Program F
iles/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm line 507
ViewBase::update_view_data('Task=HASH(0x3beace0)') called at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl
/lib/VMware/VIM2Runtime.pm line 570
ViewBase::waitForTask('Folder=HASH(0x3d4de64)', 'ManagedObjectReference=HASH(0x3cd9cec)') called at C:/Program F
iles/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm line 1214
FolderOperations::RegisterVM('Folder=HASH(0x3d4de64)', 'path', '[VMS01Local] DRTestLocal/DRTestLocal.vmx', 'asTe
mplate', 'false', 'pool', 'ResourcePool=HASH(0x3bdfe90)') called at mors.pl line 369
main::registerVMsinDatacenters('Datacenter=HASH(0x3beac14)') called at mors.pl line 209
eval {...} called at mors.pl line 206
Use of uninitialized value in string ne at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm
line 496.
at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm line 496
ViewBase::update_view_data('Task=HASH(0x3beace0)') called at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl
/lib/VMware/VIM2Runtime.pm line 570
ViewBase::waitForTask('Folder=HASH(0x3d4de64)', 'ManagedObjectReference=HASH(0x3cd9cec)') called at C:/Program F
iles/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm line 1214
FolderOperations::RegisterVM('Folder=HASH(0x3d4de64)', 'path', '[VMS01Local] DRTestLocal/DRTestLocal.vmx', 'asTe
mplate', 'false', 'pool', 'ResourcePool=HASH(0x3bdfe90)') called at mors.pl line 369
main::registerVMsinDatacenters('Datacenter=HASH(0x3beac14)') called at mors.pl line 209
eval {...} called at mors.pl line 206
Use of uninitialized value in string eq at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm
line 516.
at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm line 516
ViewBase::set_view_data('Task=HASH(0x3beace0)', 'ObjectContent=HASH(0x3a97dc8)', 'undef') called at C:/Program F
iles/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm line 507
ViewBase::update_view_data('Task=HASH(0x3beace0)') called at C:/Program Files/VMware/VMware VI Perl Toolkit/Perl
/lib/VMware/VIM2Runtime.pm line 570
ViewBase::waitForTask('Folder=HASH(0x3d4de64)', 'ManagedObjectReference=HASH(0x3cd9cec)') called at C:/Program F
iles/VMware/VMware VI Perl Toolkit/Perl/lib/VMware/VIM2Runtime.pm line 1214
FolderOperations::RegisterVM('Folder=HASH(0x3d4de64)', 'path', '[VMS01Local] DRTestLocal/DRTestLocal.vmx', 'asTe
mplate', 'false', 'pool', 'ResourcePool=HASH(0x3bdfe90)') called at mors.pl line 369
main::registerVMsinDatacenters('Datacenter=HASH(0x3beac14)') called at mors.pl line 209
eval {...} called at mors.pl line 206
best regards,
smoggy