On 3/8/21 2:31 PM, Adam Litke wrote:
>
>
> On Mon, Mar 8, 2021 at 12:33 PM John Snow <
js...@redhat.com
> <mailto:
js...@redhat.com>> wrote:
>
> On 3/3/21 2:18 PM, Adam Litke wrote:
> > * For security reasons libvirt must know if it is safe to
> interpret a
> > disk image as qcow2. To support qcow2 we would need to
> enhance the
> > VMI API with a "format" field and teach users how to properly
> set it
> > for each VM disk.
>
> I suppose there's nothing that can really be done here, though it
> doesn't seem like a huge ordeal to allow a user to configure a VM image
> as being raw/qcow2.
>
>
> If anything, I could see a PVC annotation as a nice place to store such
> a format designator. It's a solvable problem but I would still like to
> understand the specific use cases that people are targeting with qcow2
> so that we can consider if kubernetes offers a way to provide this
> without creating virtual machine specific features. A major goal of
> kubevirt is to remain kubernetes-native and to provide a converged
> infrastructure for running VMs and containers.
>
I'm in the same boat -- just trying to understand the use cases and the
demands out there. I just want to understand the problems that the
format poses for you in practice so I can have that in mind as I assess
the use cases and user stories. Nothing more, nothing less O:-)
AFAIUI the major user story is simply:
- I am using kubevirt and I want to use pre-made VM images distributed
as qcow2.
And this can be solved by converting these images on import through
various means, as already addressed in this thread. Actually using them
at runtime is a different story, and the demands for that are not
immediately clear to me at present.
> > * Qcow2 metadata overhead is non-deterministic and reduces the
> amount
> > of usable space on the PVC
>
> I suppose the non-deterministic attributes being referenced here are
> when you are using things like snapshots and incremental backups and
> so on.
>
>
> Yes, but even just allocation of the image causes overhead since qemu
> needs to implement a block indexing data structure in the image file.
>
If you didn't pre-allocate the metadata, yes.
> > * We do not want to rely on qcow2 features (such as qcow2 snapshots
> > and backing chains) because they tightly couple the compute
> layer to
> > the storage layer.
>
> What's the vision for offering these features, if any?
>
>
> Snapshots should be provided by the CSI storage drivers and be triggered
> via the kubernetes APIs. This enables storage drivers to optimize the
> performance and storage requirements of snapshots and also keeps
> containerized workloads and vms converged so that integration with other
> systems such as cluster backup and replication are seamless. The same
> can be said with respect to encryption. Changed-block tracking will be
> more difficult but this feature is desired for containerized workloads
> as well. It will be best to work in the CSI and kubernetes storage SIG
> to push these priorities.
>
> There's increasing awareness at the QEMU developer level that we cannot
> expect large distributed systems to rely on e.g. qcow2, but I am not
> sure there's a cohesive vision of how to manage that going forward.
>
> I know Alice had done some work into investigating the marriage of qemu
> storage daemon and CSI, but in my limited knowledge only recall that
> someone else was working on a different angle for the same/similar
> problems.
>
> What's the latest news?
>
>
> +Alice Frosi <mailto:
afr...@redhat.com> to give a more technical answer
> regarding QSD. From my point of view, qemu has some really useful
> software-defined storage features and these can be broken out from the
> virtualization part of qemu and exposed via a CSI driver. This is
> exactly what the QSD research is designed to prove. Right now we are
> searching for the best use cases to implement. It seems that QSD may
> provide a short to medium term solution to VMs only, whereas the real
> answer is to provide features that work equally well for containers and VMs.
>
Sure. What features do we need, and what level should they be
implemented at long-term? It's not clear to me immediately what the
perceived shortcomings are if qcow2 is taken out of the mix.
I imagine the big features of qcow2 are:
- Filesystem independent sparseness
- Forking snapshots
- Deduplication (shared read-only base images)
- CBT/Incremental/Differential Backups
which ones remain important to address for kubevirt or kubernetes as a
whole?
--js