Re: How can I rebase network disk?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Thanks for your reply. The nova project uses the virDomainBlockRebase API to finish the rebase operation from the old disk to the new disk not using the virDomainBlockCopy API.
I am confused of the difference of virDomainBlockRebase and virDomainBlockCopy. 

Cheers,
Boxiang
On 11/5/2018 22:07Peter Krempa<pkrempa@xxxxxxxxxx> wrote:
On Fri, Nov 02, 2018 at 13:42:56 +0800, Boxiang Zhu wrote:


Hi.
I am using openstack, ceph and libvirt now.


The live volume migration will call the libvirt rebase function in openstack nova project.
https://github.com/openstack/nova/blob/stable/rocky/nova/virt/libvirt/driver.py#L1497
https://github.com/openstack/nova/blob/stable/rocky/nova/virt/libvirt/guest.py#L802


But I use the ceph as the openstack block backend. And the type of disk is network in xml.
<disk type='network' device='disk'>
<driver name='qemu' type='raw' cache='writeback' discard='unmap'/>
<auth username='cinder'>
<secret type='ceph' uuid='86d3922a-b471-4dc1-bb89-b46ab7024e81'/>
</auth>
<source protocol='rbd' name='volumes002/volume-127f46fc-ef10-4462-af30-c3893cda31f9'>
<host name='172.16.140.63' port='6789'/>
</source>
<target dev='vdb' bus='virtio'/>
<serial>127f46fc-ef10-4462-af30-c3893cda31f9</serial>
<alias name='virtio-disk1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</disk>


Now I found it is not supported to rebase network disk. It is only rebase block or file disk now.
https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainBlockRebase


My question is that can I rebase network disk by some other ways from libvirt?

Whic operation of "rebase" do you mean? Unfortunately we've implemented
the virDomainBlockCopy API also using a flag-hack with the rebase api.
Are you passing in VIR_DOMAIN_BLOCK_REBASE_COPY?

If yes, then you in fact should use virDomainBlockCopy API which takes
an XML which allows to specify also a network based disk. The support
for block copy to a network destination will be added soon as I'm
working on it.

Without the VIR_DOMAIN_BLOCK_REBASE_COPY flag it should work as
expected right now, since it pulls in changes from backing files.
_______________________________________________
libvirt-users mailing list
libvirt-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvirt-users

[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux