marck004
Contributor
Contributor

Thanks for the reply, Stumpr.  This makes sense; however, I am still needing some assistance with the proof of concept.

I have this:

my $vm_name = "test_vm_template"

my $vm = Vim::find_entity_view(view_type => 'VirtualMachine', filter => {'name' => $vm_name});

print "vm name = " . $vm->name . "\n";

$pool_moref = $vm->{'resourcePool'};

$pool = Vim::get_view(mo_ref => $pool_moref);

print "resource name = " . $pool->name . "\n";

The 1st print statement is showing me the vm name but the 2nd is returning an error of (can't call method "type" on an undefined value).

It appears I am attempting to access the resource pool incorrectly. 

Reply
0 Kudos