On Fri, Aug 16, 2019 at 4:49 PM <smidhunraj(a)gmail.com> wrote:
I have taken the snapshot of a virtual machine using rest API. I
attached
the disk to another backup vm in oVirt.
1) Is it possible using php to copy the backup of Virtual Machine to
another storage .
Should be possible with any language.
An easy way to copy the disk is dd (assuming the disk is /dev/sde)
dd if=/dev/sde bs=1M of=/mnt/backup/disk-uuid.backup conv=fsync
2) How can i access a backup virtual machine in oVirt using bash script.
If you attached the disk to a backup vm, you can access the disk inside the
backup vm
by reading directly from the /dev/vdX or /dev/sdX. This provides all the
data in the snaphost
using raw format, regardless of the actual disk format.
To find the disk you can use /dev/disk/by-id/ links. The disk serial number
is the first 20 characters
of the disk uuid in oVirt.
Another way to download the disk raw data is using image transfer API.
With 4.3 you can start image transfer with format=raw. You can read the
entire image data
using imageio REST API.
See
https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/downlo...
Unfortunately the example does not show how to use the new format argument
allowing
access to guest raw data.
Daniel, do we have an example somewhere?
Nir