Live data from Hacker News

Libvirt – The Unsung Hero of Cloud Computing (2013)

vyomtech.com

81–90 of 113 posts

Re: Libvirt – The Unsung Hero of Cloud Computing (2013)

#81
post #31

We're currently migrating from VMware to libvirt, we discovered the cockpit project and cockpit-machines to manage VMs: https://cockpit-project.org/ cockpit-machines is available in a recent version in debian backports, installing it is trivial, no configuration, https://hostname:9090/ and just works. RedHat announced that cockpit will be the long term successor of virt-manager: https://www.redhat.com/en/blog/managin…

The main issue with virt-manager is that it's a desktop application and you can't really collaborate with others when managing infrastructure.

Cockpit solves this issue. The feature set in slightly different but mainly it is limited as to what you can manage.

When running different types of infrastructure at the same time, e.g. KVM + AWS + Azure + ... it won't help much. In such cases it would make sense to check out Mist (https://github.com/mistio/mist-ce), which does something similar to Cockpit but for ~20 infra techs.

Re: Libvirt – The Unsung Hero of Cloud Computing (2013)

#82
post #31

We're currently migrating from VMware to libvirt, we discovered the cockpit project and cockpit-machines to manage VMs: https://cockpit-project.org/ cockpit-machines is available in a recent version in debian backports, installing it is trivial, no configuration, https://hostname:9090/ and just works. RedHat announced that cockpit will be the long term successor of virt-manager: https://www.redhat.com/en/blog/managin…

What software do you use to back up the virtual machines?

Re: Libvirt – The Unsung Hero of Cloud Computing (2013)

#83
post #31

We're currently migrating from VMware to libvirt, we discovered the cockpit project and cockpit-machines to manage VMs: https://cockpit-project.org/ cockpit-machines is available in a recent version in debian backports, installing it is trivial, no configuration, https://hostname:9090/ and just works. RedHat announced that cockpit will be the long term successor of virt-manager: https://www.redhat.com/en/blog/managin…

The main issue with virt-manager is that it's a desktop application and you can't really collaborate with others when managing infrastructure. Cockpit solves this issue. The feature set in slightly different but mainly it is limited as to what you can manage. When running different types of infrastructure at the same time, e.g. KVM + AWS + Azure + ... it won't help much. In such cases it would make sense to check out…

Virt-manager can connect simultaneously from many different terminals to many different libvirt servers. What do you mean by "you can't collaborate with others"?

Re: Libvirt – The Unsung Hero of Cloud Computing (2013)

#84
post #15

Earlier quoted context omitted.

I’ll start. Take an XML document. Validate it. Take all of the top level elements. Call getElementByID on each with the same value. Combine all the answers into an array, eliminating the nulls. You might expect that array to have length one or zero on all valid documents. You’d be wrong, and dangerously so for some XML schemas. You can use the same ID on every node and I don’t know of a parser that would balk at that…

Why aren'y you just using xpath? There are mature and powerful xpath libraries in all major languages. Of course if you use only one limited tool which was never meant to be the main manipulator of xml (getElementByID), then you'll run into problems. It is like never using regexp and complaining that simple strings are a bad data structure.

Xpath still uses the same broken DOM functions under the hood. Exact same outcome.

Re: Libvirt – The Unsung Hero of Cloud Computing (2013)

#85
post #10
post #3

While I respect the job that libvirt does (it works — high praise for software), it’s unfortunate that it is also the answer to the question “how can I represent all these virtualized things using XML?”, which was in fashion when libvirt was created. It’s also a bit misleading to characterize cloud providers as building on libvirt. Libvirt is useful as an mostly hypervisor-agnostic wrapper, which is super useful for…

What's wrong with XML?

XML can be used to represent data formats, but is missing things like types.

It's powerful enough to represent documents, which might be too much for data structures:

  This is valid XML
And let's not forget how hard it is to escape data in XML, so every value ends up as CDATA in the end.

  
    
  

Re: Libvirt – The Unsung Hero of Cloud Computing (2013)

#86
post #36
post #15

Earlier quoted context omitted.

I’ll start. Take an XML document. Validate it. Take all of the top level elements. Call getElementByID on each with the same value. Combine all the answers into an array, eliminating the nulls. You might expect that array to have length one or zero on all valid documents. You’d be wrong, and dangerously so for some XML schemas. You can use the same ID on every node and I don’t know of a parser that would balk at that…

If only you could specify in your schema that element must be unique. But wait a minute ! Actually, you can. That's what the unique attribute does. And here lies the main problem of XML. As a technology, it is better than its reputation. Sadly, next to no one knows how to use it properly.

You can’t specify that attributes are unique, which is why id is broken. And thus why XML DSIG, which uses id extensively, is exceedingly difficult to harden.

Re: Libvirt – The Unsung Hero of Cloud Computing (2013)

#87
post #15

Earlier quoted context omitted.

I’ll start. Take an XML document. Validate it. Take all of the top level elements. Call getElementByID on each with the same value. Combine all the answers into an array, eliminating the nulls. You might expect that array to have length one or zero on all valid documents. You’d be wrong, and dangerously so for some XML schemas. You can use the same ID on every node and I don’t know of a parser that would balk at that…

Never seen getElementByID being used for XML data (not somethinghtml)...

This is the one half of my bad experiences are associated with:

https://www.w3.org/TR/xmldsig-core/

Re: Libvirt – The Unsung Hero of Cloud Computing (2013)

#88
post #15

Earlier quoted context omitted.

I’ll start. Take an XML document. Validate it. Take all of the top level elements. Call getElementByID on each with the same value. Combine all the answers into an array, eliminating the nulls. You might expect that array to have length one or zero on all valid documents. You’d be wrong, and dangerously so for some XML schemas. You can use the same ID on every node and I don’t know of a parser that would balk at that…

Parent asked what's wrong with XML, not what's wrong with DOM. Does XML actually even define a special meaning for the `id` attribute?

The XML element object always has this function, in every implementation I’ve seen.

Re: Libvirt – The Unsung Hero of Cloud Computing (2013)

#89
post #2

I really doubt that AWS is using libvirt. They almost certainly have their own abstraction. But still, I agree that libvirt is great; I wrote about it here: http://catern.com/posts/libvirt.html

Might be true, but don’t see any open source work from Amazon in public domain which shows they built their own libraries from scratch to manage Xen and cloud management in early years from 2008. Indeed it’s 2020 and yet to see any major open source work from Amazon (which has benefited a lot from open source itself using Perl, CPAN, C, Java, Linux etc.). In this respect IBM, google, Microsoft, Facebook and Apple are…

Amazon has been open-sourcing a lot lately. Firecracker (microVM service), Bottlerocket (Linux designed for hosting containers), and they've been distributing OpenJDK builds.

Perhaps not as much as Microsoft (these days), but they are certainly giving back.

Re: Libvirt – The Unsung Hero of Cloud Computing (2013)

#90
post #42

Earlier quoted context omitted.

I actually _do_ do this quite often. Often w.r.t local changes (attaching network devices or storage devices). If you fire up `virsh edit ` you get a live view of the resource which can be updated in place. This is great to comment out some things and uncomment things for quick and dirty modifications. (some require a VM restart though).

That has to be a recent change, because editing the XML used to cause it to roundtrip through libvirt, which doesn't keep the XML DOM around; anything not in the internal C structs would be removed from the files, including all comments.

I’m not sure fully how it works internally I’m afraid. But I was doing this in 2013-2014 if that’s any indicator of timeframe.
Post reply on HN