Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
lxc-create fails using slackware template
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
spofforth
n00b
n00b


Joined: 16 Nov 2019
Posts: 12

PostPosted: Tue Nov 02, 2021 10:04 pm    Post subject: lxc-create fails using slackware template Reply with quote

Using the simplest
Code:
# lxc-create -n slack -t slackware

fails with
Code:
/usr/share/lxc/templates/lxc-slackware: line 717: type: slackpkg: not found
'slackpkg' command is missing.
lxc-create: slack: lxccontainer.c: create_run_template: 1621 Failed to create container from template
lxc-create: slack: tools/lxc_create.c: main: 319 Failed to create container slack


Looking at the template the lines are:
Code:
type installpkg
if [ $? -ne 0 ]; then
        echo "'installpkg' command is missing."
        exit 1
fi
yet it seems this is not in any function, so it would be called on the gentoo host, which obviously doesn't have installpkg installed.

Am i missing something obvious? This is my first time diving into LXC.

Incidentally, i tried using virt-manager but it can only use, not create LXC containers, as it warns that "The OS directory tree must already exist. To enable OS directory tree creation, please install virt-bootstrap." This virt-bootstrap seems to be a link, but clicking goes nowhere. Also, it doesn't seem to be a gentoo package and i only find it in a git repo.

Any tips appreciated.

(Not interested in other OS or docker.)
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3879

PostPosted: Tue Nov 02, 2021 10:28 pm    Post subject: Reply with quote

Where did you get this
Code:

/usr/share/lxc/templates/lxc-slackware

Probably it is meant to be run on slackware machines.
_________________
:)
Back to top
View user's profile Send private message
spofforth
n00b
n00b


Joined: 16 Nov 2019
Posts: 12

PostPosted: Tue Nov 02, 2021 10:58 pm    Post subject: Reply with quote

File /usr/share/lxc/templates/lxc-slackware comes from app-emulation/lxc-templates and is sourced from a git repo.

I believe this is the template LXC uses to create a Slackware container.
Back to top
View user's profile Send private message
Juippisi
Developer
Developer


Joined: 30 Sep 2005
Posts: 723
Location: /home

PostPosted: Wed Nov 03, 2021 8:03 am    Post subject: Reply with quote

lxc-templates have been deprecated long ago,
https://brauner.github.io/2018/02/27/lxc-removes-legacy-template-build-system.html

Now that distrobuilder is present in the main ::gentoo repo, we should probably remove lxc-templates altogether. We can't even create a gentoo container with them anymore...
Back to top
View user's profile Send private message
spofforth
n00b
n00b


Joined: 16 Nov 2019
Posts: 12

PostPosted: Wed Nov 03, 2021 6:22 pm    Post subject: Reply with quote

Juippisi wrote:
lxc-templates have been deprecated long ago,
https://brauner.github.io/2018/02/27/lxc-removes-legacy-template-build-system.html

Now that distrobuilder is present in the main ::gentoo repo, we should probably remove lxc-templates altogether. We can't even create a gentoo container with them anymore...
Where should i open a bug so that that package is removed?

And what's the current proper way of generating a slackware unprivileged container? The download template doesn't even have Slackware.

Replying to self, it seems the New Way is using distrobuilder, which also doesn't have slackware, but that's no longer a gentoo issue.
Back to top
View user's profile Send private message
Juippisi
Developer
Developer


Joined: 30 Sep 2005
Posts: 723
Location: /home

PostPosted: Thu Nov 04, 2021 8:53 am    Post subject: Reply with quote

spofforth wrote:

Where should i open a bug so that that package is removed?


You can do that in bugs.gentoo.org - but don't worry, I'll do it ~soon.

Quote:

And what's the current proper way of generating a slackware unprivileged container? The download template doesn't even have Slackware.


Yea I can't see slackware even for lxd. You might have to roll up your sleeves and generate one on your own ;) ofc you can maybe request it be added by upstream, but I doubt the demand for that is very high (since it takes a lot from them to generate and keep generating these images)
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3879

PostPosted: Thu Nov 04, 2021 4:05 pm    Post subject: Reply with quote

Well i found one:
https://www.apt-browse.org/browse/ubuntu/xenial/main/amd64/lxc-templates/2.0.0-0ubuntu2/file/usr/share/lxc/templates/lxc-slackware
Create it in ubuntu and then move it to Gentoo
https://www.cyberciti.biz/faq/how-to-movemigrate-lxd-vm-to-another-host-on-linux/
and
https://stackoverflow.com/questions/23427129/how-do-i-backup-move-lxc-containers[/b]
Are you that desperate for a slackware container?
_________________
:)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum