How to delete hosts from Red Hat Satellite 6 WebUI, without actually deleting it from a compute resource?
Environment
- Red Hat Satellite 6
- Red Hat Virtualization (RHV)
- VMware vSphere
Issue
- How to delete hosts from Red Hat Satellite 6 WebUI, without actually deleting it from a compute resource?
- When removing system profile from webUI, provisioned systems from Red Hat Satellite 6 onto Compute Resource gets deleted.
- When trying to unregister and delete a VM client from Satellite 6.1.1 the VM is deleted from the Virtualizaton Hypervisor.
- Removing a VM from Satellite deletes the VM from the Hypervisor.
- What "Destroy associated VM on host delete." in Provisioning Settings is used for?
Resolution
To remove only the system profile from WebUI when deleting an host, you can take different approaches according to the Satellite 6 version in use
Satellite 6.5 or later
In Satellite 6.5 has been added the new option `Destroy associated VM on host delete` that allows to control this behaviour. When enabled, VMs linked to Hosts will be deleted on Compute Resource. When disabled, VMs are unlinked when the host is deleted, meaning they remain on Compute Resource and can be re-associated or imported back to Satellite again. This does not automatically power off the VM
Disable it following the steps below:
Administer->Settings->Provisioning->Destroy associated VM on host delete.-> Set the value toNo
Satellite 6.4 or earlier
Disassociate the host by following the steps below:
-
Hosts->All Hosts->Editthe particular system profile -> Click onDisassociate host->Submit -
Deleting the host should now remove only the profile and the virtual system on the
Compute Resourceremains intact. -
To disassociate the host from the compute resource using the CLI, the below API Call can be used,
# curl -k -u admin -X PUT -H 'Content-Type: application/json' https://localhost/api/v2/hosts/<vm01.test.lab>/disassociate | json_reformat
NOTE: Replace the vm01.test.lab with the FQDN of the host.
Root Cause
- When a system is provisioned from Red Hat Satellite 6 onto a
compute resource, then there will be an association with the host and the Satellite. Removing the system from the Satellite 6 webUI, would also remove the system from thecompute resourceback-end.
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.