This report is based on my experiences as a system engineer, who learned a sensible way to run small to large infrastructures: Consistent.

Appeal

Treat virtual machines like hardware - this is an appeal to everyone in the virtualisation area (providers, vendors, sysadmins, name it).

Before I go into detail, let me first explain you the situation.

Once upon a time...

... virtualisation was new and slow. qemu was the only emulator that was kind of usable. Slow, but working. Then, some time later, the CPU vendors began to add support for virtualisation in hardware and soon virtual machines were kind of running smoothly. Xen and VMWare appeared and took their share in the market, while qemu had its closed source driver, kqemu.

Then light virtualisation began its time with software like User-mode linux and OpenVZ. All of sudden somebody propagated the buzzword cloud and with it the use of virtualisation spread, as well as the problem I am adressing in this article:

Virtualisation is treated differently to hardware

With mass building virtual machines, new problems have risen: How to manage those virtual machines? How to manage the networks? What about their IP addresses? Where to store, define and assign them? What are the virtual properties of the VM? How many disks, how much memory and how many cpu (cores) are utilised? To solve these problems, specialised tools like libvirt, openstack and many other are deployed. Problem solved?

Problem created: (D)RY

Interestingly, au contraire de common belief, with inventing tools specific to virtualisation management, new problems have been created: The domain specific tools can only be used for management of VMs (sic!) and thus require the sysadmin to learn a new tool with different characteristics from existing tools to manage hardware (I am excluding the effort to run and maintain a second tool, because I assume in a automated environment this is negligible).

So instead of using the existing tools, the DRY principle was violated. You may claim that virtual machines are different from hardware and thus require a different utility, but ...

... Virtual machines are made to closely resemble hardare

Indeed, the idea of virtual machines is that a virtual machine should behave like its hardware equivalent. As such I postulate

Treat virtual machines like real machines

Some of you may now be wondering, ...

... How to treat VMs and hardware the same

In my opinion (I believe in the Kiss principle), managing large scale infrastructures can be as easy as managing small infrastructures - given you take the right approach. From a technical point of view, to manage an infrastucture you need

  • an inventory management tool (like cinv) that
    • is the central tool to record all your hosts
    • defines IP address mapppings (mac<->ip, f.i. DHCP and ip<->name, like DNS)
    • assists you with lifecycle management of your hosts
  • a configuration management system (like cdist) that
    • realises your centrally defined configurations
    • manages all your configurations (including VMs!)

Summary

So why treat virtual machines like hardware? Because they can easily be managed the same way and they are supposed to very very similar. We at ungleich take this approach for every infrastructure of our customers and so far succeed very well with this approach. We do in fact eat our own dogfood and manage the inventories of our customers (HW and VM!) with cinv and configure their infrastructures with cdist. To support multiple customers, we keep their configurations under version control in different branches using git (Logically cdist and cdist don't support this, because git can do it much better - we follow the UNIX philosophy when developing software).

Future

There is a lot of work going on at ungleich in the area of virtualisation using cdist and cinv. We plan to publish more [!!cdistexamples]] and documentation about this soon - so stay tuned if you are interested in seeing the world's simplest virtualisation infrastructure [tm] soon.