Re: What are https://src.fedoraproject.org/container ?

2021-06-14 Thread Richard W.M. Jones
On Sat, Jun 12, 2021 at 08:00:15AM -0400, Neal Gompa wrote:
> At build-time, libguestfs copies the content of the kernel package
> along with binaries of various filesystem tools into itself to run a
> custom appliance for manipulating VMs. The Fedora-based libguestfs
> package can handle Btrfs even on RHEL because it relies on the
> binaries of the Fedora kernel and filesystem utilities instead of the
> RHEL ones. It will run QEMU and boot up *its* VM to manipulate VM
> stuff. That's even how guestfish works for mounting VM disks on the host.

So it's a bit more subtle than this.

Normally libguestfs will build the appliance at runtime, using files
from the host.  It is then run it using qemu + the latest kernel image
found in /boot or /lib/modules (so not necessarily the host kernel,
but it might be).  The process is described here:

  https://rwmj.wordpress.com/2014/03/08/supermin-version-5/

This has the advantage that you don't have to ship the appliance at
all (which is usually about ~300 MB, so quite a saving), and security
updates are handled automatically.  Instead we ship only this in the
RPM:

  $ du -sh /usr/lib64/guestfs/supermin.d/
  2.3M /usr/lib64/guestfs/supermin.d/

However ... containers.  There's all kinds of weirdness / brokenness
with containers (and especially when you combine them with Kubernetes)
which makes this harder to do:

 - usually limited or unpredictable space on /var/tmp so we have
   nowhere to build and cache the appliance (but shlepping around
   hundreds of megabytes of the same appliance in the container? totes fine!
   go figure ...)

 - "bazel" doesn't build an RPM database or run %post scripts, so it
   makes something that looks a bit like a container running Fedora,
   but is quite broken, in particular supermin can't work

 - missing/broken kernel packages

My colleague is currently building a container-based version of
libguestfs which does indeed work a lot more like Neal describes
above.  There will be a pre-built appliance, updated every so often
(hopefully often enough that security issues won't be too much of a
problem).  It'll get downloaded -- all hundreds of megabytes --
through the usual container distribution channels.

This is actually why I was interested in the question originally since
I was wondering if there was duplicated effort going on.

I should stress this is only for containers.  supermin will continue
to be used in regular Fedora.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure


Re: What are https://src.fedoraproject.org/container ?

2021-06-12 Thread Josh Boyer
On Sat, Jun 12, 2021, 8:01 AM Neal Gompa  wrote:

> On Sat, Jun 12, 2021 at 7:54 AM Josh Boyer 
> wrote:
> >
> >
> >
> > On Thu, Jun 10, 2021, 8:35 AM Stephen Gallagher 
> wrote:
> >>
> >> On Thu, Jun 10, 2021 at 5:51 AM Richard W.M. Jones 
> wrote:
> >> >
> >> > On Thu, Jun 10, 2021 at 09:39:38AM +0100, Ankur Sinha wrote:
> >> > > On Thu, Jun 10, 2021 09:02:47 +0100, Richard W.M. Jones wrote:
> >> > > >
> >> > > > This appeared yesterday:
> >> > > > https://src.fedoraproject.org/container/libguestfs
> >> > > >
> >> > > > I'm wondering what it is?
> >> > >
> >> > > That should be the container image generated from the Fedora
> package for
> >> > > the Fedora registry:
> >> > >
> >> > > https://docs.fedoraproject.org/en-US/containers/
> >> >
> >> > So it would be a container built on top of Fedora Rawhide containing
> >> > libguestfs?  Do we intend to build containers like this from other
> >> > Fedora packages?  I'm curious what the use case is.
> >> >
> >> > (NB: this is not an objection to anything, people can build containers
> >> > for whatever they want for all I care)
> >> >
> >>
> >> This specific example is to address one of the FESCo concerns about
> >> the cloud VM images using btrfs by default. Since RHEL VM host systems
> >> cannot read the btrfs filesystem, we want to ship a containerized
> >> version of libguestfs that CAN.
> >
> >
> > That can what?  As far as I know, libguestfs relies on the host to mount
> the filesystem.  A container still depends on the host kernel, which means
> a rhel VM still isn't going to be able to mount the guest btrfs disk...
> >
>
> At build-time, libguestfs copies the content of the kernel package
> along with binaries of various filesystem tools into itself to run a
> custom appliance for manipulating VMs. The Fedora-based libguestfs
> package can handle Btrfs even on RHEL because it relies on the
> binaries of the Fedora kernel and filesystem utilities instead of the
> RHEL ones. It will run QEMU and boot up *its* VM to manipulate VM
> stuff. That's even how guestfish works for mounting VM disks on the host.
>

Gotcha.  Thanks.

josh
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure


Re: What are https://src.fedoraproject.org/container ?

2021-06-12 Thread Neal Gompa
On Sat, Jun 12, 2021 at 7:54 AM Josh Boyer  wrote:
>
>
>
> On Thu, Jun 10, 2021, 8:35 AM Stephen Gallagher  wrote:
>>
>> On Thu, Jun 10, 2021 at 5:51 AM Richard W.M. Jones  wrote:
>> >
>> > On Thu, Jun 10, 2021 at 09:39:38AM +0100, Ankur Sinha wrote:
>> > > On Thu, Jun 10, 2021 09:02:47 +0100, Richard W.M. Jones wrote:
>> > > >
>> > > > This appeared yesterday:
>> > > > https://src.fedoraproject.org/container/libguestfs
>> > > >
>> > > > I'm wondering what it is?
>> > >
>> > > That should be the container image generated from the Fedora package for
>> > > the Fedora registry:
>> > >
>> > > https://docs.fedoraproject.org/en-US/containers/
>> >
>> > So it would be a container built on top of Fedora Rawhide containing
>> > libguestfs?  Do we intend to build containers like this from other
>> > Fedora packages?  I'm curious what the use case is.
>> >
>> > (NB: this is not an objection to anything, people can build containers
>> > for whatever they want for all I care)
>> >
>>
>> This specific example is to address one of the FESCo concerns about
>> the cloud VM images using btrfs by default. Since RHEL VM host systems
>> cannot read the btrfs filesystem, we want to ship a containerized
>> version of libguestfs that CAN.
>
>
> That can what?  As far as I know, libguestfs relies on the host to mount the 
> filesystem.  A container still depends on the host kernel, which means a rhel 
> VM still isn't going to be able to mount the guest btrfs disk...
>

At build-time, libguestfs copies the content of the kernel package
along with binaries of various filesystem tools into itself to run a
custom appliance for manipulating VMs. The Fedora-based libguestfs
package can handle Btrfs even on RHEL because it relies on the
binaries of the Fedora kernel and filesystem utilities instead of the
RHEL ones. It will run QEMU and boot up *its* VM to manipulate VM
stuff. That's even how guestfish works for mounting VM disks on the host.




--
真実はいつも一つ!/ Always, there's only one truth!
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure


Re: What are https://src.fedoraproject.org/container ?

2021-06-12 Thread Josh Boyer
On Thu, Jun 10, 2021, 8:35 AM Stephen Gallagher  wrote:

> On Thu, Jun 10, 2021 at 5:51 AM Richard W.M. Jones 
> wrote:
> >
> > On Thu, Jun 10, 2021 at 09:39:38AM +0100, Ankur Sinha wrote:
> > > On Thu, Jun 10, 2021 09:02:47 +0100, Richard W.M. Jones wrote:
> > > >
> > > > This appeared yesterday:
> > > > https://src.fedoraproject.org/container/libguestfs
> > > >
> > > > I'm wondering what it is?
> > >
> > > That should be the container image generated from the Fedora package
> for
> > > the Fedora registry:
> > >
> > > https://docs.fedoraproject.org/en-US/containers/
> >
> > So it would be a container built on top of Fedora Rawhide containing
> > libguestfs?  Do we intend to build containers like this from other
> > Fedora packages?  I'm curious what the use case is.
> >
> > (NB: this is not an objection to anything, people can build containers
> > for whatever they want for all I care)
> >
>
> This specific example is to address one of the FESCo concerns about
> the cloud VM images using btrfs by default. Since RHEL VM host systems
> cannot read the btrfs filesystem, we want to ship a containerized
> version of libguestfs that CAN.
>

That can what?  As far as I know, libguestfs relies on the host to mount
the filesystem.  A container still depends on the host kernel, which means
a rhel VM still isn't going to be able to mount the guest btrfs disk...

What am I missing?
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure


Re: What are https://src.fedoraproject.org/container ?

2021-06-10 Thread Stephen Gallagher
On Thu, Jun 10, 2021 at 5:51 AM Richard W.M. Jones  wrote:
>
> On Thu, Jun 10, 2021 at 09:39:38AM +0100, Ankur Sinha wrote:
> > On Thu, Jun 10, 2021 09:02:47 +0100, Richard W.M. Jones wrote:
> > >
> > > This appeared yesterday:
> > > https://src.fedoraproject.org/container/libguestfs
> > >
> > > I'm wondering what it is?
> >
> > That should be the container image generated from the Fedora package for
> > the Fedora registry:
> >
> > https://docs.fedoraproject.org/en-US/containers/
>
> So it would be a container built on top of Fedora Rawhide containing
> libguestfs?  Do we intend to build containers like this from other
> Fedora packages?  I'm curious what the use case is.
>
> (NB: this is not an objection to anything, people can build containers
> for whatever they want for all I care)
>

This specific example is to address one of the FESCo concerns about
the cloud VM images using btrfs by default. Since RHEL VM host systems
cannot read the btrfs filesystem, we want to ship a containerized
version of libguestfs that CAN.
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure


Re: What are https://src.fedoraproject.org/container ?

2021-06-10 Thread Ankur Sinha
On Thu, Jun 10, 2021 10:50:42 +0100, Richard W.M. Jones wrote:
> On Thu, Jun 10, 2021 at 09:39:38AM +0100, Ankur Sinha wrote:
> > On Thu, Jun 10, 2021 09:02:47 +0100, Richard W.M. Jones wrote:
> > > 
> > > This appeared yesterday:
> > > https://src.fedoraproject.org/container/libguestfs
> > > 
> > > I'm wondering what it is?
> > 
> > That should be the container image generated from the Fedora package for
> > the Fedora registry:
> > 
> > https://docs.fedoraproject.org/en-US/containers/
> 
> So it would be a container built on top of Fedora Rawhide containing
> libguestfs?

Yes. My understanding is that any package maintainer can submit a
"container review" to build and add a container image based on Fedora
packages to the Fedora container registry. The review for this one is
here: https://bugzilla.redhat.com/show_bug.cgi?id=1970071

I believe that images can also be based on the Fedora-33/34 images. We have a
compneuro one for F33, for example (but now I can't figure out how to
specify what Fedora release based image I want to pull, so maybe this is
not the case..)

https://src.fedoraproject.org/container/compneuro/blob/f33/f/Dockerfile

> Do we intend to build containers like this from other
> Fedora packages?  I'm curious what the use case is.

I guess the use case is to be able to use packages on Fedora base
containers images. Probably doesn't apply to all packages in Fedora,
though. The current ones should be here on the registry (I don't see the
libguestfs one listed yet)

https://registry.fedoraproject.org/

-- 
Thanks,
Regards,
Ankur Sinha "FranciscoD" (He / Him / His) | 
https://fedoraproject.org/wiki/User:Ankursinha
Time zone: Europe/London


signature.asc
Description: PGP signature
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure


Re: What are https://src.fedoraproject.org/container ?

2021-06-10 Thread Richard W.M. Jones
On Thu, Jun 10, 2021 at 09:39:38AM +0100, Ankur Sinha wrote:
> On Thu, Jun 10, 2021 09:02:47 +0100, Richard W.M. Jones wrote:
> > 
> > This appeared yesterday:
> > https://src.fedoraproject.org/container/libguestfs
> > 
> > I'm wondering what it is?
> 
> That should be the container image generated from the Fedora package for
> the Fedora registry:
> 
> https://docs.fedoraproject.org/en-US/containers/

So it would be a container built on top of Fedora Rawhide containing
libguestfs?  Do we intend to build containers like this from other
Fedora packages?  I'm curious what the use case is.

(NB: this is not an objection to anything, people can build containers
for whatever they want for all I care)

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure


Re: What are https://src.fedoraproject.org/container ?

2021-06-10 Thread Ankur Sinha
On Thu, Jun 10, 2021 09:02:47 +0100, Richard W.M. Jones wrote:
> 
> This appeared yesterday:
> https://src.fedoraproject.org/container/libguestfs
> 
> I'm wondering what it is?

That should be the container image generated from the Fedora package for
the Fedora registry:

https://docs.fedoraproject.org/en-US/containers/

-- 
Thanks,
Regards,
Ankur Sinha "FranciscoD" (He / Him / His) | 
https://fedoraproject.org/wiki/User:Ankursinha
Time zone: Europe/London


signature.asc
Description: PGP signature
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure


What are https://src.fedoraproject.org/container ?

2021-06-10 Thread Richard W.M. Jones

This appeared yesterday:
https://src.fedoraproject.org/container/libguestfs

I'm wondering what it is?

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure