diff --git a/app/models/manageiq/providers/vmware/cloud_manager/vm/operations.rb b/app/models/manageiq/providers/vmware/cloud_manager/vm/operations.rb index b49a95db2..5531424a1 100644 --- a/app/models/manageiq/providers/vmware/cloud_manager/vm/operations.rb +++ b/app/models/manageiq/providers/vmware/cloud_manager/vm/operations.rb @@ -6,6 +6,7 @@ module ManageIQ::Providers::Vmware::CloudManager::Vm::Operations included do supports :terminate do + unsupported_reason_add(:terminate, unsupported_reason(:control)) unless supports_control? unsupported_reason_add(:terminate, "The VM is powered on") if vm_powered_on? end end diff --git a/app/models/manageiq/providers/vmware/infra_manager/vm_or_template_shared/operations.rb b/app/models/manageiq/providers/vmware/infra_manager/vm_or_template_shared/operations.rb index 86e84cc35..bd5d5728d 100644 --- a/app/models/manageiq/providers/vmware/infra_manager/vm_or_template_shared/operations.rb +++ b/app/models/manageiq/providers/vmware/infra_manager/vm_or_template_shared/operations.rb @@ -9,6 +9,12 @@ def raw_set_custom_field(attribute, value) run_command_via_parent(:vm_set_custom_field, :attribute => attribute, :value => value) end + included do + supports :terminate do + unsupported_reason_add(:terminate, unsupported_reason(:control)) unless supports_control? + end + end + def raw_clone(name, folder, pool = nil, host = nil, datastore = nil, powerOn = false, template_flag = false, transform = nil, config = nil, customization = nil, disk = nil) folder_mor = folder.ems_ref_obj if folder.respond_to?(:ems_ref_obj) pool_mor = pool.ems_ref_obj if pool.respond_to?(:ems_ref_obj)