You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
copy --refresh for vm to another server fails on subsequent copy
When copying a vm using copy --refresh from another server, the first attempt is successful but once changes and snapshots added the copy fails with:
incus copy incus2:test-copy1 test-copy1 --refresh
Error: Failed instance creation: Error transferring instance data: Failed migration on target: Failed creating instance on target: Snapshot "snap0" cannot be restored due to subsequent snapshot(s). Set zfs.remove_snapshots to override
incus storage volume list zpool1|grep test-copy1
| virtual-machine | test-copy1 | | block | 1 |
| virtual-machine (snapshot) | test-copy1/snap0 | | block | 0 |
root@lxd02:~# zfs list -t snapshot |grep test-copy1
zpool1/virtual-machines/test-copy1@snapshot-snap0 60K - 7.11M -
zpool1/virtual-machines/test-copy1@snapshot-snap1 60K - 7.11M -
zpool1/virtual-machines/test-copy1.block@snapshot-snap0 0B - 640M -
I can remove the snapshot-snap1 via zfs destroy but the snapshot will come back on next copy attempt and produces the error again. It looks like the zfs send/receive is done too early for vms?
Steps to reproduce
create vm on server1 incus launch images:ubuntu/22.04/cloud test-copy1 --vm
Create snapshot incus snapshot create test-copy1
On server2 do initial copy incus copy server1:test-copy1 test-copy1 --refresh
copy angain from server2 incus copy server1:test-copy1 test-copy1 --refresh Error: Failed instance creation: Error transferring instance data: Failed migration on target: Failed creating instance on target: Snapshot "snap0" cannot be restored due to subsequent snapshot(s). Set zfs.remove_snapshots to override
The ZFS logic has most of its functions call themselves with the
filesystem datset after processing the block volume for virtual
machines.
This is usually correct, but in the case of receiving a refresh stream,
we specifically want to handle the snapshot rollback separately for both
volumes.
Closeslxc#457
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
The ZFS logic has most of its functions call themselves with the
filesystem datset after processing the block volume for virtual
machines.
This is usually correct, but in the case of receiving a refresh stream,
we specifically want to handle the snapshot rollback separately for both
volumes.
Closeslxc#457
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
copy --refresh for vm to another server fails on subsequent copy
When copying a vm using
copy --refresh
from another server, the first attempt is successful but once changes and snapshots added the copy fails with:I can remove the snapshot-snap1 via zfs destroy but the snapshot will come back on next copy attempt and produces the error again. It looks like the zfs send/receive is done too early for vms?
Steps to reproduce
incus launch images:ubuntu/22.04/cloud test-copy1 --vm
incus snapshot create test-copy1
incus copy server1:test-copy1 test-copy1 --refresh
incus copy server1:test-copy1 test-copy1 --refresh
Error: Failed instance creation: Error transferring instance data: Failed migration on target: Failed creating instance on target: Snapshot "snap0" cannot be restored due to subsequent snapshot(s). Set zfs.remove_snapshots to override
Information to attach
The text was updated successfully, but these errors were encountered: