From fba1f73f40b572a82749a7d4cec6307e3665617c Mon Sep 17 00:00:00 2001 From: "kirby@puppetlabs.com" Date: Tue, 18 Oct 2016 14:43:03 -0700 Subject: [PATCH] Match on identical architectures --- lib/vmpooler/vsphere_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/vmpooler/vsphere_helper.rb b/lib/vmpooler/vsphere_helper.rb index 9e95b7603..e72bba5fa 100644 --- a/lib/vmpooler/vsphere_helper.rb +++ b/lib/vmpooler/vsphere_helper.rb @@ -197,7 +197,7 @@ def find_folder(foldername) end def get_host_utilization(host, model=nil, limit=90) - if model and not host.hardware.cpuPkg[0].description == model + if model and not host.hardware.cpuPkg[0].description.split().include? model return nil end if not host.runtime.inMaintenanceMode @@ -244,7 +244,7 @@ def find_least_used_compatible_host(vm) end source_host = vm.summary.runtime.host - model = source_host.hardware.cpuPkg[0].description + model = source_host.hardware.cpuPkg[0].description.split()[4] cluster = source_host.parent target_hosts = [] cluster.host.each do |host|