From 54c80d2e8562004fcf5b39d51b4207993a65b1bf Mon Sep 17 00:00:00 2001 From: Piotr Resztak Date: Sat, 24 Feb 2024 19:39:58 +0100 Subject: [PATCH] incusd/instance/drivers: Disable architecture check on incus cp with snapshots Fixes issue with copying instances with different architecture which have snapshots. Signed-off-by: Piotr Resztak --- internal/server/instance/drivers/driver_lxc.go | 2 +- internal/server/instance/drivers/driver_qemu.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/server/instance/drivers/driver_lxc.go b/internal/server/instance/drivers/driver_lxc.go index 071f1f93616..1a04844b98f 100644 --- a/internal/server/instance/drivers/driver_lxc.go +++ b/internal/server/instance/drivers/driver_lxc.go @@ -6136,7 +6136,7 @@ func (d *lxc) MigrateReceive(args instance.MigrateReceiveArgs) error { } // Create the snapshot instance. - _, snapInstOp, cleanup, err := instance.CreateInternal(d.state, *snapArgs, true, true) + _, snapInstOp, cleanup, err := instance.CreateInternal(d.state, *snapArgs, true, false) if err != nil { return fmt.Errorf("Failed creating instance snapshot record %q: %w", snapArgs.Name, err) } diff --git a/internal/server/instance/drivers/driver_qemu.go b/internal/server/instance/drivers/driver_qemu.go index 3ab8e28f3bf..4f5b656ba75 100644 --- a/internal/server/instance/drivers/driver_qemu.go +++ b/internal/server/instance/drivers/driver_qemu.go @@ -7106,7 +7106,7 @@ func (d *qemu) MigrateReceive(args instance.MigrateReceiveArgs) error { } // Create the snapshot instance. - _, snapInstOp, cleanup, err := instance.CreateInternal(d.state, *snapArgs, true, true) + _, snapInstOp, cleanup, err := instance.CreateInternal(d.state, *snapArgs, true, false) if err != nil { return fmt.Errorf("Failed creating instance snapshot record %q: %w", snapArgs.Name, err) }