Thursday, November 1, 2012

SCVMM 2012: Unable To Remove Template. Error: ‘The specified change on the object XYZ is not allowed.’

In my SC 2012 test lab I bumped into this error. I had build myself a new Service Template but it failed to deploy. Therefore I decided to remove it but all to no avail. Instead I got this error:
image

Textual contents of error message:
The specified change on the object (NAME OF OBJECT) is not allowed.
Ensure that no service configuration or service is referencing the object ID:21970

This really puzzled me since – of course – I already had deleted the related Service Deployment Configuration item first. But somehow somewhere there were other objects as well. So it was time for some searching. It took me some minutes only to find it right under my nose… Smile

When a Service Template gets deployed tons of things happens. But first a Service is created, directly related to the Service Template. When the deployment of the Service Template fails, the Service is already there and won’t go away by itself. It needs a helping hand in order to go…

Solution

  1. In the Library workspace under the node Templates > Service Templates you have to select the Service Template you want to delete.
  2. When selected, the information related to the Service Template will also display a clickable link of the related Services, like this one:
    image
  3. Click the link and you’ll see another workspace of the SCVMM 2012 Console, VMs and Services. The related Service will be shown now, like this:
    image
  4. Collapse this Service since all related Tiers – as defined in the Service Template – will be shown. Per Tier you can see it’s properties and also why the deployment failed, see this example:
    image
  5. Now you have all the information you need in to know why the deployment of the Service Template failed. Repeat Step 4 for all Tiers which are in an error/warning state (Status: Needs Attention).
  6. When you sure you get all the information you need, remove the top level Service by selecting it and clicking the Delete button (loving the Ribbon here!):
    image
  7. When the Service is successfully deleted go to the Library workspace under the node Templates > Service Templates and select the Service Template you want to delete but gave those errors.
  8. Simply click the Delete button and now the Service Template will be gone.
    image

Recap
When you want to remove a Service Template, remove ALL related objects. Two of them are the Service Deployment Configuration item (found in the Library workspace under the node Templates) and the other is the related Service(s). Just select the Service Template you want to remove and the information displayed about that item will show the clickable link(s) to those Service(s). Click it and remove it, one by one when there are more Services related to your Service Template.

3 comments:

Graham Davies said...

I've had issues with removing service templates as well. Brute force with PShell can help ;-)

$Service = Get-SCService -VMMServer "VMMServer01.Contoso.com" -Name "Service01"

Stop-SCService -Service $Service

Remove-SCService -Service $Service -Confirm

msm1723 said...

beautiful) thanks)

Jean said...

So beautifull you get rid of all associated VM's too.
There is no beauty in that logic... I think this association created by MS in SCVMM services, templates, clouds and VM is nonsense.