LXC and where to find SLES LXC template

Hi:

I am on SLES 11SP3. I installed LXC on it. When I looked in the templates folder I only saw open suse template.
I have hit some roadblocks. I have pasted the log here. Please take a min and advise what is possibly wrong.

I am trying to setup LXC container on a SLES 11SP3 host.

Since there is no template for SLES I have to use the openSuse templatenthat comes with the LXC install.

[COLOR="#0000FF"][SIZE=2]If anyone knows where to find SLES LXC template please inform.[/SIZE][/COLOR]

Here are the steps I have taken. But I am seeing failure.

[CODE]small-adp-sec:~ # lxc-checkconfig

— Namespaces —

Namespaces: enabled

Utsname namespace: enabled

Ipc namespace: enabled

Pid namespace: enabled

User namespace: enabled

Network namespace: enabled

Multiple /dev/pts instances: enabled

— Control groups —

Cgroup: enabled

Cgroup clone_children flag: enabled

Cgroup device: enabled

Cgroup sched: enabled

Cgroup cpu account: enabled

Cgroup memory controller: enabled

Cgroup cpuset: enabled

— Misc —

Veth pair device: enabled

Macvlan: enabled

Vlan: enabled

File capabilities: disabled

you need to boot your kernel with file_caps parameter to enable File
capabilities (not required if using lxc under root user, as recommended).

Note : Before booting a new kernel, you can check its configuration

usage : CONFIG=/path/to/config /usr/bin/lxc-checkconfig

=========================================================================
[/CODE]

[CODE]small-adp-sec:~ # ls /usr/share/lxc/templates/

lxc-altlinux lxc-archlinux lxc-busybox lxc-debian lxc-fedora
lxc-lenny lxc-opensuse lxc-sles lxc-sshd lxc-ubuntu lxc-ubuntu-cloud

small-adp-sec:~ # cat lxc_vps0.conf

lxc.utsname = vps0

lxc.network.type = veth

lxc.network.flags = up

lxc.network.link = br0

lxc.network.hwaddr = 00:30:6E:08:EC:80

lxc.network.ipv4 = 192.168.1.10

lxc.network.name = eth0

small-adp-sec:~ #

small-adp-sec:~ # rm -rf /var/cache/lxc
[/CODE]

small-adp-sec:~ # lxc-create -t opensuse -f lxc_vps0.conf  -n vps0

/usr/share/lxc/templates/lxc-opensuse is
/usr/share/lxc/templates/lxc-opensuse

Checking cache download in /var/cache/lxc/opensuse/rootfs-x86_64 ...

Downloading opensuse minimal ...

Warning: Repository 'update' appears to be outdated. Consider using a
different mirror or server.


Loading repository data...

Warning: Repository 'update' appears to be outdated. Consider using a
different mirror or server.

Reading installed packages...

Resolving package dependencies...

initializing /var/cache/lxc/opensuse/partial-x86_64/.srcfiles.cache ...

/usr/lib/build/createrpmdeps
/var/cache/lxc/opensuse/partial-x86_64-packages/var/cache/zypp/packages/repo-oss/suse/x86_64

/usr/lib/build/createrpmdeps
/var/cache/lxc/opensuse/partial-x86_64-packages/var/cache/zypp/packages/repo-oss/suse/noarch

expanding package dependencies...

