[arch-general] systemd-nspawn : centOS container
I have happily used a second Arch as a container booted with systemd-nspawn. I would like now install a CentOS container, but I am not sure how to proceed the install. What is the correct way ? - first install minimal CentOS from an iso in a dedicated partition (in my case it will be a ssd), then mount the ssd filesystem in /var/lib/container/MyCentOS ? - mount the iso file with systemd-nspawn --image=/path/to/CentOS.iso, boot my container and then install CentOS . Thank you for hint.
On Friday 30 Jan 2015 7:12:18 PM arnaud gaboury wrote:
I have happily used a second Arch as a container booted with systemd-nspawn.
I would like now install a CentOS container, but I am not sure how to proceed the install. What is the correct way ? - first install minimal CentOS from an iso in a dedicated partition (in my case it will be a ssd), then mount the ssd filesystem in /var/lib/container/MyCentOS ? - mount the iso file with systemd-nspawn --image=/path/to/CentOS.iso, boot my container and then install CentOS .
I haven't tried it myself but you could use a pre-built image like this http://images.linuxcontainers.org/images/centos/7/amd64/default/20150131_02:... Bonus point, it can run an lxc container as well. HTH -- Regards Shridhar
On Sat, Jan 31, 2015 at 5:47 AM, Shridhar Daithankar <ghodechhap@ghodechhap.net> wrote:
On Friday 30 Jan 2015 7:12:18 PM arnaud gaboury wrote:
I have happily used a second Arch as a container booted with systemd-nspawn.
I would like now install a CentOS container, but I am not sure how to proceed the install. What is the correct way ? - first install minimal CentOS from an iso in a dedicated partition (in my case it will be a ssd), then mount the ssd filesystem in /var/lib/container/MyCentOS ? - mount the iso file with systemd-nspawn --image=/path/to/CentOS.iso, boot my container and then install CentOS .
I haven't tried it myself but you could use a pre-built image like this
http://images.linuxcontainers.org/images/centos/7/amd64/default/20150131_02:...
Bonus point, it can run an lxc container as well.
Thank you for the link, but i doesn't really answer my question with systemd-nspwan. Btw, I deicded to go Fedora and installed this way: # yum -y --releasever=21 --nogpg --installroot=/srv/mycontainer --disablerepo='*' --enablerepo=fedora install systemd passwd yum fedora-release-server vim-minimal
On 31-01-2015 08:01, arnaud gaboury wrote:
On Sat, Jan 31, 2015 at 5:47 AM, Shridhar Daithankar <ghodechhap@ghodechhap.net> wrote:
On Friday 30 Jan 2015 7:12:18 PM arnaud gaboury wrote:
I have happily used a second Arch as a container booted with systemd-nspawn.
I would like now install a CentOS container, but I am not sure how to proceed the install. What is the correct way ? - first install minimal CentOS from an iso in a dedicated partition (in my case it will be a ssd), then mount the ssd filesystem in /var/lib/container/MyCentOS ? - mount the iso file with systemd-nspawn --image=/path/to/CentOS.iso, boot my container and then install CentOS .
I haven't tried it myself but you could use a pre-built image like this
http://images.linuxcontainers.org/images/centos/7/amd64/default/20150131_02:...
Bonus point, it can run an lxc container as well.
Thank you for the link, but i doesn't really answer my question with systemd-nspwan. Btw, I deicded to go Fedora and installed this way:
From reading the man page I suspect you would have to install a minimal image with qemu and then use that with --image, or install a minimal image with qemu, extract the files and use it as you have been using your second arch.
This is something worth looking at, I'm not sure something like centos 4 would work with systemd-nspawn but would be nice to be able to (easily) setup a container with that in case of need (reason: compatibility with some older proprietary program).
# yum -y --releasever=21 --nogpg --installroot=/srv/mycontainer --disablerepo='*' --enablerepo=fedora install systemd passwd yum fedora-release-server vim-minimal
-- Mauro Santos
On Saturday 31 Jan 2015 9:01:39 AM arnaud gaboury wrote:
On Sat, Jan 31, 2015 at 5:47 AM, Shridhar Daithankar
<ghodechhap@ghodechhap.net> wrote:
On Friday 30 Jan 2015 7:12:18 PM arnaud gaboury wrote:
I have happily used a second Arch as a container booted with systemd-nspawn.
I would like now install a CentOS container, but I am not sure how to proceed the install. What is the correct way ? - first install minimal CentOS from an iso in a dedicated partition (in my case it will be a ssd), then mount the ssd filesystem in /var/lib/container/MyCentOS ? - mount the iso file with systemd-nspawn --image=/path/to/CentOS.iso, boot my container and then install CentOS .
I haven't tried it myself but you could use a pre-built image like this
http://images.linuxcontainers.org/images/centos/7/amd64/default/20150131_0 2:16/
Bonus point, it can run an lxc container as well.
Thank you for the link, but i doesn't really answer my question with systemd-nspwan.
You could untar the rootfs archive and start systemd-nspawn on it? instead of having to install the minimal image yourself? -- Regards Shridhar
You could untar the rootfs archive and start systemd-nspawn on it? instead of having to install the minimal image yourself?
Yes, if it is not an install script as Arch iso. I must admit I didn't have a look inside the iso file. I will start to test all this soon. My preferred way is the systemd-nspawn man page using yum, but will try other ways, just for testing purpose.
participants (3)
-
arnaud gaboury
-
Mauro Santos
-
Shridhar Daithankar