Live data from Hacker News

Libvirt – The Unsung Hero of Cloud Computing (2013)

vyomtech.com

21–30 of 113 posts

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

#21
post #10

Earlier quoted context omitted.

What's wrong with XML?

Im sure there are better answers here but my main issue is that attributes and child elements offer duplicate functionality. You could have 4 5 or you could have . There is often no consistency within a single spec over how this should be done let alone between different specs. JSON feels much more logical to me as well as being a whole lot simpler. If only it supported comments.

Yeah, I agree. Though I usually view elements as data and attributes as metadata, but in practice the usage is all over the place.

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

#22
post #15
post #10

Earlier quoted context omitted.

What's wrong with XML?

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…

I presume JSON is less ambiguous and easier to validate and parse?

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

#23
post #8
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…

JSON is a bad configuration format simply for the fact that it doesn't support comments. Some parsers do but most don't. XML for all its verbosity and complexity at least has comments where I can quickly try out configuration changes without needing to save the old configuration somewhere else. Hell, even INI files had support for comments and were just as expressional as JSON. I wonder why we regressed in that regar…

Because JSON was designed explicitly not to be a config format but a serialization format. For configs, use JSON5. At leatst imo seems most sane config formats are json5 these days.

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

#24
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?

For those working in dynamic languages (JavaScript, Python, Perl, Ruby, etc.) JSON maps directly onto built-in language data types and structures making it trivial to work with.

With XML you usually end up needing custom code to convert to and from the parsed XML representation and the language's built-in data types and structures.

This is less of a concern for statically typed languages where you usually have to marshal data to and from your own structs/classes whether it's XML or JSON.

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

#25
Libvirt is really nice. For linux, I also recommend reading the man page of Qemu directly to learn more about internals, it helped me understand a lot. Of course you have to take care networking, disk management on your own but it can be really simple. https://linux.die.net/man/1/qemu-kvm

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

#26
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…

What makes you think it was libvirt instead of the Xen native xm / xl tools?

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

#27
If you haven't tried it, the "Virtual Machine Manager" GUI [1] is also surprisingly usable on Desktop Linux. I use it with both Windows and Linux images, and getting it to work with the usual guest extension niceties is straightforward.

From what I remember, getting VirtualBox or VMware to launch and run properly after a few months of automatic upgrades and not launching your images for a while was always kind of a gamble. With libvirt, everything just seems to work, and your images are just ready to go when you need them.

[1] https://virt-manager.org/

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

#28
post #27

If you haven't tried it, the "Virtual Machine Manager" GUI [1] is also surprisingly usable on Desktop Linux. I use it with both Windows and Linux images, and getting it to work with the usual guest extension niceties is straightforward. From what I remember, getting VirtualBox or VMware to launch and run properly after a few months of automatic upgrades and not launching your images for a while was always kind of a g…

>With libvirt, everything just seems to work

Strictly speaking, you have qemu to thank for that. libvirt is just a frontend for several hypervisors, including qemu (which is what typically used).

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

#29
post #27

If you haven't tried it, the "Virtual Machine Manager" GUI [1] is also surprisingly usable on Desktop Linux. I use it with both Windows and Linux images, and getting it to work with the usual guest extension niceties is straightforward. From what I remember, getting VirtualBox or VMware to launch and run properly after a few months of automatic upgrades and not launching your images for a while was always kind of a g…

>With libvirt, everything just seems to work Strictly speaking, you have qemu to thank for that. libvirt is just a frontend for several hypervisors, including qemu (which is what typically used).

Libvirt is also responsible for keeping the guest exactly the same after upgrades; a basic QEMU command line does not guarantee that the guest hardware remains the same when you upgrade to a newer version, while Libvirt uses the more complicated and less human-friendly options to ensure that.

Libvirt does a lot more for QEMU than for other hypervisors, so much that libvirtd's initial name was qemud.

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

#30
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…

> It’s also a bit misleading to characterize cloud providers as building on libvirt

Libvirt provides lifetime management for KVM virtual machines, including orchestration of live migration, setting up SELinux to ensure isolation between QEMU processes and cgroups to limit resource utilization, creating network interfaces and bridging them to host networking, and more. Any cloud provider that uses Openstack+KVM relies on Libvirt for all these tasks.

Post reply on HN