Citrix XenServer Error: The SR failed to complete the operation

Yesterday we started to run out of space on one of our storage repositories.  When we tried to move any VDI on that SR via XenCenter, we got the error “The SR failed to complete the operation”.  Which is a pretty generic error, par for xenserver errors.  I even got the same error when trying to do a ‘Rescan’.

I continued to troubleshoot, looking through logs and command outputs.  I finally found something to look into.

Ran the command:
xe sr-param-list uuid=eb943814-a329-5f84-bd42-af1858d56632

Noticed this parameter:
other-config (MRW): dirty: ; auto-scan: false

I looked into this “dirty” param…  It means xenserver isn’t happen with the file names on the SR.   I listed the files on my SR and saw that someone created a manual copy of a VDI called: Copy of f897ebcf-9365-471b-8a30-e81f564c2536.vhd.

I fixed it by:

* Removing file: Copy of f897ebcf-9365-471b-8a30-e81f564c2536.vhd
* Rescanning the SR
* I was then able to move the VDI from one SR to another with out error.

 

Hope this helps with your day:

Citrix XenServer 6.1 Internal error: File “xapi_xenops.ml”, line 1788, characters 3-9: Assertion failed

Today I rebooted a xen host, everything came back up as I would expect, and after trying to live migrate VMs back onto the host I got this error message.

Internal error: File "xapi_xenops.ml", line 1788, characters 3-9: Assertion failed

I thought it was something wrong with xencenter, but then tried via command line and got this error:

Error code: SR_BACKEND_FAILURE_46
Error parameters: , The VDI is not available [opterr=VDI SOME-UUID already attached RW]

 

The message “The VDI is not available” I’ve seen many times before and I knew what to do.

 

 

Citrix XenServer System Recovery Guide

I found this white paper from the early days of XenServer.  I think it’s worth a once over as most of the information and logic remain valid.  The flow chart of recovery steps makes it look pretty simple and can maybe help someone out of a jam.  This is definitely something you want in your disaster  recovery plan!

XenServer System Recovery Guide

Orignal source: http://support.citrix.com/servlet/KbServlet/download/17140-102-671536/XenServer%20System%20Recovery%20Guide.pdf