When running the command "perl -Ilib/ t/honeyclient_manager_vm.t" as listed in the docs, I got the following error. Doing some digging, I found it was because I wasn't using the expected "/vm" as my virtual machine path. I made the following two changes to etc/honeyclient.xml (the snapshots error came up after I fixed the first):
<datastore_path description="The absolute path to the parent directory, where all HoneyClient VM data is stored on the host server. It is assumed that individual VM data is stored in separate subdirectories within this parent directory." default="/vm">
/home/vms <!-- THIS IS MY PATH FOR VMS -->
</datastore_path>
<!-- TODO: Update this. -->
<snapshot_path description="The absolute path to the directory that contains all snapshot data, associated with every HoneyClient VM." default="/vm/snapshots">
/home/vms/snapshots <!-- THIS IS A DIRECTORY I CREATED -->
</snapshot_path>
I saw the /vm/snapshots bug, but it seems these both could be resolved with a documentation change for folks to edit etc/honeyclient.xml
ok 1 - use Log::Log4perl;
ok 2 - use HoneyClient::Util::Config;
not ok 3 - use HoneyClient::Manager::VM;
# Failed test 'use HoneyClient::Manager::VM;'
# at t/honeyclient_manager_vm.t line 58.
# Tried to use 'HoneyClient::Manager::VM'.
# Error: Error: Current datastore path (/vm) does not exist!
# at (eval 39) line 2
# Compilation failed in require at (eval 39) line 2.
# BEGIN failed--compilation aborted at t/honeyclient_manager_vm.t line 58.
# Can't load HoneyClient::Manager:VM package. Check to make sure the package library is correctly listed within the path.
ok 4 - use HoneyClient::Util::SOAP;
ok 5 - use File::Basename;
ok 6 - use File::Copy::Recursive;
ok 7 - use Data::Dumper;
ok 8 - use File::stat;
ok 9 - use Digest::MD5;
ok 10 - use DateTime::HiRes;
ok 11 - use Fcntl;
ok 12 - use VMware::VmPerl;
ok 13 - use VMware::VmPerl::Server;
ok 14 - use VMware::VmPerl::ConnectParams;
ok 15 - use VMware::VmPerl::VM;
ok 16 - use VMware::VmPerl::Question;
ok 17 - use threads;
ok 18 - use threads::shared;
ok 19 - use Thread::Queue;
ok 20 - use Thread::Semaphore;
# Note: These unit tests *expect* the VMware Server / GSX daemon to be operational on this system beforehand.
ok 21 - require Log::Log4perl;
ok 22 - require HoneyClient::Util::Config;
ok 23 - HoneyClient::Util::Config->can('getVar')
ok 24 - require HoneyClient::Manager::VM;
ok 25 - HoneyClient::Manager::VM->can('init')
ok 26 - HoneyClient::Manager::VM->can('destroy')
ok 27 - require HoneyClient::Util::SOAP;
ok 28 - HoneyClient::Util::SOAP->can('getServerHandle')
ok 29 - HoneyClient::Util::SOAP->can('getClientHandle')
ok 30 - require File::Basename;
ok 31 - File::Basename->can('dirname')
ok 32 - File::Basename->can('basename')
ok 33 - require File::Copy::Recursive;
ok 34 - File::Copy::Recursive->can('dircopy')
ok 35 - File::Copy::Recursive->can('pathrmdir')
ok 36 - require Data::Dumper;
ok 37 - require File::stat;
ok 38 - require Digest::MD5;
ok 39 - Digest::MD5->can('md5_hex')
ok 40 - require DateTime::HiRes;
ok 41 - require Fcntl;
ok 42 - require VMware::VmPerl;
ok 43 - require VMware::VmPerl::Server;
ok 44 - require VMware::VmPerl::ConnectParams;
ok 45 - require VMware::VmPerl::VM;
ok 46 - require VMware::VmPerl::Question;
ok 47 - require threads;
ok 48 - require threads::shared;
ok 49 - require Thread::Queue;
ok 50 - require Thread::Semaphore;
Can't call method "dequeue_nb" on an undefined value at lib//HoneyClient/Manager/VM.pm line 875.
END failed--call queue aborted.
1..50
# Looks like you failed 1 test of 50.
# Looks like your test died just after 50.