Unable to remove schedule tasks from vCenter UI
search cancel

Unable to remove schedule tasks from vCenter UI

book

Article ID: 316641

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

  • Unable to remove schedule tasks from vCenter UI
  • Removing of task is greyed out

Resolution

  1. Take appropriate snapshot(s) of the vCenter particular if in ELM.
  2. Stop the VPXD and content library service:

    service-control --stop vpxd
    service-control --stop vmware-content-library

  3. Connect to the VCDB

    /opt/vmware/vpostgres/current/bin/psql -U postgres -d VCDB

  4. List the created scheduled tasks

    select scheduledtask_id, name from vpx_scheduledtask;

    Example

    scheduledtask_id |            name
    ------------------+--------------------------------------------------
            2 | VMware vSphere Lifecycle Manager HCL Validation
           101 | VMware vSphere Lifecycle Manager Update Download
           201 | Migrate VM

    Note: In this example, we will remove the Migrate VM task (scheduledtask_id = 201)

  5. Make a note of the scheduledtask_id for the scheduled task that is slated to be removed.

  6. Remove the scheduledtask_id from the following 3 tables: vpx_sched_action, vpx_sched_scheduler & vpx_scheduledtask

    delete from vpx_sched_action where scheduledtask_id=<####>;
    delete from vpx_sched_scheduler where scheduledtask_id=<####>;
    delete from vpx_scheduledtask where scheduledtask_id=<####>;

    Example
    delete from vpx_sched_action where scheduledtask_id=201;
    delete from vpx_sched_scheduler where scheduledtask_id=201;
    delete from vpx_scheduledtask where scheduledtask_id=201;

  7. Above command will result in below changes

    VCDB=# select scheduledtask_id,name from vpx_scheduledtask;

    Example
    scheduledtask_id |            name
    ------------------+--------------------------------------------------
            2 | VMware vSphere Lifecycle Manager HCL Validation
           101 | VMware vSphere Lifecycle Manager Update Download

  8. Start the VPXD and content library service

    service-control --start vpxd
    service-control --start vmware-content-library