Error when importing container with associated storage pool

I’m trying to move a container from one server to another. I have made an export of the container. It has an associated storage pool and volume in zfs.

After the export, I scp it over to the new server, and do the import.

I keep getting the error

 Error: Failed importing backup: Failed creating instance record: Failed initializing instance: Failed ad
d validation for device "ncloud_data": Failed loading custom volume: Storage volume not found

whether I create the storage volume inside the pool or not. To try and keep things simple I have created the storage pool and storage volume with the same names as on the original server. I’m not sure why this is failing every time, so any help is greatly appreciated.

What does the container profile look like at the originating and receiving servers?

Especially the storage pool/type?

incus config show --expanded NAME of the instance would be good to see more about that ncloud_data device.

It sounds likely to be a standard disk device with a source and pool config.
You’d need to make sure that you have a volume with the same name as source and in a pool of the same name as pool on the target.

Here is the expanded config:

As a note, I am attempting to move the main instance, as well as the custom volume using the same pool name and type (zfs) and the same volume name on the new server.

~$ incus config show --expanded nextcloud
architecture: x86_64
config:
  boot.autostart: "true"
  image.description: Ubuntu 22.04 with Docker-CE
  security.nesting: "true"
  volatile.base_image: ba4316be57f745cbc9a311e0b4a16a09614c69d21915761bf8ab8f256e63579e
  volatile.cloud-init.instance-id: d938a7ec-8e2a-47fa-aa2f-bee85c1ad826
  volatile.eth0.hwaddr: 00:16:3e:10:66:07
  volatile.eth0.name: eth0
  volatile.idmap.base: "0"
  volatile.idmap.current: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
  volatile.idmap.next: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
  volatile.last_state.idmap: '[]'
  volatile.last_state.power: STOPPED
  volatile.last_state.ready: "false"
  volatile.uuid: 80f26605-4206-4c71-9e00-f493a151fdf5
  volatile.uuid.generation: 80f26605-4206-4c71-9e00-f493a151fdf5
devices:
  eth0:
    nictype: bridged
    parent: bridge0
    type: nic
  ncloud_data:
    path: /mnt/ncloud_store
    pool: default
    source: ncloud_store
    type: disk
  root:
    path: /
    pool: default
    type: disk
ephemeral: false
profiles:
- default
- bridgeprofile
stateful: false
description: NextCloud AIO

Okay, so you’d need to first handle that ncloud_store volume, once it’s on the default pool on the target server, the instance should import fine.

1 Like

Working on that now