<div dir="ltr">Hi ,<div style>I hit a bug with libvirt+ qemu+kvm when doing follow steps:</div><div style>1.initial status :vm = base+z(z is a snapshot)</div><div style>2. call snapshotCreateXML( ): vm =  base+z +z'</div><div style>3. call blockRebase( ): vm = base+z''(z rebase to z')</div><div style>4 .(after rebasing work done) vm shutdown and then start</div><div style><br></div><div style>an error accord like this:</div><div style><span style="color:rgb(54,59,66);font-family:'Helvetica Neue','Helvetica Neue',Helvetica,Arial,'Lantinghei SC','Hiragino Sans GB','Microsoft Yahei',sans-serif;font-size:12px;line-height:20px"> unable to set user and group to '0:0' on '/tvm/tvm/405b9ea5-10a7-4e56-946d-58e93e2688d6/405b9ea5-10a7-4e56-946d-58e93e2688d6.vda_20141101044033': No such file or directory</span><br></div><div style><font color="#363b42" face="Helvetica Neue, Helvetica Neue, Helvetica, Arial, Lantinghei SC, Hiragino Sans GB, Microsoft Yahei, sans-serif"><span style="font-size:12px;line-height:20px">A second start may sucess.</span></font></div><div style>I debugged with gdb and found that the error message was cauesed by </div><div style>virSecurityDACSetSecurityDiskLabel misuse the disk chain(that is base+z +z', </div><div style>after rebase), and z' was deleted yet.</div><div style>why virSecurityDACSetSecurityDiskLabel  used old disk chain after rebasing ? </div><div style>I finally find that In qemuProcessHandleBlockJob when rebase complete, disk chain in vm->def is updated but vm->newDef is not(when vm->newDef is not null). In shutdown( actrully in qemuProcessStop ), if vm->newDef is not null , vm->def will be replaced  by vm->newDef, which contains a wrong disk chain!!! the next start will failed with above message.</div><div><br></div></div>