Hi Alice,
Thank you for this summary.
As you know, I have reservations about replacing our domain schema entirely with the libvirtxml structures.
KubeVirt keeps a minimalistic domain schema mainly because of two main reasons:
1. Memory consumption: KubeVirt periodically gets the domain XML from libvirt caches and passes it to virt-handler. The large number of additional fields would affect the virt-launcher's memory footprint (which we are trying to keep minimalistic), and would affect the virt-handler as it processes domain objects from all running VMs.
2. Feature support clarity: A full switch to libvirtxml might mislead advanced users into assuming KubeVirt supports all libvirt configurations. For example, adding a field like IO throttling would be enough to make it "just work".
However, it makes sense to use the libvirt-go-xml selectively in the places we are currently using.
That's my take on it.
Thanks,
VladikOn Tue, May 6, 2025 at 11:05 AM Alice Frosi <afr...@redhat.com> wrote:Hi everyone,I'd like to refresh an old topic which is still in our backlog [1] which, in my opinion, is important since from time to time it bites us. I would like to know if we truly want to switch from our scheme to libvirtxml structures.Many reasons have been provided in the upstream issue, but let me summarize and refresh them:
- The golang parser for the XML loses values if they aren't defined in the schema structures. We used this mechanism as a "filter" for the fields we are interested in. This causes the problem then after we wonder where we lost them. Some recent example [2]
- It is a reliable API for the information that we get from libvirt and we already use it in multiple places
- When we need to change a field in the migration XML [3]
- For sidecars [4]
- For the node labeler [5]
The fact that we transfer the domain from the launcher to the handler and that many fields are unnecessary were among the arguments made against the use of libvirtxml. We could take advantage of the opportunity to improve the way that the launcher/libvirt and the launcher/handler communicate. A new, lighterway API might enhance the launcher-handler communication, while libvirtxml might serve as the interface with libvirt.However, libvirtxml has a problem that needs to be fixed before KubeVirt can use it. Libvirtxml structures do not define DeepCopy and DeepEqual. To support this, some effort would be needed. This is the rationale behind bringing up the subject once more. Would we be open to replacing the schema with libvirtxml? If so, we might be able to defend extending libvirtxml to include those methods.Many thanks,Alice
--
You received this message because you are subscribed to the Google Groups "kubevirt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubevirt-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/kubevirt-dev/CAOTosK%2BT%2Bj15KrcmgQWWXGGqH79TJG0KWY_WivtOmTGjfgcqzw%40mail.gmail.com.
On Tue, May 6, 2025 at 8:56 AM 'Vladik Romanovsky' via kubevirt-dev <kubevi...@googlegroups.com> wrote:Hi Alice,
Thank you for this summary.
As you know, I have reservations about replacing our domain schema entirely with the libvirtxml structures.
KubeVirt keeps a minimalistic domain schema mainly because of two main reasons:
1. Memory consumption: KubeVirt periodically gets the domain XML from libvirt caches and passes it to virt-handler. The large number of additional fields would affect the virt-launcher's memory footprint (which we are trying to keep minimalistic), and would affect the virt-handler as it processes domain objects from all running VMs.
2. Feature support clarity: A full switch to libvirtxml might mislead advanced users into assuming KubeVirt supports all libvirt configurations. For example, adding a field like IO throttling would be enough to make it "just work".(2) was also always my take on the other recurring requests to replace it. If I add new features, adding a few fields is really not the issue, but having a very clear understanding of what we use and what we don't is really valuable imo :)
On Tue, May 6, 2025 at 8:58 AM Roman Mohr <rm...@google.com> wrote:On Tue, May 6, 2025 at 8:56 AM 'Vladik Romanovsky' via kubevirt-dev <kubevi...@googlegroups.com> wrote:Hi Alice,
Thank you for this summary.
As you know, I have reservations about replacing our domain schema entirely with the libvirtxml structures.
KubeVirt keeps a minimalistic domain schema mainly because of two main reasons:
1. Memory consumption: KubeVirt periodically gets the domain XML from libvirt caches and passes it to virt-handler. The large number of additional fields would affect the virt-launcher's memory footprint (which we are trying to keep minimalistic), and would affect the virt-handler as it processes domain objects from all running VMs.
2. Feature support clarity: A full switch to libvirtxml might mislead advanced users into assuming KubeVirt supports all libvirt configurations. For example, adding a field like IO throttling would be enough to make it "just work".(2) was also always my take on the other recurring requests to replace it. If I add new features, adding a few fields is really not the issue, but having a very clear understanding of what we use and what we don't is really valuable imo :)However, after checking the attached issues, there may indeed be some benefit in replacing it. How big does the xml get?
On Tue, May 6, 2025 at 8:56 AM 'Vladik Romanovsky' via kubevirt-dev <kubevi...@googlegroups.com> wrote:Hi Alice,
Thank you for this summary.
As you know, I have reservations about replacing our domain schema entirely with the libvirtxml structures.
KubeVirt keeps a minimalistic domain schema mainly because of two main reasons:
1. Memory consumption: KubeVirt periodically gets the domain XML from libvirt caches and passes it to virt-handler. The large number of additional fields would affect the virt-launcher's memory footprint (which we are trying to keep minimalistic), and would affect the virt-handler as it processes domain objects from all running VMs.
2. Feature support clarity: A full switch to libvirtxml might mislead advanced users into assuming KubeVirt supports all libvirt configurations. For example, adding a field like IO throttling would be enough to make it "just work".(2) was also always my take on the other recurring requests to replace it. If I add new features, adding a few fields is really not the issue, but having a very clear understanding of what we use and what we don't is really valuable imo :)However, after checking the attached issues, there may indeed be some benefit in replacing it. How big does the xml get?
On Tue, May 6, 2025 at 6:03 PM Roman Mohr <rm...@google.com> wrote:On Tue, May 6, 2025 at 8:58 AM Roman Mohr <rm...@google.com> wrote:On Tue, May 6, 2025 at 8:56 AM 'Vladik Romanovsky' via kubevirt-dev <kubevi...@googlegroups.com> wrote:Hi Alice,
Thank you for this summary.
As you know, I have reservations about replacing our domain schema entirely with the libvirtxml structures.
KubeVirt keeps a minimalistic domain schema mainly because of two main reasons:
1. Memory consumption: KubeVirt periodically gets the domain XML from libvirt caches and passes it to virt-handler. The large number of additional fields would affect the virt-launcher's memory footprint (which we are trying to keep minimalistic), and would affect the virt-handler as it processes domain objects from all running VMs.
2. Feature support clarity: A full switch to libvirtxml might mislead advanced users into assuming KubeVirt supports all libvirt configurations. For example, adding a field like IO throttling would be enough to make it "just work".(2) was also always my take on the other recurring requests to replace it. If I add new features, adding a few fields is really not the issue, but having a very clear understanding of what we use and what we don't is really valuable imo :)However, after checking the attached issues, there may indeed be some benefit in replacing it. How big does the xml get?For example, all controllers are expanded. It can get pretty large, depending on the configuration.One of the issues is that the expanded size is not in the hands of KubeVirt.Before we move forward, I would like to understand what is the memory impact on the virt-launcher and virt-handler.
To view this discussion visit https://groups.google.com/d/msgid/kubevirt-dev/CA%2BNAZzwbsxJ1A465nQ2DT73VkpGa%3DNobXWOCi%2BvfVH7-CLbRVg%40mail.gmail.com.
Hey Alice,From my side, I would like to understand the memory usage impact on the virt-launcher and the virt-handler first.