[This article expands on what I wrote here.]
I’ve been asked a few times if there is a standard for describing or inspecting virtual machines. Or conversely, should virt-inspector produce Enterprise Standard XML and not the ad-hoc XML that it produces right now?
Consider first what does “operating system version” mean? “Fedora 14” — what does that mean? It could mean a “class” of operating systems, waiting to be installed. Or perhaps it means a particular installed instance, together with all the configuration tweaks made by the administrator? Or perhaps you mean a bare installation before configuration (what the cool kids are now calling “JEOS”).
For a class of operating systems, before installation, what you would like to know includes:
- kernel type (“linux”)
- operating system name (“Fedora”)
- operating system version (“14”)
- install location
- how to download and install it
- do installed versions need licensing, like Windows Activation or RHN subs?
- what preferred devices should we expose to new instances? (eg. does this have drivers for virtio, or should we expose some legacy devices?)
- minimum and recommended resources (RAM, disk space etc)
There is no comprehensive store of this data at the moment, although virt-install hard-codes some of it. So does VMware.
An installed instance of an OS is quite different. You’d like to know:
- what configuration changes were made?
- what applications are installed?
- what device drivers does it expect?
- what’s the state of critical security fixes?
and more. virt-inspector covers some of this. It also crosses over with inventory management standards like the impenetrable CIM. It also enters configuration management territory, so tools like puppet, kickstart and cfengine are applicable.
A running OS contains even more information beyond what is in the disk image:
- how many vCPUs?
- how much RAM
- what actual devices and resources?
Here we overlap with OVF, libvirt XML and more.
So there you have it: a difficult, multi-faceted, ill-defined problem with no easy answers.