Lxd-to-incus fails: Target server isn't empty

I am using Debian 12 on x86_64

I have a LXD/LXC set up and want to install incus

I installed incus from the packages (aptitude install incus -y) and naively started initialisation

Reading the documentation it said I needed to run lxd-to-incus before initialisation. Duh!

I purged incus, and reinstalled and ran lxd-to-incus

I get the error:

$ sudo lxd-to-incus 
=> Looking for source server
==> Detected: .deb package
=> Looking for target server
==> Detected: systemd
=> Connecting to source server
=> Connecting to the target server
=> Checking server versions
==> Source version: 5.0.2
==> Target version: 6.2
=> Validating version compatibility
=> Checking that the source server isn't empty
=> Checking that the target server is empty
Error: Target server isn't empty (storage pools found), can't proceed with migration.

I am at a dead end, what do I do?

Sounds like you did something that set up Incus, whether that’s running incus admin init or trying to interact with Incus from a member of the incus group.

You’re going to need to empty that Incus server of all storage pools, networks, projects, … before you can run the migration tool.

Assuming incus admin init was run, then you’d normally be looking at doing:

sudo incus profile device remove default eth0
sudo incus profile device remove default root
sudo incus storage delete default
sudo incus network delete incusbr0

At which point sudo lxd-to-incus should work again.

If you interacting with Incus from a user that’s a member of the incus and not incus-admin group, then you may also have a project that needs deleting, if that’s the case, show sudo incus project list and I’ll be able to provide instructions on deleting that too.

1 Like