Ensure hosts aren't in 'maintenance mode' when cloning

This commit is contained in:
Scott Schneider 2014-09-30 14:14:52 -07:00
parent be64be37a9
commit 3a7659f284

View file

@ -65,7 +65,10 @@ module Vmpooler
datacenter.hostFolder.children.each do |folder|
next unless folder.name == cluster
folder.host.each do |host|
if host.overallStatus == 'green'
if (
(host.overallStatus == 'green') and
(! host.runtime.inMaintenanceMode)
)
hosts[host.name] = host
hosts_sort[host.name] = host.vm.length
end