While HashiCorp plays license roulette, Virter rolls out to rescue FOSS VM testing
(2024/09/20)
- Reference: 1726827307
- News link: https://www.theregister.co.uk/2024/09/20/virter_simpler_test_vms/
- Source link:
Open Source Summit Europe 2024 Virter is a useful little tool if you often create – and then remove – VMs to try stuff. It's arguably carried on the ripples from HashiCorp dropping the BSL into the FOSS pond.
This year's Open Source Summit Europe was in Vienna, which as the The Reg FOSS desk arrived was stricken with storms and flooding, as was much of central Europe last weekend. The whirring server farms of the cryptocurrency fans and LLM hucksters are making matters worse in this department.
A very prominent presence at this year's event was [1]the new Redis fork Valkey , which resulted from [2]Redis changing its license terms back in March – as it happens, during [3]KubeCon Europe , according to Valkey developer Madelyn Olson in the [4]talk on the new project .
[5]
But Valkey isn't the only such fork of a newly relicensed product, and Redis is far from the only company making such radical changes. The year before, [6]HashiCorp also changed licenses , which among other things led to the OpenTofu fork of HashiCorp's Terraform – whose adoption by the Linux Foundation was [7]announced at last year's OSS EU . It was also followed by [8]IBM acquiring HashiCorp .
[9]
[10]
Terraform isn't the only thing HashiCorp offered, though. Its [11]first product was Vagrant , which we [12]looked at in 2022 . Vagrant is a handy command-line tool that lets you create, run, configure, and connect to a new VM containing a choice of OSes – and, once you've tested your code, quickly remove them again. Vagrant used to be FOSS, and it was included in most major Linux distributions' repositories – but it's not anymore. Now it, too, is source-available, [13]under the BSL .
That brings us to the new [14]Virter tool , which was [15]presented by one of its developers, Christoph Böhmwalder at this year's OSS EU. He described it as "Docker for VMs."
[16]
What Virter does is really quite similar to Vagrant. It's a single binary that hugely simplifies the process of handling Linux VMs for software testing. It's not a direct replacement, but it does the same sort of things, and shares the same goals: making the process as simple and quick as possible. Vagrant defaults to using VirtualBox for its VMs. It's a solid choice: VirtualBox is easy, FOSS, and runs – and runs on – almost anything. This does mean that it's not a native part of the Linux OS, though, and in Böhmwalder's words, "it does weird things with the Linux network stack."
Users can configure Vagrant to use other hypervisors, but that rather misses the point of a tool that's designed to simplify the process.
[17]Redis justifies open source shift with fresh hardware, LLM cost-saving features
[18]CockroachDB scuttles away from open source Core offering
[19]OpenTofu hits version 1.8 with more crowd-pleasing features
[20]FTC probes IBM's $6.4B HashiCorp takeover
Virter builds on the existing standard Linux tooling to manage VMs instead. Via the libvirt library, it calls QEMU to create virtual machines, runs them using KVM, and configures them using cloud-init . These tools are noticeably more complex and fiddly than VirtualBox, so placing a wrapper around them to simplify matters is welcome. Böhmwalder pointed out there are other, similar tools out there as well as Vagrant, such as [21]Canonical's Multipass if you only need Ubuntu VMs.
Creating a new VM can be as simple as one command: virter vm run --name alma-8-hello --id 100 --wait-ssh alma-8
The name is self-explanatory. The numerical id you use becomes the last octet of its IP address, so in this case it could be 192.168.0.100 (depending on your network config, of course). You can connect to VMs by name or by ID, pull qcow2 disk images in advance to make things faster, and even layer images on top of each other, Docker-style. There's lots more info and examples in his [22]slide deck [PDF].
Although Virter is quite new – it's only up to version 0.27.0 at the time of writing – Böhmwalder's company [23]LINBIT is already using it to run automated tests on tens of thousands of instances every day.
Virter also has accompanying tools of its own, such as [24]vmshed . The name was originally a typo, but now the team refers to it as a "shed for storing your VMs," it's really more of a tool for automating tests, defined using [25]TOML files , on fleets of VMs.
[26]
Virter isn't a fork of Vagrant, and it's not even a direct response. It's rather an alternative, using existing and more Linux-standard tooling, which does much the same job. But with Vagrant disappearing from distro repos due to the BSL, it may be that Virter is poised to take its place. In the meantime, you can just download and run it directly from GitHub. ®
Get our [27]Tech Resources
[1] https://www.theregister.com/2024/06/19/valkey_picks_up_more_partners/
[2] https://www.theregister.com/2024/03/22/redis_changes_license/
[3] https://events.linuxfoundation.org/archive/2024/kubecon-cloudnativecon-europe/
[4] https://osseu2024.sched.com/event/1ej4w/you-never-know-when-you-need-a-fork-madelyn-olson-aws-viktor-soderqvist-ericsson
[5] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/devops&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=2&c=2Zu2cJX4CIMJCZT2--fmV1wAAAgA&t=ct%3Dns%26unitnum%3D2%26raptor%3Dcondor%26pos%3Dtop%26test%3D0
[6] https://www.theregister.com/2023/08/11/hashicorp_bsl_licence/
[7] https://www.theregister.com/2023/09/20/terraform_fork_opentf_opentofu/
[8] https://www.theregister.com/2024/04/25/ibm_q1_2024/
[9] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/devops&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44Zu2cJX4CIMJCZT2--fmV1wAAAgA&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0
[10] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/devops&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=3&c=33Zu2cJX4CIMJCZT2--fmV1wAAAgA&t=ct%3Dns%26unitnum%3D3%26raptor%3Deagle%26pos%3Dmid%26test%3D0
[11] https://www.theregister.com/2020/06/23/hashicorp_cloud_platform/
[12] https://www.theregister.com/2022/05/31/distrobox_130_released/
[13] https://github.com/hashicorp/vagrant?tab=License-1-ov-file#readme
[14] https://github.com/LINBIT/virter
[15] https://osseu2024.sched.com/event/1jSMO/virter-how-the-docker-for-vms-can-help-you-test-the-linux-kernel-christoph-bohmwalder-linbit-ha-solutions-gmbh
[16] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/devops&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44Zu2cJX4CIMJCZT2--fmV1wAAAgA&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0
[17] https://www.theregister.com/2024/09/12/redis_justifies_open_source_shift/
[18] https://www.theregister.com/2024/08/19/cockroachdb_abandons_open_core/
[19] https://www.theregister.com/2024/07/31/opentofu_version_18/
[20] https://www.theregister.com/2024/07/15/ftc_ibms_hashicorp/
[21] https://multipass.run/
[22] https://static.sched.com/hosted_files/osseu2024/c0/Virter.pdf
[23] https://linbit.com/about-us/
[24] https://github.com/LINBIT/vmshed
[25] https://toml.io/en/
[26] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/devops&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=3&c=33Zu2cJX4CIMJCZT2--fmV1wAAAgA&t=ct%3Dns%26unitnum%3D3%26raptor%3Deagle%26pos%3Dmid%26test%3D0
[27] https://whitepapers.theregister.com/
This year's Open Source Summit Europe was in Vienna, which as the The Reg FOSS desk arrived was stricken with storms and flooding, as was much of central Europe last weekend. The whirring server farms of the cryptocurrency fans and LLM hucksters are making matters worse in this department.
A very prominent presence at this year's event was [1]the new Redis fork Valkey , which resulted from [2]Redis changing its license terms back in March – as it happens, during [3]KubeCon Europe , according to Valkey developer Madelyn Olson in the [4]talk on the new project .
[5]
But Valkey isn't the only such fork of a newly relicensed product, and Redis is far from the only company making such radical changes. The year before, [6]HashiCorp also changed licenses , which among other things led to the OpenTofu fork of HashiCorp's Terraform – whose adoption by the Linux Foundation was [7]announced at last year's OSS EU . It was also followed by [8]IBM acquiring HashiCorp .
[9]
[10]
Terraform isn't the only thing HashiCorp offered, though. Its [11]first product was Vagrant , which we [12]looked at in 2022 . Vagrant is a handy command-line tool that lets you create, run, configure, and connect to a new VM containing a choice of OSes – and, once you've tested your code, quickly remove them again. Vagrant used to be FOSS, and it was included in most major Linux distributions' repositories – but it's not anymore. Now it, too, is source-available, [13]under the BSL .
That brings us to the new [14]Virter tool , which was [15]presented by one of its developers, Christoph Böhmwalder at this year's OSS EU. He described it as "Docker for VMs."
[16]
What Virter does is really quite similar to Vagrant. It's a single binary that hugely simplifies the process of handling Linux VMs for software testing. It's not a direct replacement, but it does the same sort of things, and shares the same goals: making the process as simple and quick as possible. Vagrant defaults to using VirtualBox for its VMs. It's a solid choice: VirtualBox is easy, FOSS, and runs – and runs on – almost anything. This does mean that it's not a native part of the Linux OS, though, and in Böhmwalder's words, "it does weird things with the Linux network stack."
Users can configure Vagrant to use other hypervisors, but that rather misses the point of a tool that's designed to simplify the process.
[17]Redis justifies open source shift with fresh hardware, LLM cost-saving features
[18]CockroachDB scuttles away from open source Core offering
[19]OpenTofu hits version 1.8 with more crowd-pleasing features
[20]FTC probes IBM's $6.4B HashiCorp takeover
Virter builds on the existing standard Linux tooling to manage VMs instead. Via the libvirt library, it calls QEMU to create virtual machines, runs them using KVM, and configures them using cloud-init . These tools are noticeably more complex and fiddly than VirtualBox, so placing a wrapper around them to simplify matters is welcome. Böhmwalder pointed out there are other, similar tools out there as well as Vagrant, such as [21]Canonical's Multipass if you only need Ubuntu VMs.
Creating a new VM can be as simple as one command: virter vm run --name alma-8-hello --id 100 --wait-ssh alma-8
The name is self-explanatory. The numerical id you use becomes the last octet of its IP address, so in this case it could be 192.168.0.100 (depending on your network config, of course). You can connect to VMs by name or by ID, pull qcow2 disk images in advance to make things faster, and even layer images on top of each other, Docker-style. There's lots more info and examples in his [22]slide deck [PDF].
Although Virter is quite new – it's only up to version 0.27.0 at the time of writing – Böhmwalder's company [23]LINBIT is already using it to run automated tests on tens of thousands of instances every day.
Virter also has accompanying tools of its own, such as [24]vmshed . The name was originally a typo, but now the team refers to it as a "shed for storing your VMs," it's really more of a tool for automating tests, defined using [25]TOML files , on fleets of VMs.
[26]
Virter isn't a fork of Vagrant, and it's not even a direct response. It's rather an alternative, using existing and more Linux-standard tooling, which does much the same job. But with Vagrant disappearing from distro repos due to the BSL, it may be that Virter is poised to take its place. In the meantime, you can just download and run it directly from GitHub. ®
Get our [27]Tech Resources
[1] https://www.theregister.com/2024/06/19/valkey_picks_up_more_partners/
[2] https://www.theregister.com/2024/03/22/redis_changes_license/
[3] https://events.linuxfoundation.org/archive/2024/kubecon-cloudnativecon-europe/
[4] https://osseu2024.sched.com/event/1ej4w/you-never-know-when-you-need-a-fork-madelyn-olson-aws-viktor-soderqvist-ericsson
[5] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/devops&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=2&c=2Zu2cJX4CIMJCZT2--fmV1wAAAgA&t=ct%3Dns%26unitnum%3D2%26raptor%3Dcondor%26pos%3Dtop%26test%3D0
[6] https://www.theregister.com/2023/08/11/hashicorp_bsl_licence/
[7] https://www.theregister.com/2023/09/20/terraform_fork_opentf_opentofu/
[8] https://www.theregister.com/2024/04/25/ibm_q1_2024/
[9] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/devops&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44Zu2cJX4CIMJCZT2--fmV1wAAAgA&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0
[10] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/devops&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=3&c=33Zu2cJX4CIMJCZT2--fmV1wAAAgA&t=ct%3Dns%26unitnum%3D3%26raptor%3Deagle%26pos%3Dmid%26test%3D0
[11] https://www.theregister.com/2020/06/23/hashicorp_cloud_platform/
[12] https://www.theregister.com/2022/05/31/distrobox_130_released/
[13] https://github.com/hashicorp/vagrant?tab=License-1-ov-file#readme
[14] https://github.com/LINBIT/virter
[15] https://osseu2024.sched.com/event/1jSMO/virter-how-the-docker-for-vms-can-help-you-test-the-linux-kernel-christoph-bohmwalder-linbit-ha-solutions-gmbh
[16] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/devops&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44Zu2cJX4CIMJCZT2--fmV1wAAAgA&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0
[17] https://www.theregister.com/2024/09/12/redis_justifies_open_source_shift/
[18] https://www.theregister.com/2024/08/19/cockroachdb_abandons_open_core/
[19] https://www.theregister.com/2024/07/31/opentofu_version_18/
[20] https://www.theregister.com/2024/07/15/ftc_ibms_hashicorp/
[21] https://multipass.run/
[22] https://static.sched.com/hosted_files/osseu2024/c0/Virter.pdf
[23] https://linbit.com/about-us/
[24] https://github.com/LINBIT/vmshed
[25] https://toml.io/en/
[26] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/devops&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=3&c=33Zu2cJX4CIMJCZT2--fmV1wAAAgA&t=ct%3Dns%26unitnum%3D3%26raptor%3Deagle%26pos%3Dmid%26test%3D0
[27] https://whitepapers.theregister.com/
Re: VMM
Anonymous Coward
Not exactly on the topic of Virter, but this is an excellent overview of VB and KVM. Have a well deserved upvote.
VMM
I used Virtual Box for years, but have recently switched to KVM. I used both for automated testing of software.
Both have GUIs for creating and managing the VMs, and both have command line tools which can do everything the GUI can plus a great deal more. I generally use the GUI to setup the VMs, do some initial testing of the VMs, and to debug my automated testing set up. I use the command line tools to script all of the actual software testing.
As to how they compare, I found both to be roughly equivalent for what I use them for, although KVM seems to be better maintained as a project than VB has been lately (things would stop working after an update and Oracle would take a long time to issue a fix).
I don't know the name of the VB GUI, but the one for KVM is called Virtual Machine Manager (VMM). I use only a fraction of the features in the VB GUI, but everything that I wanted from the GUI was there.
KVM VMM has fewer features, which is a plus and minus. From a plus perspective it means that I was able to figure it out fairly quickly, as the number of options is much more limited. On the minus side is that VMM doesn't create or delete snapshots in the GUI itself, you have to do that from the command line. However, that has not turned out to be a big deal so far.
With VB you can give snapshots a meaningful name, while with KVM they're simply a random integer. While the meaningful names were nice to have in VB, so far the lack of them hasn't been a big deal with KVM.
The story mentions networking. My test scripts SSH into each VM as it is running to run the tests on the software under development. The default way that VB does networking (localhost plus port) results in some rather unusual address formats and a bit of going over the ssh man pages to figure out how to use it. It also means that the address format for VMs is different from the address format for actual hardware over the network.
With KVM I installed the optional "libnss" and found that addressing VMs is done by default in the normal way the same as for actual hardware.
It may be possible that VB can be made to work the same as KVM in this respect, but you need to be a networking expert to stray away from the defaults for either as neither one documents this area very well. They just assume that you know lots about network stacks and can figure it out for yourself. When I started using VirtualBox however I was too busy to spend the time to deviate from the defaults, and when I got things working it was less painful to just leave it as is than to change everything. With KVM I just installed libnss and everything just worked the way it ought to.
I test using all the major Linux distros, BSD, and Windows, so I have plenty of experience installing them in VMs. I've looked at both Vagrant and Virter, and didn't really see any advantage to using them. Things may be different if I were responsible for setting up and managing VMs for large development teams for multiple projects. You really have to dig into how you would use them in your particular application to see if they really offer any advantage.
As for vmshed, so far as I can see it's meant for testing the VMs themselves, as opposed to just using the VMs to test software applications. If you are managing a project like Virter then you probably need vmshed. I don't think the way it works however is suitable for normal application testing. So far I haven't seen anything useful for running application unit tests on a combination of VMs and actual hardware that is suited to being hosted on a regular desktop for use by a single developer or small team (as opposed to cloud services). I have my own custom solution that works in my use case.