def _delete_dead_service_vm_hosting_device(self, context, hosting_device):
if hosting_device is None:<EOL><INDENT>return<EOL><DEDENT>plugging_drv = self.get_hosting_device_plugging_driver(<EOL>context, hosting_device['<STR_LIT>'])<EOL>hosting_device_drv = self.get_hosting_device_driver(<EOL>context, hosting_device['<STR_LIT>'])<EOL>if plugging_drv is None or hosting_device_drv is None:<EOL><INDENT>return<EOL><DEDENT>res = plugging_drv.get_hosting_device_resources(<EOL>context, hosting_device['<STR_LIT:id>'], hosting_device['<STR_LIT>'],<EOL>self.l3_tenant_id(), self.mgmt_nw_id())<EOL>if not self.svc_vm_mgr.delete_service_vm(context,<EOL>hosting_device['<STR_LIT:id>']):<EOL><INDENT>LOG.error('<STR_LIT>'<EOL>'<STR_LIT>',<EOL>hosting_device['<STR_LIT:id>'])<EOL><DEDENT>plugging_drv.delete_hosting_device_resources(<EOL>context, self.l3_tenant_id(), **res)<EOL>with context.session.begin(subtransactions=True):<EOL><INDENT>context.session.query(hd_models.SlotAllocation).filter_by(<EOL>hosting_device_id=hosting_device['<STR_LIT:id>']).delete()<EOL>context.session.delete(hosting_device)<EOL><DEDENT>
Deletes a presumably dead <hosting_device> service VM.

        This will indirectly make all of its hosted resources unscheduled.