#1121887 incant should depend on incus

#1121887#5
Date:
2025-12-04 09:10:04 UTC
From:
To:
Dear Maintainer,

Thanks for creating incant as a replacement for Vagrant.

I'm trying to imitate Vagrant with the following steps,

Modified incant.yml created by incant init to just this,

$ cat incant.yaml
instances:
  debian-sid:
    image: images:debian/14

$ incant up
Creating instance debian-sid with image images:debian/14...
-> incus launch images:debian/14 debian-sid
Error: Failed: Error: The incus daemon doesn't appear to be started (socket
path: /var/lib/incus/unix.socket)

I think incant should depend on incus for this to work out of the box.

After incus is installed,

$ incant up
Creating instance debian-sid with image images:debian/14...
-> incus launch images:debian/14 debian-sid
Error: Failed: Error: You don't have the needed permissions to talk to the
incus daemon (socket path: /var/lib/incus/unix.socket)

I think incant should try to set these permissions - to mimic vagrant as close
as possible.

May be a debconf prompt for configuring this?

sudo usermod -a -G incus-admin
newgrp incus-admin

After this, it still failed

$ incant up
Creating instance debian-sid with image images:debian/14...
-> incus launch images:debian/14 debian-sid
Error: Failed: Error: Failed instance creation: read tcp
[2401:4900:8816:89cf:734:c3b7:2a79:7ef6]:40308->[2400:6180:100:d0::10e:1]:443:
read: connection timed out

I think because it is trying to use ipv6 by default.

And later,
$ incant up
Creating instance debian-sid with image images:debian/14...
-> incus launch images:debian/14 debian-sid
Error: Failed: Error: Failed instance creation: Failed creating instance
record: Failed initializing instance: Failed getting root disk: No root device
could be found

Tried adding a devices: section, but it failed too

$ incant up
Creating instance debian-sid with image images:debian/14...
-> incus launch images:debian/14 debian-sid --device root,size=10GiB
Error: Failed: Error: Cannot override config for device "root": Device not
found in profile devices

May be there should be a tutorial to create a basic debian container ?

#1121887#10
Date:
2025-12-04 09:35:33 UTC
From:
To:
After running,

incus admin init

I could create it

$ incant up
Creating instance debian-sid with image images:debian/14...
-> incus launch images:debian/14 debian-sid
Sharing current directory to debian-sid:/incant ...
-> incus config device add debian-sid debian-sid_shared_incant disk
source=/home/pravi/forge/incant path=/incant shift=true
Device debian-sid_shared_incant added to debian-sid
-> incus exec debian-sid -- grep -wq /incant /proc/mounts

#1121887#15
Date:
2025-12-04 10:40:18 UTC
From:
To:
I have documented the steps to get a working vm/container (I think it
creates container by default - it'd be good to document how to change it
a VM instead of container too) at
https://wiki.debian.org/Packaging/Pre-Requisites/Virtual-Machine#Incant
(my goal here is only as a step to teach/learn packaging in a sid
environment but these kids of tutorial might be more generally useful too)

May be good to include it in /usr/share/docs or in the man page itself.
If someone is trying it as a drop in replacement, there is still many
steps once need to do. May be a vagrant-compat-incant or something if
these cannot be automated in incant directly? Though I think doing these
integrations directly in incant would be better as the original goal is
to be a replacement for vagrant.

#1121887#20
Date:
2025-12-05 13:07:16 UTC
From:
To:
Hi!

Thank you for the interest and the feedback.

It's true that Incant documentation made the assumption that Incus is
available and configured.

I improved the README.md file, added a pointer to it in the man page,
and also added a pointer to the website in the manpage, since that
provides a rendered version of the README.

I also added a Recommends on incus (technically, incant can work with
only incus-client, using a remote incus server, so a Depend would be
incorrect).

I need to think a bit more about that. I'm not sure of the best way to
reduce the "initial setup" step.

Lucas