Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues while moving instances with snapshot from one storage to another #1264

Open
afriqs opened this issue Sep 29, 2024 · 4 comments
Open
Assignees
Labels
Bug Confirmed to be a bug
Milestone

Comments

@afriqs
Copy link

afriqs commented Sep 29, 2024

Required information

  • Distribution: Debian
  • Distribution version: 12 (bookworm)
  • The output of "incus info" or if that fails:
    • Kernel version: 6.1.0-25-amd64
    • Incus version: 6.5
    • Storage backend in use: btrfs and zfs (see below)

Issue description

While installing lxd some years ago I used a btrfs backend for storage. I wanted to try zfs so I created one and wanted to move my instances to the latest one, but my instances did not want to start properly.

storages details

$ incus storage show lxc-storage | head -6
config:
  size: 150GiB
  source: /var/lib/incus/disks/lxc-storage.img
description: ""
name: lxc-storage
driver: btrfs
$ incus storage show incus-zfs | head -7
config:
  size: 60GiB
  source: /var/lib/incus/disks/incus-zfs.img
  zfs.pool_name: incus-zfs
description: ""
name: incus-zfs
driver: zfs

Steps to reproduce

without snapshots

Everything seems to be 👍

$ incus launch images:debian/12 my-debian --vm
Launching my-debian
$ incus exec my-debian hostname
my-debian
$ incus stop my-debian
$ incus move my-debian --storage incus-zfs
$ incus start my-debian
$ incus exec my-debian hostname
my-debian

with snapshots

Something went bad

$ incus launch images:debian/12 my-debian --vm
Launching my-debian
$ incus exec my-debian hostname
my-debian
$ incus stop my-debian
$ incus snapshot create my-debian clean-install
$ incus snapshot list my-debian
+---------------+-----------------------+------------+----------+
|      NOM      |       TAKEN AT        | EXPIRES AT | STATEFUL |
+---------------+-----------------------+------------+----------+
| clean-install | 2024/09/29 19:08 CEST |            | NO       |
+---------------+-----------------------+------------+----------+
$ incus move my-debian --storage incus-zfs
$ incus start my-debian
$ incus exec my-debian hostname
Error: VM agent isn't currently running
$ incus console my-debian --type=vga
$ incus stop my-debian --force
$ incus move my-debian --storage lxc-storage
$ incus start my-debian
$ incus exec my-debian hostname
Error: VM agent isn't currently running
$ incus console my-debian --type=vga
$ incus stop my-debian --force

Information to attach

The cropped snapshots of th console :
Console 1
Console 2

@stgraber stgraber added the Bug Confirmed to be a bug label Oct 2, 2024
@stgraber stgraber modified the milestones: incus-6.6, incus-6.7 Oct 2, 2024
@alex14641
Copy link

I followed all the steps OP specified, and got the same result; however, when I stopped then started the VM, waited 20 seconds, then ran the exec command, it worked.

My environment:
Distro: Slackware current
Incus version: build from latest git
Kernel version: 6.10.13
ZFS version: 2.26

@afriqs
Copy link
Author

afriqs commented Oct 16, 2024

Hi,

I tried again with version 6.6 and it seems to work now 🤷

I moved a windows 11 vm and it fails to start with a UEFI error but this is another story I think, so I close the issue.

@afriqs afriqs closed this as completed Oct 16, 2024
@afriqs
Copy link
Author

afriqs commented Oct 16, 2024

Well, I think I was too optimistic 😅 I moved a bullseye vm I work on and it fails to boot, see screenshot

Capture d’écran du 2024-10-16 17-32-57

@afriqs afriqs reopened this Oct 16, 2024
@afriqs
Copy link
Author

afriqs commented Oct 21, 2024

Another test performed this morning:

  1. backup vm with snapshots: incus export my-vm.tgz
  2. remove vm: incus delete my-vm
  3. import back vm: incus import my-vm.tgz (in defautl storage wich is still btrfs)
  4. start vm: 👌
  5. stop vm
  6. remove vm: incus delete my-vm
  7. import vm in zfs storage: incus import my-vm.tgz --storage incus-zfs
  8. start vm: 💥

error in console after import to zfs

@stgraber stgraber modified the milestones: incus-6.7, incus-6.8 Nov 14, 2024
@stgraber stgraber self-assigned this Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Confirmed to be a bug
Development

No branches or pull requests

3 participants