Error in ploop_check : Dirty flag is set

[Total: 5    Average: 5/5]

Today, I’m was facing “Error in ploop_check : Dirty flag is set” error while restarting one of the Openvz ploop container. I performed following steps to fix that Error in ploop_check : Dirty flag is set error

#vzctl start 103
Starting container...
Opening delta /vz/private/103/root.hdd/root.hdd
Error in ploop_check (check.c:574): Dirty flag is set
Error in ploop_check (check.c:595): Image is clean but unable to fix the header on ro image
Error in check_deltas (check.c:638): /vz/private/103/root.hdd/root.hdd : irrecoverable errors (ro)
Failed to mount image: Error in check_deltas (check.c:638): /vz/private/103/root.hdd/root.hdd : irrecoverable errors (ro) [7]

You can fix this issue using below steps :

#ploop check -F /vz/private/103/root.hdd/root.hdd
then
#ploop mount /vz/private/103/root.hdd/root.hdd/DiskDescriptor.xml
And check created ploop device:
#fsck /dev/ploop59031p1
and start the container
#vzctl start 103

Try to check ploop with the following command.

#ploop check --force /vz/private/103/root.hdd/root.hdd

Reopen rw /vz/private/103/root.hdd/root.hdd....
Error in ploop_check (check.c:574): Dirty flag is set...

If you are getting error while ploop_check, Then create new VM and migrate ploopl image to new container. Try with the below steps.

 1) Create a new container

2) Then shut it down

3) rename the root.hdd file in the new container directory
4) move the old one from 103 to this new VE root.hdd directory

start container and it will works !!!