Dealing with orphaned template in Catalog Item

So, our VMware team decided to rename the vsphere server I’m using as an Infrastructure Provider. I’ve gone in and renamed the provider and tested authentication which was successful. However, when I attempt to edit any of the catalog items under that I’ve created under Request Info, I receive the following error:

Cannot create Request Info, error: VM/Template SSC_VLE-RHEL6_GOLD_v1_2 with Id: <574> is orphaned and cannot be used with provisioning.

Unfortunately, there doesn’t appear to be any way to edit any of the Request Info settings. Here’s what I’m seeing.

Any idea how I can at least edit my existing catalog items without having to re-create them?


If you know the ID of the template that you want to use the following script can be run from the rails console to update the source template used from the catalog item. You will need to update the first two lines of the script with the service name and template ID.

After running this script you will want to edit the catalog item in the UI and verify that other selections in the workflow are still valid.

SERVICE_NAME = "Test Service"

service = ServiceTemplate.where(:name => SERVICE_NAME).first
service_resource = service.service_resources.where(:resource_type => "MiqRequest").first
provision_template = service_resource.resource

new_template = MiqTemplate.where(:id => NEW_TEMPLATE_ID).first

provision_template.source = new_template
provision_template.options[:src_vm_id] = [,]!

We are currently working on trying to correct this issue so invalid catalog items can be fixed from the UI.

1 Like