<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Ballontekst Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.E-mailStijl17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BallontekstChar
        {mso-style-name:"Ballontekst Char";
        mso-style-priority:99;
        mso-style-link:Ballontekst;
        font-family:"Tahoma","sans-serif";
        mso-fareast-language:NL-BE;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="NL-BE" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hint, don’t upgrade you libvirt 1.2.12 to 1.2.16 yet. I use 1.2.16 with Qemu 2.2. and now I get a warning at the end of commiting the external
 snapshot:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">warning : virEventPollUpdateTimeout:268 : Ignoring invalid update timer -1<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">All seems to go well so I won’t downgrade libvirt but it still worries me…<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I’m going to test Qemu 2.4 in Ubuntu 16.04 in march…<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="NL" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Van:</span></b><span lang="NL" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Keyur Bhalerao [mailto:keyurbhalerao@gmail.com]
<br>
<b>Verzonden:</b> dinsdag 5 januari 2016 21:53<br>
<b>Aan:</b> Dominique Ramaekers<br>
<b>CC:</b> Kashyap Chamarthy; libvirt-users@redhat.com<br>
<b>Onderwerp:</b> Re: [libvirt-users] Efficient live disk backup with active blockcommit : Failed 'block-commit': Could not reopen file: Permission denied<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Hi ,<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Based on the discussion and links referred as mentioned in earlier thread , I could able to perform the block commit and other operations successfully.  Here are the changes required to perform block commit <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">1. Used Ubuntu 15.04 which has following versions of Libvirt and Qemu <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Compiled against library: libvirt 1.2.12<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Using library: libvirt 1.2.12<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Using API: QEMU 1.2.12<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Running hypervisor: QEMU 2.2.0 <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">-- Need to mention here : The Qemu version 2.3 certainly has some issues regarding the block commit as lowering the version to 2.2 resolved "active block job" issue.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">2. Modified the configuration <span style="font-size:10.5pt;font-family:"Helvetica","sans-serif";color:#333333">/etc/libvirt/qemu.conf </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Helvetica","sans-serif";color:#333333">   - Had to modify the qemu.conf file which is under /etc/libvirt to resolve the permission denied error. </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Helvetica","sans-serif";color:#333333">   - Added </span><span style="color:#500050"> security_driver="none" </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Helvetica","sans-serif";color:#333333">Supportive reference  : <a href="https://libvirt.org/drvqemu.html">https://libvirt.org/drvqemu.html</a> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I have two question regarding this.- <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">1. Is there any way we can avoid modifying /etc/libvirt/qemu.conf  for security driver changes and perform block commit . ?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">2. Has anyone tried with Qemu 2.4 for blockcommit and related operations ? Does it work ?  (I know this might not be relevant to libvirt users for sure it will help if someone trying block commit and related operations)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Keyur Bhalerao<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Tue, Dec 8, 2015 at 11:32 PM, Dominique Ramaekers <<a href="mailto:dominique.ramaekers@cometal.be" target="_blank">dominique.ramaekers@cometal.be</a>> wrote:<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">This is not a libvirt/redhat question…</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">With your method you can only revert to versions which are available in the standard
 repositories. You’ll have to download the packages manually to force a different version. Use with caution. There is a reason why the version isn’t in the standard repositories.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span lang="NL" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Van:</span></b><span lang="NL" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">
<a href="mailto:libvirt-users-bounces@redhat.com" target="_blank">libvirt-users-bounces@redhat.com</a> [mailto:<a href="mailto:libvirt-users-bounces@redhat.com" target="_blank">libvirt-users-bounces@redhat.com</a>]
<b>Namens </b>Keyur Bhalerao<br>
<b>Verzonden:</b> woensdag 9 december 2015 0:05<br>
<b>Aan:</b> Kashyap Chamarthy<br>
<b>CC:</b> <a href="mailto:libvirt-users@redhat.com" target="_blank">libvirt-users@redhat.com</a><br>
<b>Onderwerp:</b> Re: [libvirt-users] Efficient live disk backup with active blockcommit : Failed 'block-commit': Could not reopen file: Permission denied</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Hi<o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Was trying to get specific qemu-kvm version. Do you know any way to get the 2.1.2 installed. Was trying sudo apt-get install qemu-kvm=1.2.1 but its not working. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Tried with sudo apt-get install qemu-kvm tree=1.2.1<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">But both have failed for Version not found.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Thanks<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Keyur<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">On Tue, Dec 8, 2015 at 11:21 AM, Keyur Bhalerao <<a href="mailto:keyurbhalerao@gmail.com" target="_blank">keyurbhalerao@gmail.com</a>> wrote:<o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Thanks Kashyap for replying. <o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">QEMU has permissions to the directory which is having images. I will look into the AppArmor issue and find out more about this. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Also as per suggestion from the link i have uncommented the user and group from the qemu.conf file - <a href="https://github.com/jedi4ever/veewee/issues/996" target="_blank">https://github.com/jedi4ever/veewee/issues/996</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">By checking more on the AppArmor and sVirt issue  , i have modified the qemu.conf for security_driver="none". The result for this is no permission error but another error which
 can be related to QEMU 2.3.0<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">virsh # blockcommit vm-01 vda --verbose --pivot --active<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Block Commit: [100 %]error: failed to pivot job for disk vda<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">error: internal error: unable to execute QEMU command 'block-job-complete': The active block job for device 'drive-virtio-disk0' cannot be completed<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Searched more for this type of error and found - <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><a href="https://bugs.launchpad.net/qemu/+bug/1455475" target="_blank">https://bugs.launchpad.net/qemu/+bug/1455475</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Looks like bug in QEMU 2.3.0 . Checking now with QEMU 2.1 for the same. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Let me know if anything to more look for.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">                                                                                                                                                                                 
                                   <o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Thanks,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Keyur Bhalerao<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">On Tue, Dec 8, 2015 at 5:18 AM, Kashyap Chamarthy <<a href="mailto:kchamart@redhat.com" target="_blank">kchamart@redhat.com</a>> wrote:<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">On Mon, Dec 07, 2015 at 12:52:34PM -0800, Keyur Bhalerao wrote:<br>
<br>
[. . .]<br>
<br>
 ubuntu@keyurubuntu:~$ virsh blockcommit vm-01 vda --active --verbose --pivot<br>
> error: internal error: unable to execute QEMU command 'block-commit': Could<br>
> not reopen file: Permission denied<br>
<br>
Fairly obvious suggestions, ensure permissions are set so that QEMU has<br>
permissions to the dir that contains images.<br>
<br>
Or it could be an AppArmor issue.<br>
<br>
Also, check your logs:<br>
<br>
    /var/log/libvirt/qemu/$VM.log<br>
    /var/log/libvirt/libvirtd.log  (assuming you have debug logging<br>
    enabled)<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt"><br>
> I am not sure why this is getting as permission denied. I have tried<br>
> couple of times reinstalling and creating new VMs . Every time when i<br>
> have tried to block-commit getting landed into  same error.<br>
><br>
> Is there any troubleshooting or solution to this issue. Stuck on this<br>
> issue for last 2 days.  Quick help much appreciated.<br>
><br>
> Thanks, Keyur Bhalerao<br>
><br>
> Reference used -<br>
> <a href="http://wiki.libvirt.org/page/Live-disk-backup-with-active-blockcommit" target="_blank">
http://wiki.libvirt.org/page/Live-disk-backup-with-active-blockcommit</a><br>
> -<br>
> <a href="http://kashyapc.com/2012/09/14/externaland-live-snapshots-with-libvirt/" target="_blank">
http://kashyapc.com/2012/09/14/externaland-live-snapshots-with-libvirt/</a><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="color:#888888">--<br>
/kashyap</span><o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
</div>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</body>
</html>