SCV restore error - Unable to fetch the vm by name from the vSphere inventory
Applies to
SnapCenter Plugin for VMware (SCV)
Issue
- SCV restore job fails with error, "
Exception while calling restore on SCV: Unable to fetch the vm <VM CLONE NAME> by name from the vSphere inventory even after a successful registration. Delete the newly registered vm and the mounted datastore. Retry the restore again.
" - As the error message indicates, the clone VM remains registered in vSphere and the FlexClone volume and clone datastore used for the restore remain mounted after the failure
vmcontrol_<JOB ID>.log
2022-11-10 14:04:42.471 DEBUG scv.appliance.name --- [p474675244-3346] c.n.a.v.VsphereService : VsphereUtils: Monitoring Task RegisterVM_Task
2022-11-10 14:04:52.520 DEBUG scv.appliance.name --- [p474675244-3346] c.n.a.v.VsphereService : VsphereUtils:State=success(100%)
2022-11-10 14:04:52.520 DEBUG scv.appliance.name --- [p474675244-3346] c.n.a.v.VsphereTaskUtil : Retrieving task with moref Task:task-130544
2022-11-10 14:04:52.520 DEBUG scv.appliance.name --- [p474675244-3346] c.n.a.v.VsphereService : [JobId:XXXX] Connecting to vSphere with session f164282d8b5b28d45fc0acf5b75455be3174c2ad
2022-11-10 14:04:52.571 DEBUG scv.appliance.name --- [p474675244-3346] c.n.a.v.VsphereService : [JobId:XXXX] Connecting to vSphere with session f164282d8b5b28d45fc0acf5b75455be3174c2ad
2022-11-10 14:04:53.033 DEBUG scv.appliance.name --- [p474675244-3346] c.n.a.d.VsphereDiscoveryManager : Got 0 virtual machines contains name: <VM CLONE NAME>
2022-11-10 14:04:53.034 WARN scv.appliance.name --- [p474675244-3346] c.n.a.r.AbstractRestoreStrategy : Unable to fetch the restore vm : <VM CLONE NAME> by name from the vSphere inventory even after a successful registration. Retrying one more time.
2022-11-10 14:04:53.034 DEBUG scv.appliance.name --- [p474675244-3346] c.n.a.r.AbstractRestoreStrategy : Retrying after 10 seconds of delay
2022-11-10 14:05:03.034 DEBUG scv.appliance.name --- [p474675244-3346] c.n.a.v.VsphereService : [JobId:XXXX] Connecting to vSphere with session f164282d8b5b28d45fc0acf5b75455be3174c2ad
2022-11-10 14:05:03.438 DEBUG scv.appliance.name --- [p474675244-3346] c.n.a.d.VsphereDiscoveryManager : Got 0 virtual machines contains name: <VM CLONE NAME>
2022-11-10 14:05:03.438 ERROR scv.appliance.name --- [p474675244-3346] c.n.a.r.AbstractRestoreStrategy : Again Unable to fetch the restore vm : <VM CLONE NAME> by name from the vSphere inventory even after a sucessful registration. Failing the restore workflow this time.
2022-11-10 14:05:03.438 ERROR scv.appliance.name --- [p474675244-3346] c.n.a.r.AbstractRestoreStrategy : Delete the newly registered vm and the mounted datastore. Retry the restore again.
2022-11-10 14:05:03.438 DEBUG scv.appliance.name --- [p474675244-3346] c.n.a.v.VsphereTaskUtil : Retrieving task with moref Task:task-130544
2022-11-10 14:05:03.438 DEBUG scv.appliance.name --- [p474675244-3346] c.n.a.v.VsphereService : [JobId:XXXX] Connecting to vSphere with session f164282d8b5b28d45fc0acf5b75455be3174c2ad
2022-11-10 14:05:03.484 DEBUG scv.appliance.name --- [p474675244-3346] c.n.a.r.RestoreManager : Setting restore task as failed
2022-11-10 14:05:03.484 DEBUG scv.appliance.name --- [p474675244-3346] c.n.a.v.VsphereTaskUtil : Retrieving task with moref Task:task-130544
2022-11-10 14:05:03.484 DEBUG scv.appliance.name --- [p474675244-3346] c.n.a.v.VsphereService : [JobId:XXXX] Connecting to vSphere with session f164282d8b5b28d45fc0acf5b75455be3174c2ad
2022-11-10 14:05:03.562 ERROR scv.appliance.name --- [p474675244-3346] c.n.a.s.p.RestoreWorkflowManager : [JobId:XXXX] Unable to fetch the vm <VM CLONE NAME> by name from the vSphere inventory even after a successful registration. Delete the newly registered vm and the mounted datastore. Retry the restore again.