expansion error

  nothing provides aaa_base

  nothing provides bash

  nothing provides coreutils

  nothing provides libc.so.6()(64bit) needed by diffutils

  nothing provides libc.so.6(GLIBC_2.14)(64bit) needed by diffutils

  nothing provides libc.so.6(GL

…..

…..

….

…….

chroot: failed to run command `/usr/bin/zypper': No such file or directory

chroot: failed to run command `/usr/bin/zypper': No such file or directory

chroot: failed to run command `rpm': No such file or directory

umount: /var/cache/lxc/opensuse/partial-x86_64/proc: not mounted

ln: failed to create symbolic link
`/var/cache/lxc/opensuse/partial-x86_64/etc/mtab': No such file or directory

ln: failed to create symbolic link
`/var/cache/lxc/opensuse/partial-x86_64/var/run': No such file or directory

Failed to download the rootfs, aborting.

Failed to download 'opensuse base'

failed to install opensuse

lxc-create: failed to execute template 'opensuse'

Delete subvolume '/var/lib/lxc/vps0/rootfs'

lxc-create: aborted

savithari,

It appears that in the past few days you have not received a response to your
posting. That concerns us, and has triggered this automated reply.

Has your issue been resolved? If not, you might try one of the following options:

Be sure to read the forum FAQ about what to expect in the way of responses:
http://forums.suse.com/faq.php

If this is a reply to a duplicate posting, please ignore and accept our apologies
and rest assured we will issue a stern reprimand to our posting bot.

Good luck!

Your SUSE Forums Team
http://forums.suse.com

On 07/05/2015 01:44, savithari wrote:
[color=blue]

I am on SLES 11SP3. I installed LXC on it. When I looked in the
templates folder I only saw open suse template.
I have hit some roadblocks. I have pasted the log here. Please take a
min and advise what is possibly wrong.

I am trying to setup LXC container on a SLES 11SP3 host.

Since there is no template for SLES I have to use the openSuse
templatenthat comes with the LXC install.

IF ANYONE KNOWS WHERE TO FIND SLES LXC
TEMPLATE PLEASE INFORM.

Here are the steps I have taken. But I am seeing failure.

Code:

 small-adp-sec:~ # lxc-checkconfig

— Namespaces —

Namespaces: enabled

Utsname namespace: enabled

Ipc namespace: enabled

Pid namespace: enabled

User namespace: enabled

Network namespace: enabled

Multiple /dev/pts instances: enabled

— Control groups —

Cgroup: enabled

Cgroup clone_children flag: enabled

Cgroup device: enabled

Cgroup sched: enabled

Cgroup cpu account: enabled

Cgroup memory controller: enabled

Cgroup cpuset: enabled

— Misc —

Veth pair device: enabled

Macvlan: enabled

Vlan: enabled

File capabilities: disabled

you need to boot your kernel with file_caps parameter to enable File
capabilities (not required if using lxc under root user, as recommended).

Note : Before booting a new kernel, you can check its configuration

usage : CONFIG=/path/to/config /usr/bin/lxc-checkconfig

=========================================================================


Code:

 small-adp-sec:~ # ls /usr/share/lxc/templates/

lxc-altlinux lxc-archlinux lxc-busybox lxc-debian lxc-fedora
lxc-lenny lxc-opensuse lxc-sles lxc-sshd lxc-ubuntu lxc-ubuntu-cloud

small-adp-sec:~ # cat lxc_vps0.conf

lxc.utsname = vps0

lxc.network.type = veth

lxc.network.flags = up

lxc.network.link = br0

lxc.network.hwaddr = 00:30:6E:08:EC:80

lxc.network.ipv4 = 192.168.1.10

lxc.network.name = eth0

small-adp-sec:~ #

small-adp-sec:~ # rm -rf /var/cache/lxc


Code:

small-adp-sec:~ # lxc-create -t opensuse -f lxc_vps0.conf -n vps0

/usr/share/lxc/templates/lxc-opensuse is
/usr/share/lxc/templates/lxc-opensuse

Checking cache download in /var/cache/lxc/opensuse/rootfs-x86_64 …

Downloading opensuse minimal …

Warning: Repository ‘update’ appears to be outdated. Consider using a
different mirror or server.

Loading repository data…

Warning: Repository ‘update’ appears to be outdated. Consider using a
different mirror or server.

Reading installed packages…

Resolving package dependencies…

initializing /var/cache/lxc/opensuse/partial-x86_64/.srcfiles.cache …

/usr/lib/build/createrpmdeps
/var/cache/lxc/opensuse/partial-x86_64-packages/var/cache/zypp/packages/repo-oss/suse/x86_64

/usr/lib/build/createrpmdeps
/var/cache/lxc/opensuse/partial-x86_64-packages/var/cache/zypp/packages/repo-oss/suse/noarch

expanding package dependencies…

expansion error

nothing provides aaa_base

nothing provides bash

nothing provides coreutils

nothing provides libc.so.6()(64bit) needed by diffutils

nothing provides libc.so.6(GLIBC_2.14)(64bit) needed by diffutils

nothing provides libc.so.6(GL

�…

�…

�.

��.

chroot: failed to run command `/usr/bin/zypper’: No such file or directory

chroot: failed to run command `/usr/bin/zypper’: No such file or directory

chroot: failed to run command `rpm’: No such file or directory

umount: /var/cache/lxc/opensuse/partial-x86_64/proc: not mounted

ln: failed to create symbolic link
`/var/cache/lxc/opensuse/partial-x86_64/etc/mtab’: No such file or directory

ln: failed to create symbolic link
`/var/cache/lxc/opensuse/partial-x86_64/var/run’: No such file or directory

Failed to download the rootfs, aborting.

Failed to download ‘opensuse base’

failed to install opensuse

lxc-create: failed to execute template ‘opensuse’

Delete subvolume ‘/var/lib/lxc/vps0/rootfs’

lxc-create: aborted

--------------------[/color]

According to the output you posted from “ls /usr/share/lxc/templates/”
you have the SLES template as lxc-sles …

HTH.

Simon
SUSE Knowledge Partner


If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below. Thanks.