Skip to content

Commit

Permalink
incusd/instance/drivers: Disable architecture check on incus cp with …
Browse files Browse the repository at this point in the history
…snapshots

Fixes issue with copying instances with different architecture
which have snapshots.

Signed-off-by: Piotr Resztak <piotr.resztak@gmail.com>
  • Loading branch information
presztak committed Feb 24, 2024
1 parent 4426c83 commit 54c80d2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/server/instance/drivers/driver_lxc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/server/instance/drivers/driver_qemu.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 54c80d2

Please sign in to comment.