[Satellite 6] Failed to delete a host in Satellite

Solution Verified - Updated -

Environment

  • Red Hat Satellite 6.x
  • VMWare

Issue

Deleting a content host in Satellite 6 WebUI fails with No error message returned

Resolution

Option 1
Grant the appropriate permissions for a Satellite user following this guide:

What user permissions/roles are required for the VMware vCenter user account to provision from Satellite 6.x?

Option 2
Change the guest settings in Satellite from managed to unmanaged

The following Bugzilla has been created for this issue:

Bug 1551014 - Failed to update a compute vmware (VMware) instance host.example.domain: undefined method `[]' for nil:NilClass

This bug has fixed in Satellite 6.4 with the below errata :
https://access.redhat.com/errata/RHSA-2018:2927

Root Cause

The guest is set as a Managed host in Satellite but Satellite does not have the permissions required to remove a host from your content-host (or VM host env)

A managed host is entirely managed by Satellite. This means Satellite requires permission to remove guests from the VM Content-Host environment

Diagnostic Steps

Check your foreman logs for the following error:

2019-03-13T13:33:12 [W|app|e436c] Failed to destroy a compute compute-resource (VMware) instance client.example.com: NoPermission: Permission to perform this operation was denied.
RbVmomi::Fault: NoPermission: Permission to perform this operation was denied.
/opt/theforeman/tfm/root/usr/share/gems/gems/rbvmomi-1.10.0/lib/rbvmomi/connection.rb:63:in `parse_response'
/opt/theforeman/tfm/root/usr/share/gems/gems/rbvmomi-1.10.0/lib/rbvmomi/connection.rb:92:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/rbvmomi-1.10.0/lib/rbvmomi/basic_types.rb:213:in `_call'
/opt/theforeman/tfm/root/usr/share/gems/gems/rbvmomi-1.10.0/lib/rbvmomi/basic_types.rb:76:in `block (2 levels) in init'
/opt/theforeman/tfm/root/usr/share/gems/gems/fog-vsphere-2.3.0/lib/fog/vsphere/requests/compute/vm_power_off.rb:13:in `vm_power_off'
/opt/theforeman/tfm/root/usr/share/gems/gems/fog-vsphere-2.3.0/lib/fog/vsphere/models/compute/server.rb:106:in `stop'
/opt/theforeman/tfm/root/usr/share/gems/gems/fog-vsphere-2.3.0/lib/fog/vsphere/models/compute/server.rb:125:in `destroy'
/usr/share/foreman/app/models/compute_resources/foreman/model/vmware.rb:473:in `destroy_vm'
... snip ...

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments