Re: [systemd-devel] How to use machinectl to get a running centos container?

2017-03-10 Thread Michal Sekletar
On Fri, Mar 3, 2017 at 4:09 PM, Lennart Poettering
 wrote:
> On Sat, 04.03.17 01:38, Daurnimator (q...@daurnimator.com) wrote:
>
>> On 3 March 2017 at 20:58, Lennart Poettering  wrote:
>> > On Fri, 03.03.17 12:34, Daurnimator (q...@daurnimator.com) wrote:
>> >
>> >> I'm trying to set up a centos 7 container with machinectl.
>> >> I've tried to run:
>> >>
>> >> machinectl pull-raw --verify=no
>> >> http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud-1701.raw.tar.gz
>> >
>> > Hmm, what is a ".raw.tar.gz" file? That suffix makes no sense to me...
>>
>> *shrugs* it's what I saw available for download from
>> http://cloud.centos.org/centos/7/images/
>>
>> Apparently it's a gziped tar with a single file inside:
>> CentOS-7-x86_64-GenericCloud-20170131_01.raw
>> This .raw file is a disk image.
>
> That appears a bit redundant, and importd/machinectl pull-raw is not
> able to handle this.
>
>
>> > We support raw disk images and tarballs with OS trees in them, both
>> > compressed and non-compressed.
>> >
>> > There's currently a safety limit against overly large images enforced,
>> > of 8GiB. If the indicated image is larger than that, and that's
>> > intended we should probably bump this safety limit substantially (32G?
>> > 64G?), please file a github issue asking for this if this is the
>> > case. Or even better prep a PR, the fix is trivial:
>> >
>> > https://github.com/systemd/systemd/blob/master/src/import/pull-job.c#L530
>>
>> Looks like it's *equal* to the limit.
>>
>> Before I make a PR here, am I going about running a centos container
>> with machinectl the best way here?
>> How are other people doing this?
>
> I don't think many people are using CentOS caontainers with
> nspawn... That said, there's a good chance that it works OKish.

I use them regularly and they work just fine (well I use RHEL7 but
that should not matter). However I don't download images from
anywhere. I install distro trees to /var/lib/machines/ manually using
dnf.

>
> Note that "machinectl pull-raw" is just a helper to make downloading
> easy. But if you have images in weird formats, you can download them
> and place them in /var/lib/machines (with the .raw suffix), and
> machined/nspawn is happy. It doesn't really matter how the image gets
> there as long as it gets there, and "machinectl pull-raw" is just one
> way.

That is what I also recommend. Installing from repo always worked for
me. For basic system container I just use example from nspawn manpage.

Michal

>
> Lennart
>
> --
> Lennart Poettering, Red Hat
> ___
> systemd-devel mailing list
> systemd-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/systemd-devel
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] How to use machinectl to get a running centos container?

2017-03-03 Thread Lennart Poettering
On Sat, 04.03.17 01:38, Daurnimator (q...@daurnimator.com) wrote:

> On 3 March 2017 at 20:58, Lennart Poettering  wrote:
> > On Fri, 03.03.17 12:34, Daurnimator (q...@daurnimator.com) wrote:
> >
> >> I'm trying to set up a centos 7 container with machinectl.
> >> I've tried to run:
> >>
> >> machinectl pull-raw --verify=no
> >> http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud-1701.raw.tar.gz
> >
> > Hmm, what is a ".raw.tar.gz" file? That suffix makes no sense to me...
> 
> *shrugs* it's what I saw available for download from
> http://cloud.centos.org/centos/7/images/
> 
> Apparently it's a gziped tar with a single file inside:
> CentOS-7-x86_64-GenericCloud-20170131_01.raw
> This .raw file is a disk image.

That appears a bit redundant, and importd/machinectl pull-raw is not
able to handle this.


> > We support raw disk images and tarballs with OS trees in them, both
> > compressed and non-compressed.
> >
> > There's currently a safety limit against overly large images enforced,
> > of 8GiB. If the indicated image is larger than that, and that's
> > intended we should probably bump this safety limit substantially (32G?
> > 64G?), please file a github issue asking for this if this is the
> > case. Or even better prep a PR, the fix is trivial:
> >
> > https://github.com/systemd/systemd/blob/master/src/import/pull-job.c#L530
> 
> Looks like it's *equal* to the limit.
> 
> Before I make a PR here, am I going about running a centos container
> with machinectl the best way here?
> How are other people doing this?

I don't think many people are using CentOS caontainers with
nspawn... That said, there's a good chance that it works OKish.

Note that "machinectl pull-raw" is just a helper to make downloading
easy. But if you have images in weird formats, you can download them
and place them in /var/lib/machines (with the .raw suffix), and
machined/nspawn is happy. It doesn't really matter how the image gets
there as long as it gets there, and "machinectl pull-raw" is just one
way.

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] How to use machinectl to get a running centos container?

2017-03-03 Thread Daurnimator
On 3 March 2017 at 20:58, Lennart Poettering  wrote:
> On Fri, 03.03.17 12:34, Daurnimator (q...@daurnimator.com) wrote:
>
>> I'm trying to set up a centos 7 container with machinectl.
>> I've tried to run:
>>
>> machinectl pull-raw --verify=no
>> http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud-1701.raw.tar.gz
>
> Hmm, what is a ".raw.tar.gz" file? That suffix makes no sense to me...

*shrugs* it's what I saw available for download from
http://cloud.centos.org/centos/7/images/

Apparently it's a gziped tar with a single file inside:
CentOS-7-x86_64-GenericCloud-20170131_01.raw
This .raw file is a disk image.


>> This downloads the image, but then dies with:
>>
>> File overly large, refusing
>> Failed to retrieve image file. (Wrong URL?)
>> Exiting.
>
> How large is the file?

  - The .gz is 581M
  - The .tar is 8.1G
  - The .raw is 8.0G (8388608 K)

>> Is there some other way I should be doing this?
>
> We support raw disk images and tarballs with OS trees in them, both
> compressed and non-compressed.
>
> There's currently a safety limit against overly large images enforced,
> of 8GiB. If the indicated image is larger than that, and that's
> intended we should probably bump this safety limit substantially (32G?
> 64G?), please file a github issue asking for this if this is the
> case. Or even better prep a PR, the fix is trivial:
>
> https://github.com/systemd/systemd/blob/master/src/import/pull-job.c#L530

Looks like it's *equal* to the limit.

Before I make a PR here, am I going about running a centos container
with machinectl the best way here?
How are other people doing this?
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] How to use machinectl to get a running centos container?

2017-03-03 Thread Lennart Poettering
On Fri, 03.03.17 12:34, Daurnimator (q...@daurnimator.com) wrote:

> I'm trying to set up a centos 7 container with machinectl.
> I've tried to run:
> 
> machinectl pull-raw --verify=no
> http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud-1701.raw.tar.gz

Hmm, what is a ".raw.tar.gz" file? That suffix makes no sense to me...

> This downloads the image, but then dies with:
> 
> File overly large, refusing
> Failed to retrieve image file. (Wrong URL?)
> Exiting.

How large is the file?

> Is there some other way I should be doing this?

We support raw disk images and tarballs with OS trees in them, both
compressed and non-compressed.

There's currently a safety limit against overly large images enforced,
of 8GiB. If the indicated image is larger than that, and that's
intended we should probably bump this safety limit substantially (32G?
64G?), please file a github issue asking for this if this is the
case. Or even better prep a PR, the fix is trivial:

https://github.com/systemd/systemd/blob/master/src/import/pull-job.c#L530

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel