<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<style>
    font{
        line-height: 1.6;
    }
    ul,ol{
        padding-left: 20px;
        list-style-position: inside;
    }
</style>
<div style="font-family:微软雅黑,Verdana,"Microsoft Yahei",SimSun,sans-serif; line-height:1.6;">
    <div></div>
<style>
    font{
        line-height: 1.6;
    }
    ul,ol{
        padding-left: 20px;
        list-style-position: inside;
    }
</style>
<div style="font-family:微软雅黑,Verdana,"Microsoft Yahei",SimSun,sans-serif; line-height:1.6;">
    <div></div>
<style>
    font{
        line-height: 1.6;
    }
    ul,ol{
        padding-left: 20px;
        list-style-position: inside;
    }
</style>
<div>
    <div>
    <div style="font-family: 微软雅黑, Verdana, 'Microsoft Yahei', SimSun, sans-serif; line-height: 1.6;">
        <span>
            <br>
        </span>
    </div>
    <div style="font-family: 微软雅黑, Verdana, 'Microsoft Yahei', SimSun, sans-serif; line-height: 1.6;"><span>Thanks for your reply. The nova project uses the </span>virDomainBlockRebase<span style="line-height: 22.4px;"> API to finish the rebase operation from the old disk to the new disk not using the </span><span style="font-family: 微软雅黑; line-height: 22.4px;">virDomainBlockCopy</span><span style="font-family: 微软雅黑; line-height: 22.4px;"> API.</span></div><div style="">I am confused of the difference of <span style="line-height: 22.4px; font-family: 微软雅黑, Verdana, 'Microsoft Yahei', SimSun, sans-serif;">virDomainBlockRebase</span><span style="line-height: 22.4px; font-family: 微软雅黑, Verdana, 'Microsoft Yahei', SimSun, sans-serif;"> and </span><span style="line-height: 22.4px;">virDomainBlockCopy. </span></div><div style="font-family: 微软雅黑, Verdana, 'Microsoft Yahei', SimSun, sans-serif; line-height: 1.6;"><span style="line-height: 22.4px;"><br></span></div><div style="font-family: 微软雅黑, Verdana, 'Microsoft Yahei', SimSun, sans-serif; line-height: 1.6;"><span style="line-height: 22.4px;">Cheers,</span></div><div style="font-family: 微软雅黑, Verdana, 'Microsoft Yahei', SimSun, sans-serif; line-height: 1.6;"><span style="line-height: 22.4px;">Boxiang</span></div>
    <div id="ntes-pcmac-signature" style="font-family: 微软雅黑; line-height: 1.6;">
        
        <div style="font-size:14px; padding: 0;  margin:0;">

        </div>
    </div>
</div><div class="J-reply" style="font-family: 微软雅黑; line-height: 1.6; color: black; padding-top: 6px; padding-bottom: 6px; border-radius: 3px; margin-top: 45px; margin-bottom: 20px; background-color: rgb(242, 242, 242);">
    <div style="font-size:12px;line-height:1.5;word-break:break-all;margin-left:10px;margin-right:10px">On <span class="mail-date">11/5/2018 22:07</span>,<a class="mail-to" style="text-decoration:none;color:#2a83f2;" href="mailto:pkrempa@redhat.com">Peter Krempa<pkrempa@redhat.com></a> wrote: </div>
</div>
<blockquote id="ntes-pcmail-quote" style="font-family: 微软雅黑; line-height: 1.6; margin: 0px; padding: 0px; font-size: 14px;">
On Fri, Nov 02, 2018 at 13:42:56 +0800, Boxiang Zhu wrote:<br> <blockquote class="mmbqc1"><br> <br> Hi.<br>     I am using openstack, ceph and libvirt now.<br> <br> <br>     The live volume migration will call the libvirt rebase function in openstack nova project.<br>     https://github.com/openstack/nova/blob/stable/rocky/nova/virt/libvirt/driver.py#L1497<br>     https://github.com/openstack/nova/blob/stable/rocky/nova/virt/libvirt/guest.py#L802<br> <br> <br>     But I use the ceph as the openstack block backend. And the type of disk is network in xml.<br> <disk type='network' device='disk'><br>   <driver name='qemu' type='raw' cache='writeback' discard='unmap'/><br>   <auth username='cinder'><br>     <secret type='ceph' uuid='86d3922a-b471-4dc1-bb89-b46ab7024e81'/><br>   </auth><br>   <source protocol='rbd' name='volumes002/volume-127f46fc-ef10-4462-af30-c3893cda31f9'><br>     <host name='172.16.140.63' port='6789'/><br>   </source><br>   <target dev='vdb' bus='virtio'/><br>   <serial>127f46fc-ef10-4462-af30-c3893cda31f9</serial><br>   <alias name='virtio-disk1'/><br>   <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/><br> </disk><br> <br> <br>     Now I found it is not supported to rebase network disk. It is only rebase block or file disk now.<br>     https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainBlockRebase<br> <br> <br>     My question is that can I rebase network disk by some other ways from libvirt?<br></blockquote><br>Whic operation of "rebase" do you mean? Unfortunately we've implemented<br>the virDomainBlockCopy API also using a flag-hack with the rebase api.<br>Are you passing in VIR_DOMAIN_BLOCK_REBASE_COPY?<br><br>If yes, then you in fact should use virDomainBlockCopy API which takes<br>an XML which allows to specify also a network based disk. The support<br>for block copy to a network destination will be added soon as I'm<br>working on it.<br><br>Without the VIR_DOMAIN_BLOCK_REBASE_COPY flag it should work as<br>expected right now, since it pulls in changes from backing files.<br></blockquote><!--😀-->
</div><!--😀-->
</div><!--😀-->
</div>
</body>
</html>