Virter – Cloud Image Virtual Machines on Your Workstation

cloud image Virtual Machines on your workstation

Virtual machines on your workstation

At LINBIT we like tools that are simple, convenient, and integrated. Managing virtual machines (VMs) for development and automated testing was a messy, complicated task. We did not have an appropriate tool for the job. So we created one. Virter is a tool that allows you to conveniently work with VMs. You can provision images and start VMs with single line commands. It takes an opinionated approach, providing sensible defaults to keep the usage as simple as possible. Virter relies on established technologies such as libvirt and cloud-init to perform the real work, which keeps it lightweight. As a result of the cloud-init integration, Virter images are just standard cloud images. These are provided by the most popular distributions. Imagine you want to try something out on a specific Linux distribution. One simple command, and the VM is running and ready for you to interact with. That’s it. Or perhaps you need clusters of VMs for testing, with some common software installed on each. The first command builds an image with the software installed. The second command starts a cluster from this image. Each VM is a clone from the original image. This is what Virter is for. Virter screencast

Who is this for?

Thus far Virter has proved very useful for development and automated testing. It is most valuable when working on a software component that is deeply integrated into the OS, in particular into the kernel. In this situation, it is impractical to run the software directly on your development machine and impossible to use containers for development and testing. At LINBIT this is important because DRBD is at the core of what we do. DRBD is a kernel module, so testing in VMs is a natural fit. Using Virter, we can easily test with a wide variety of distributions and kernels. It is even possible to use VMs to test against hardware that your machine does not have. For instance, much of the development of DRBD’s persistent memory support used this approach.

How is this different from X?

The project with the most similar goals to Virter is Vagrant. Virter’s main advantages over Vagrant are:
  • Single binary without dependencies like Ruby gems
  • First class libvirt integration
  • Fast and efficient image provisioning based on chains of backing images; this allows cloned VMs to be easily created
  • Usage of standard cloud images
There are various other tools available which also have similar goals to Virter. Each has its own strengths and use cases. See these comparisons for how Virter is similar to and different from other tools.

Technical architecture

From a technical perspective, Virter is an opinionated command line interface for libvirt. It leverages cloud-init to start virtual machines with minimal configuration required by the user. It gives you the power of libvirt VMs without having to step through any installers. Via cloud-init, the basic necessities are set up to allow SSH access. An effective way to use Virter is to define images using provisioning files. You then create virtual machines for a specific purpose when you need them. This makes the process essentially reproducible. In addition this makes it possible to start many cloned VMs from one image. Without this tool, there is a tendency to maintain a set of VMs and gradually adapt them over time. This continues until you no longer have a clear understanding of your test environment.

Project status

The Virter project is about one year old. It still carries a 0.x version, indicating that the interface may change incompatibly between versions. That said, it is becoming quite stable. Virter is already used at scale, and various causes of unreliability have been ironed out. At LINBIT, Virter is used to start around 10000 virtual machines every day as part of our automated testing. Virter does not form part of LINBIT’s supported software offering. It is simply a tool that we use and have made available as an open source project.

Getting started

Follow the README here.
Share on facebook
Share on twitter
Share on linkedin
Share on reddit
Share on whatsapp
Share on vk
Share on email

Share this post

Joel Colledge

Joel Colledge

Joel is a software developer at LINBIT with a background in mathematics. A polyglot programmer, Joel enjoys working with many different languages and technologies. At LINBIT, he has been involved in the development of LINSTOR and DRBD. Originally from England, Joel is now based in Vienna, Austria.

Talk to us

LINBIT is committed to protecting and respecting your privacy, and we’ll only use your personal information to administer your account and to provide the products and services you requested from us. From time to time, we would like to contact you about our products and services, as well as other content that may be of interest to you. If you consent to us contacting you for this purpose, please tick above to say how you would like us to contact you.

You can unsubscribe from these communications at any time. For more information on how to unsubscribe, our privacy practices, and how we are committed to protecting and respecting your privacy, please review our Privacy Policy.

By clicking submit below, you consent to allow LINBIT to store and process the personal information submitted above to provide you the content requested.

Talk to us

LINBIT is committed to protecting and respecting your privacy, and we’ll only use your personal information to administer your account and to provide the products and services you requested from us. From time to time, we would like to contact you about our products and services, as well as other content that may be of interest to you. If you consent to us contacting you for this purpose, please tick above to say how you would like us to contact you.

You can unsubscribe from these communications at any time. For more information on how to unsubscribe, our privacy practices, and how we are committed to protecting and respecting your privacy, please review our Privacy Policy.

By clicking submit below, you consent to allow LINBIT to store and process the personal information submitted above to provide you the content requested.