Bug 611183 - [RFE] Run qemu-img check before/post image operations
Summary: [RFE] Run qemu-img check before/post image operations
Alias: None
Product: oVirt
Classification: Retired
Component: vdsm
Version: unspecified
Hardware: All
OS: Linux
Target Milestone: ---
: 3.3.4
Assignee: Allon Mureinik
QA Contact: Aharon Canan
Whiteboard: storage
Depends On:
TreeView+ depends on / blocked
Reported: 2010-07-04 06:56 UTC by Dor Laor
Modified: 2015-01-24 10:29 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Last Closed: 2014-08-04 08:54:09 UTC
oVirt Team: ---

Attachments (Terms of Use)

Description Dor Laor 2010-07-04 06:56:44 UTC
Description of problem:
Since there is a potential of corruptions due to various storage issues, qcow2 bugs, live migration, etc we need to test the qcow2 images for correctness.

The test itself is relateively fast. It needs to be do done at least when image operations are taken place. It would even nice to have to do it every time a guest is booted. This is pending of a test to see how much time is added. Internal testing revealed is it pretty fast.

+ * Checks an image for consistency. Exit codes:
+ *
+ * 0 - Check completed, image is good
+ * 1 - Check not completed because of internal errors
+ * 2 - Check completed, image is corrupted
+ * 3 - Check completed, image has leaked clusters, but is good otherwise

Comment 1 Itamar Heim 2010-07-04 07:12:20 UTC
I would understand doing this in backend for a specific check if user asks for it.
but if we want this implicitly done, why not just have VDSM perform it and fail actions on integrity errors?

Comment 2 Dor Laor 2010-07-04 08:04:52 UTC
You're welcome to move it to vdsm if you like

Comment 3 Miki Kenneth 2010-07-26 08:30:10 UTC
After consulting with DanKen - moved this to VDSM.
Flagged to 2.3 - stretch goal.

Comment 11 Itamar Heim 2010-07-27 14:47:18 UTC
(In reply to comment #8)
> This is really easy to do on our side, but the question is how much time it
> adds to VM startup because this could have an adverse affect on the user
> experience.
> If you say it should always finish within a certain amount of time (lets say 5
> sec
> tops) then we could just kill the process and log that it took >5 sec and then
> allow to run the VM (or not, depending on what you suggest).
> Miki, what do you think?
> Kevin, what about a 2TB disk? worst case scenario?    

the default max disk size in 2.2 is 16TB, so let's check for a pre-allocated
16TB disk somehow please:
1. let's make sure it is a reasonable time.
2. maybe make the timeout relative to image size...

Comment 14 Federico Simoncelli 2012-04-13 15:08:52 UTC
The qemu-img check will probably be included in the validateImage command (and exposed in some way internally as a Volume method so that it could be used in other flows too):


Comment 16 Dan Kenigsberg 2013-03-14 09:30:13 UTC
FYI, I've just taken in 

  vdsm_hooks: Add support for checkimages VDSM hook

by Jan Lieskovsky. It may be useful until such a feature is incorporated in oVirt.

Comment 17 Ayal Baron 2013-09-26 17:44:26 UTC
Bug 998443 shows that sometimes the qemu-img is corrupted and possibly indicates we need such a utility still

Comment 19 Itamar Heim 2014-08-04 08:54:09 UTC
I don't think we saw qcow corruptions in a while. closing. a hook is available (comment 16)

Note You need to log in before you can comment on or make changes to this bug.