[libvirt] libvirt external snapshot error

Hi, i'm using virsh -c qemu+ssh://test.node/system snapshot-create-as 40083 --no-metadata --disk-only --live –atomic --diskspec sda,file=/test outputs: error: Operation not supported: live snapshot creation is supported only with external checkpoints info: Compiled against library: libvirt 1.2.16 Using library: libvirt 1.2.16 Using API: QEMU 1.2.16 Running hypervisor: QEMU 2.4.1 Does it supported on never libvirt? How can i solve the issue? I'm use raw format for disk. -- Vasiliy Tolstov, e-mail: v.tolstov@selfip.ru

On Mon, Nov 23, 2015 at 13:13:09 +0300, Vasiliy Tolstov wrote:
Hi, i'm using virsh -c qemu+ssh://test.node/system snapshot-create-as 40083 --no-metadata --disk-only --live –atomic --diskspec sda,file=/test
outputs: error: Operation not supported: live snapshot creation is supported only with external checkpoints
info: Compiled against library: libvirt 1.2.16 Using library: libvirt 1.2.16 Using API: QEMU 1.2.16 Running hypervisor: QEMU 2.4.1
Does it supported on never libvirt? How can i solve the issue? I'm use raw format for disk.
If you insist on using --live you also have to specify --memspec to point to a location where the memory snapshot is saved. Btw, --live and --disk-only are basically mutually exclusive since --disk-only implies that the memory state should not be saved, whereas --live is used when the memory state is saved. Additionally a disk-only snapshot is always considered "live" since it usually doesn't require pausing of the VM. Peter

2015-11-23 14:43 GMT+03:00 Peter Krempa <pkrempa@redhat.com>:
If you insist on using --live you also have to specify --memspec to point to a location where the memory snapshot is saved. Btw, --live and --disk-only are basically mutually exclusive since --disk-only implies that the memory state should not be saved, whereas --live is used when the memory state is saved.
Additionally a disk-only snapshot is always considered "live" since it usually doesn't require pausing of the VM.
So, i'm try to modify command to virsh snapshot-create-as 40219 --no-metadata --disk-only --diskspec sda,file=/test.raw but also have error: error: unsupported configuration: external snapshot file for disk sda already exists and is not a block device: /test.raw libvirt xml : <disk type='block' device='disk'> <driver name='qemu' type='raw' cache='none' io='native' discard='unmap'/> <source dev='/dev/vg1/40219'/> <backingStore/> <target dev='sda' bus='scsi'/> <iotune> <total_iops_sec>5000</total_iops_sec> </iotune> <alias name='scsi0-0-0-0'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> -- Vasiliy Tolstov, e-mail: v.tolstov@selfip.ru

On Mon, Nov 23, 2015 at 15:04:55 +0300, Vasiliy Tolstov wrote:
2015-11-23 14:43 GMT+03:00 Peter Krempa <pkrempa@redhat.com>:
If you insist on using --live you also have to specify --memspec to point to a location where the memory snapshot is saved. Btw, --live and --disk-only are basically mutually exclusive since --disk-only implies that the memory state should not be saved, whereas --live is used when the memory state is saved.
Additionally a disk-only snapshot is always considered "live" since it usually doesn't require pausing of the VM.
So, i'm try to modify command to virsh snapshot-create-as 40219 --no-metadata --disk-only --diskspec sda,file=/test.raw but also have error: error: unsupported configuration: external snapshot file for disk sda already exists and is not a block device: /test.raw
The file should not exist prior to the snapshot. If you want to pre-create it (with correct size and format), you need to specify --reuse-external in that case. Virsh manual already documents that: If --reuse-external is specified, and the snapshot XML requests an external snapshot with a destination of an existing file, then the destination must exist and be pre-created with correct format and metadata. The file is then reused; otherwise, a snapshot is refused to avoid losing contents of the existing files.

