Sorry, but I didn't get it, yet.
At first, I believe that I don't have to skip any VM's in the loop. My custom field is global an all VM's on the cluster have this field. But not all VM's have an value for this field.
natxoasenjo schrieb:
o, and you need to retrieve the 'name' property of the vm as well if you copy paste that
From reading the Documentation I guess I have to do something like:
my $entity_type = Opts::get_option('VirtualMachine');
my $entity_views = Vim::find_entity_views(view_type => $entity_type);
foreach my $entity_view (@$entity_views) {
my $entity_name = $entity_view->name;
}
Could you explain to me how to do this, please?