Host disconnected midway during backup, now unable to start/restart/cancel
-
Restarting xo-server allowed me to restart all the jobs except for one particular VM. How do I unblock this?
Start: Dec 5, 2020, 06:53:28 PM End: Dec 5, 2020, 06:53:41 PM Error: SR_BACKEND_FAILURE_82(, Failed to snapshot VDI [opterr=['MAP_DUPLICATE_KEY', 'VDI', 'sm_config', 'OpaqueRef:92d82ecf-f03c-4f6d-9f2f-6d4f8beced23', 'paused']], ) Start: Dec 5, 2020, 06:53:28 PM End: Dec 5, 2020, 06:53:41 PM Duration: a few seconds Error: SR_BACKEND_FAILURE_82(, Failed to snapshot VDI [opterr=['MAP_DUPLICATE_KEY', 'VDI', 'sm_config', 'OpaqueRef:92d82ecf-f03c-4f6d-9f2f-6d4f8beced23', 'paused']], )
-
@justjosh Seem to recall running into this issue once before. IIRC, I used this method to resolve the issue --
https://discussions.citrix.com/topic/399028-paused-vdi/#comment-2025338
-
@danp Did you just remove the VDI or took other steps?
-
@justjosh I ran the commands from the link I posted to remove the "paused" flag from sm-config
-
@danp Which UUID did you use as the reference? I've used the UUID provided under OpaqueRef but it's saying that UUID is invalid.
>>> vdi_ref = session.xenapi.VDI.get_by_uuid('92d82ecf-f03c-4f6d-9f2f-6d4f8beced23') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.7/site-packages/XenAPI.py", line 264, in __call__ return self.__send(self.__name, args) File "/usr/lib/python2.7/site-packages/XenAPI.py", line 160, in xenapi_request result = _parse_result(getattr(self, methodname)(*full_params)) File "/usr/lib/python2.7/site-packages/XenAPI.py", line 238, in _parse_result raise Failure(result['ErrorDescription']) XenAPI.Failure: ['UUID_INVALID', 'VDI', '92d82ecf-f03c-4f6d-9f2f-6d4f8beced23']
-
@justjosh You should be able to get the correct UUID by going to the VM's Disks tab in XO and click the copy icon for the desired disk.
-
@danp I was under the impression I would need to remove the VDI for the snapshot and not the VDI for the VM's disk. Is the remove_from_sm_config command supposed to be run on the VM disk?
-
@justjosh Yes, the goal is to 'unpause' the the VDI for the VM's disk.
If you look back at the thread I posted, they showed the output from
xe vdi-list uuid=d50a85ca-eda2-4cbd-a348-80c7d6808ac1 params=all
, where the UUID was from the VM's disk VDI. You could perform the same on your VDI to confirm that the issue is present insm-config
entry. -
@danp I've cleared the pause but I'm still encountering errors regarding pause. Any ideas?
I still have a snapshot from 4th Dec when the error first started. Is it safe to delete that? Will the delta backup be able to merge a full snapshot with the existing chain?
Snapshot Start: Dec 8, 2020, 09:15:07 AM End: Dec 8, 2020, 09:15:08 AM Error: SR_BACKEND_FAILURE_82(, Failed to snapshot VDI [opterr=failed to pause VDI d11dc884-b91d-4ea0-87ef-6b96ce5b0ad4], ) Start: Dec 8, 2020, 09:15:07 AM End: Dec 8, 2020, 09:15:08 AM Duration: a few seconds Error: SR_BACKEND_FAILURE_82(, Failed to snapshot VDI [opterr=failed to pause VDI d11dc884-b91d-4ea0-87ef-6b96ce5b0ad4], )
-
@justjosh Yes, it should be fine to delete the snapshot and then rerun the backup job.
-
@Danp Did you remember what command you used to remove the "paused" flag, as the link from Citrix is not working anymore? Thanks!
-
As I needed it urgently, I wrote a python script which remove the flag from the db with this command :
vdi_ref = session.xenapi.VDI.get_by_uuid(vdi_uuid) session.xenapi.VDI.remove_from_sm_config(vdi_ref, "paused")
It worked and my vm are back to business!
-
@nicolas Yes, that is essentially what was shown in the link. Note: the developers have warned to be careful using this technique because the disk is in a paused state for a reason, so simply clearing the flag could lead to unintended consequences.
Alternatively, you can try running this command --
/opt/xensource/sm/resetvdis.py single <VDI UUID>