2015-11-23 15:10 GMT+03:00 Peter Krempa <pkrempa@redhat.com>:
The file should not exist prior to the snapshot. If you want to pre-create it (with correct size and format), you need to specify --reuse-external in that case. Virsh manual already documents that:
If --reuse-external is specified, and the snapshot XML requests an external snapshot with a destination of an existing file, then the destination must exist and be pre-created with correct format and metadata. The file is then reused; otherwise, a snapshot is refused to avoid losing contents of the existing files.
If file is not exists i get error: error: internal error: unable to execute QEMU command 'transaction': Could not open '/test.raw': Invalid argument -- Vasiliy Tolstov, e-mail: v.tolstov@selfip.ru

2015-11-23 15:13 GMT+03:00 Vasiliy Tolstov <v.tolstov@selfip.ru>:
If file is not exists i get error: error: internal error: unable to execute QEMU command 'transaction': Could not open '/test.raw': Invalid argument
Does libvirt/qemu supports external snapshots from raw source format? for example : virsh snapshot-create-as 40083 --no-metadata --disk-only --diskspec sda,driver=raw,file=/test.raw error: unsupported configuration: disk format 'raw' lacks backing file support -- Vasiliy Tolstov, e-mail: v.tolstov@selfip.ru

23 нояб. 2015 г. 15:13 пользователь "Vasiliy Tolstov" <v.tolstov@selfip.ru> написал:
2015-11-23 15:10 GMT+03:00 Peter Krempa <pkrempa@redhat.com>:
The file should not exist prior to the snapshot. If you want to pre-create it (with correct size and format), you need to specify --reuse-external in that case. Virsh manual already documents that:
If --reuse-external is specified, and the snapshot XML requests an external snapshot with a destination of an existing file, then the destination must exist and be pre-created with correct format and metadata. The file is then reused; otherwise, a snapshot is refused to avoid losing contents of the existing files.
If file is not exists i get error: error: internal error: unable to execute QEMU command 'transaction': Could not open '/test.raw': Invalid argument
Any new suggestions?
-- Vasiliy Tolstov, e-mail: v.tolstov@selfip.ru

24 нояб. 2015 г. 10:17 пользователь "Vasiliy Tolstov" <v.tolstov@selfip.ru> написал:
23 нояб. 2015 г. 15:13 пользователь "Vasiliy Tolstov" <v.tolstov@selfip.ru>
написал:
2015-11-23 15:10 GMT+03:00 Peter Krempa <pkrempa@redhat.com>:
The file should not exist prior to the snapshot. If you want to pre-create it (with correct size and format), you need to specify --reuse-external in that case. Virsh manual already documents that:
If --reuse-external is specified, and the snapshot XML requests an external snapshot with a destination of an existing file, then the destination must exist and be pre-created with correct format and metadata. The file is then reused; otherwise, a snapshot is refused to avoid losing contents of the existing files.
If file is not exists i get error: error: internal error: unable to execute QEMU command 'transaction': Could not open '/test.raw': Invalid argument
Any new suggestions?
Does this is bug and it needs to be fixed or this expected? Can somebody helps me to fix this? I'm found piece of code but don't understand some things.
-- Vasiliy Tolstov, e-mail: v.tolstov@selfip.ru

2015-11-24 10:17 GMT+03:00 Vasiliy Tolstov <v.tolstov@selfip.ru>:
If file is not exists i get error: error: internal error: unable to execute QEMU command 'transaction': Could not open '/test.raw': Invalid argument
I'm debug this issue, this error from qemu-img, that tries to open file with O_DIRECT, that does not supported by overlayfs. -- Vasiliy Tolstov, e-mail: v.tolstov@selfip.ru

On Mon, Nov 30, 2015 at 11:22:29 +0300, Vasiliy Tolstov wrote:
2015-11-24 10:17 GMT+03:00 Vasiliy Tolstov <v.tolstov@selfip.ru>:
If file is not exists i get error: error: internal error: unable to execute QEMU command 'transaction': Could not open '/test.raw': Invalid argument
I'm debug this issue, this error from qemu-img, that tries to open file with O_DIRECT, that does not supported by overlayfs.
I saw the same message in the same context, but I thought that / would be a normal FS in this case. At any rate, either choose a different location, or you can enable caching for the disk if you don't need to do migrations. (cache='none' for the disk makes qemu use O_DIRECT). Peter
participants (2)
-
Peter Krempa
-
Vasiliy Tolstov