diff --git a/lib/plugins/stonith/external/vcenter b/lib/plugins/stonith/external/vcenter index 0a26fdd4..273e131a 100755 --- a/lib/plugins/stonith/external/vcenter +++ b/lib/plugins/stonith/external/vcenter @@ -171,7 +171,7 @@ elsif (grep /^\Q$command\E$/, @netCommands) { eval { # VI API: searches the inventory tree for a VirtualMachine managed entity whose name matches # the name of the virtual machine assigned to the target host in HOSTLIST - $vm = Vim::find_entity_view(view_type => "VirtualMachine", filter => { name => qr/^\Q$host_to_vm{$targetHost}\E/i }); + $vm = Vim::find_entity_view(view_type => "VirtualMachine", filter => { name => qr/\A\Q$host_to_vm{$targetHost}\E\z/i }); if (!defined $vm) { dielog("Machine $targetHost was not found"); }