VDI export of running VM
-
What happens when I use
xe vdi-export
on a disk that is attached to a running VM? Does it create a shadow copy to do the export?I'm sure I need to shutdown the VM to do
xe vdi-import
but being able to export live could be very useful. -
Hi,
An export of a live VM is always while using a snapshot. That's how XO is doing backup of a running infrastructure.
You simply can't copy a VDI that is actually used by a VM, because blocks are moving. How could you be sure to copy the entire correct blocks without doing a snapshot? It's simply not possible
-
Thanks for the reply.
I'm still not sure about the process. Does it copy a "snapshot-in-time" version? In other words, if I run
xe vdi-export
am getting a copy of whatever was there, at that moment?I understand that there are serious problems in trying to copy anything that is "live". For example, FSArchiver can be forced to copy a live system and while it does this safely, there may be inconsistencies in the data.
-
I suspect that you would need to create a new snapshot using
xe
and then use the snapshot as the source of the export instead of the running VM. Have you looked into using XO's REST API for this instead ofxe
? -
The VM is aware of being snapshoted, so it's not an issue. Can you explain what do you want to achieve in the end? That would be helpful to assist