Activate storage during domain migration

Guy Godfroy guy.godfroy at gugod.fr
Sat Aug 5 09:24:24 UTC 2023


Hello,

Also here is a related issue to create an additional hook during migration in order to deal with volume preparation on the source node.

https://gitlab.com/libvirt/libvirt/-/issues/37

2 août 2023 14:18:42 Peter Krempa <pkrempa at redhat.com>:

> On Tue, Aug 01, 2023 at 12:28:56 +0200, e-m at mailbox.org wrote:
>> Hi,
>> 
>> I have a block storage which I only want to be mounted on a single node. I
>> know that there are many possibilities for shared storage usage but I want
>> to know if the following is possible (using the API).
>> - Have a domain running on node-A
>> - Initialize a migration for that domain to node-B
>> - Run a hook or something just before the domain starts on node-B to:
>>     - unmount storage on node-A
>>     - mount/prepare storage on node-B
> 
> This is not possible with qemu, because during migration the process
> running the VM exists both on node-A and node-B, and has the storage
> open (although not accessing it) from both sides.
> 
> At the time the migration is switching over, the source flushes buffers
> and the destination starts writing into the image.
> 
> This means that the storage must be mounted on both nodes during the
> migration.
> 
> What you can do though is, to save the VM state into a file and restore
> it on the other node. (virsh save, virsh restore). Which uses basically
> the same approach as migration, but the VM state is dumped to a file and
> preserved, thus you can umount the storage for the necessary time until
> it's moved to the next node.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20230805/26c8f123/attachment.htm>


More information about the libvirt-users mailing list