The smart virtual machines manager. A modern CLI for Vagrant Boxes.

Build Status Go Report Card License

logo

The smart virtual machines manager

Table of Contents:


What is Vermin

Vermin is a smart, simple and powerful command line tool for Linux, Windows and macOS. It's designed for developers/testers and others working in IT who want a fresh VM environment with a single command. It uses VirtualBox to run the VM. Vermin will fetch images on your behalf.

You can look to Vermin as a modern CLI for Vagrant Boxes.

Vermin can be used when you need an easy way to obtain a Linux environment up and running in minutes.

Install Vermin

Vermin uses VirtualBox v6.0 or later as the underlying hypervisor to create and run Virtual Machines. So you need to download and install it first.

To install/update on macOS and Linux run:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/mhewedy/vermin/master/install.sh)"

To install/update on Windows (PowerShell) run:

# Should run as Administrator
iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/mhewedy/vermin/master/install.ps1'))

Usage:

Create, control and connect to VirtualBox VM instances

Usage:
  vermin [command]

Examples:

You can use vermin by creating a VM from an image.

To list all images available:
$ vermin images

Then you can create a vm using:
$ vermin create <image>


Available Commands:
  commit      Commit a VM into a new Image
  completion  Generates shell completion scripts
  cp          Copy files/folders between a VM and the local filesystem or between two VMs
  create      Create a new VM
  exec        Run a command in a running VM
  gui         open the GUI for the VM
  help        Help about any command
  hypervisor  print the name of the detected hypervisor
  images      List remote and cached images
  ip          Show IP address for a running VM
  mount       Mount local filesystem inside the VM
  port        Forward port(s) from a VM to host
  ps          List VMs
  restart     Restart one or more VMs
  rm          Remove one or more VM
  rmi         Remove one or more Image
  ssh         ssh into a running VM
  start       Start one or more stopped VMs
  stop        Stop one or more running VMs
  tag         Add or remove tag to a VM
  update      Update configuration of a VM

Flags:
  -h, --help      help for vermin
  -v, --version   version for vermin

Use "vermin [command] --help" for more information about a command.

You can start using Vermin after installation using:

$ vermin create <vagrant image name>

# example using ubuntu focal image
$ vermin create hashicorp/focal64

# also you can use rhel8 using:
$ vermin create generic/rhel8

You can use all vagrant images.

Vermin collects very simple usage data anonymously.

For more info on the usage options see Vermin documentations website.

Contributors

Special thanks to Ahmed Samir for contributing the logo.

Stars Overtime

Stargazers over time

TODO

See TODO.md

Owner
Muhammad Hewedy
Software Developer/Architect
Muhammad Hewedy
Comments
  • How to upgrade version to match current one?

    How to upgrade version to match current one?

    Hi Muhammad, thanks for this tool.

    Is changing the k8s_version= to 1.20.0 enough to do the upgrade? Or do we need to upgrade other packages too, to match the k8s version such as Docker etc?

  • Installation / Upgrades

    Installation / Upgrades

    1. You have a link that goes to https://github.com/mhewedy/vermin#Automatic-installation but that doesn't exist.

    2. How will upgrades work? Does vermin inform you that and upgrade is available?

    1. You have H1 sections Installation, Usage, More Installation options. Perhaps "More installation options" should be a H2 inside "Installation" instead of where it is
  • report arp command issues

    report arp command issues

    https://github.com/mhewedy/vermin/blob/7762ce15bbb1dfa176cf202f83bbc40dc550b077/ip/arp.go#L14

    sometimes the arp command is not found, so vermin should report about it

  • Support Vagrant Boxes

    Support Vagrant Boxes

    Final: vermin create vagrant/hashicorp/bionic64:1.0.282

    Steps:

    1. request and parse response of https://app.vagrantup.com/USER/boxes/BOX to get the box download URL ✔️
    2. download the image ✔️
    3. gunzip the image (in case it is gzipped) tar xzf <donwloaded_file> ✔️
    4. TAR the ovf and vmdk files into ova archive in case the previous step done, otherwise skip (tar the ovf and the vmdk into ova) ✔️
    5. copy vagrant insecure private key into .vermin/ and use it with vagrant boxes (modify install script to copy vagrant key to vermin installation) ✔️
    6. change code to change username/private key of vermin/vagrant according to the origin of the VM image. ✔️

    Sample Response for step 1:

    {
      "description": "A standard Ubuntu 18.04 LTS 64-bit box",
      "short_description": "A standard Ubuntu 18.04 LTS 64-bit box",
      "name": "hashicorp/bionic64",
      "versions": [
        {
          "version": "1.0.282",
          "status": "active",
          "description_html": null,
          "description_markdown": null,
          "providers": [
            {
              "name": "virtualbox",
              "url": "https://vagrantcloud.com/hashicorp/boxes/bionic64/versions/1.0.282/providers/virtualbox.box",
              "checksum": null,
              "checksum_type": null
            },
            {
              "name": "vmware_desktop",
              "url": "https://vagrantcloud.com/hashicorp/boxes/bionic64/versions/1.0.282/providers/vmware_desktop.box",
              "checksum": null,
              "checksum_type": null
            },
            {
              "name": "hyperv",
              "url": "https://vagrantcloud.com/hashicorp/boxes/bionic64/versions/1.0.282/providers/hyperv.box",
              "checksum": null,
              "checksum_type": null
            }
          ]
        }
      ]
    }
    
  • Allow shrink disk space when provider is virtualbox

    Allow shrink disk space when provider is virtualbox

    sometimes the disk got increased for example when working with docker inside the VM, then after cleaning the diskspace, the host os cannot reclaim that disk space from the guest os.

    # source: https://vladimir-ivanov.net/how-to-compact-virtualboxs-vdmk-file-size/
    
    1. sudo sh -c 'cat /dev/zero > zero.fill; sync; sleep 1; sync; rm -f zero.fill'
    
    2. stop vm
    
    3. vboxmanage showhdinfo "/Users/mhewedy/.vermin/vms/vm_01/ubuntu-focal-20.04-cloudimg.vmdk"
    CAPTURE UUID
    
    4. VBoxManage clonehd "/Users/mhewedy/.vermin/vms/vm_01/ubuntu-focal-20.04-cloudimg.vmdk" "/tmp/vm_01/ubuntu-focal-20.04-cloudimg.vdi" --format vdi
    
    5. VBoxManage modifyhd "/tmp/vm_01/ubuntu-focal-20.04-cloudimg.vdi" --compact
    
    6. VBoxManage clonehd "/tmp/vm_01/ubuntu-focal-20.04-cloudimg.vdi" "/Users/mhewedy/.vermin/vms/vm_01/ubuntu-focal-20.04-cloudimg.vmdk" --format vmdk
    
    7. rm -rf "/tmp/vm_01/ubuntu-focal-20.04-cloudimg.vdi"
    
    8. vboxmanage internalcommands sethduuid "/Users/mhewedy/.vermin/vms/vm_01/ubuntu-focal-20.04-cloudimg.vmdk" <UUID CAPTRUED PREVIOUSLY>
    
    
  • consider vagrant images is the default

    consider vagrant images is the default

    Now stop depending on vermin images and use vagrant images as the defualt so the vagrant image name is "generic/arch" instead of "vagrant/generic/arch"

  • vermin should report the absence of arp on the host machine

    vermin should report the absence of arp on the host machine

    arp is not by default installed on some machines (ubuntu 20.04 for example).

    However, vermin don't report this issue. so the connection is not established with no error being reported.

  • trigger workflow run on push to master branch, tags or pull requests

    trigger workflow run on push to master branch, tags or pull requests

    Currently the workflow is run only on pushes to branches created in this repo, or on tags pushes. After this PR, the workflow will run on push to master branch in this repo, on tags pushes prefixed with v and also on pull requests from forks.

  • should report if arp command return error

    should report if arp command return error

    https://github.com/mhewedy/vermin/blob/7762ce15bbb1dfa176cf202f83bbc40dc550b077/ip/arp.go#L14

    sometimes the arp command is not found, so vermin should report about it

  • ping should pings all ips in the subnet

    ping should pings all ips in the subnet

    current implementation: https://github.com/mhewedy/vermin/blob/7762ce15bbb1dfa176cf202f83bbc40dc550b077/ip/ip.go#L58

    pings only the IP in /24 subnet regardless of the current subnet configured for the machine.

    Need to fix this to ping all IPs in the subnet

  • Allow mount multiple directories without clearing previous mount - add option to clear previous mounts

    Allow mount multiple directories without clearing previous mount - add option to clear previous mounts

    currently, mount allows mounting one time and before that, it clears all previous mounts.

    We need to make the clear part is optional (based on a -p flag or so)

  • consider using different network adapter than bridged network

    consider using different network adapter than bridged network

    it seems that the bridged network is full of problems. see #10

    So this issue to consider using different network mode in virtualbox ( maybe the NATservice) https://www.virtualbox.org/manual/ch06.html

    the main point here is to keep cross vm communications.

    Mode | VM→Host | VM←Host | VM1↔VM2 | VM→Net/LAN | VM←Net/LAN -- | -- | -- | -- | -- | -- Host-only | + | + | + | – | – Internal | – | – | + | – | – Bridged | + | + | + | + | + NAT | + | Port forward | – | + | Port forward NATservice | + | Port forward | + | + | Port forward

  • Support different backend hypervisors

    Support different backend hypervisors

    Currently, vermin working on VirtualBox as the only backend hypervisor.

    This limitation was because works on its own native images. but now vermin supports vagrant boxes as of #11 .

    So I think vermin now can support many hypervisors without the concern of image availability.

    One of these hypervisors I intent to support is Hyper-V

    Steps:

    1. #29
    2. #31
    3. #32
  • support vagrant images with version tags on windows

    support vagrant images with version tags on windows

    according to #11, vagrant images on windows work without the version part (cause : is not a valid windows filename part)

    this bug opened to indicate we need to support this feature in the future.

  • Cannot  Establishing connection

    Cannot Establishing connection

    Hi there,

    created the file and ran it:

    sudo apt update -y sudo apt install redis-server -y sudo sed -i 's/^supervised no/supervised systemd/' /etc/redis/redis.conf sudo systemctl restart redis.service sudo systemctl status redis

    vermin create ubuntu/focal script.sh

    the machine was created, I can see it. but cannot establish a connection using: vermin ssh vm_01 windows10, vbox 6.1

    Thanks!

Vagrant is a tool for building and distributing development environments.

Vagrant Website: https://www.vagrantup.com/ Source: https://github.com/hashicorp/vagrant HashiCorp Discuss: https://discuss.hashicorp.com/c/vagrant/24

Jan 7, 2023
Openshift's hpessa-exporter allows users to export SMART information of local storage devices as Prometheus metrics, by using HPE Smart Storage Administrator tool

hpessa-exporter Overview Openshift's hpessa-exporter allows users to export SMART information of local storage devices as Prometheus metrics, by using

Jan 17, 2022
Bubbleboxer - compose bubbles into boxes

bubbleboxer ?? - compose bubbles into boxes ?? A way to compose multiple bubbles

Dec 20, 2022
Command-line tool to remotely execute commands on Windows machines through WinRM

winrm-cli This is a Go command-line executable to execute remote commands on Windows machines through the use of WinRM/WinRS. Note: this tool doesn't

Dec 15, 2022
Infrastructure testing helper for AWS Resources that uses AWS SSM to remotely execute commands on EC2 machines.
Infrastructure testing helper for AWS Resources that uses AWS SSM to remotely execute commands on EC2 machines.

Infrastructure testing helper for AWS Resources that uses AWS SSM to remotely execute commands on EC2 machines, to enable infrastructure engineering teams to write tests that validate behaviour.

Sep 5, 2022
Manage your dotfiles across multiple diverse machines, securely.

chezmoi Manage your dotfiles across multiple diverse machines, securely. With chezmoi, you can install chezmoi and your dotfiles on a new, empty machi

Dec 30, 2022
Natural-deploy - A natural and simple way to deploy workloads or anything on other machines.

Natural Deploy Its Go way of doing Ansibles: Motivation: Have you ever felt when using ansible or any declarative type of program that is used for dep

Jan 3, 2022
Terraform Provider for Azure (Resource Manager)Terraform Provider for Azure (Resource Manager)
Terraform Provider for Azure (Resource Manager)Terraform Provider for Azure (Resource Manager)

Terraform Provider for Azure (Resource Manager) Version 2.x of the AzureRM Provider requires Terraform 0.12.x and later, but 1.0 is recommended. Terra

Oct 16, 2021
ADK Node ( a.k.a ADKgo v2 ) for the ADK Mesh with full Smart Contract support [Mainnet]

ADKGo SmartNode (MAINNET v2) Official Golang implementation of the ADK Mesh protocol with Smart Contract funtionality BASE NODE SETUP STEPS (on clean

Nov 24, 2021
SMART information of local storage devices as Prometheus metrics

hpessa-exporter Overview Openshift's hpessa-exporter allows users to export SMART information of local storage devices as Prometheus metrics, by using

Feb 10, 2022
vcluster - Create fully functional virtual Kubernetes clusters - Each cluster runs inside a Kubernetes namespace and can be started within seconds
vcluster - Create fully functional virtual Kubernetes clusters - Each cluster runs inside a Kubernetes namespace and can be started within seconds

Website • Quickstart • Documentation • Blog • Twitter • Slack vcluster - Virtual Clusters For Kubernetes Lightweight & Low-Overhead - Based on k3s, bu

Jan 4, 2023
WIP Go implementation of CSIRAC as a virtual machine.

CSIRAC A work-in-progress Go implementation of CSIRAC, as described in The Last of the First - CSIRAC: Australia's First Computer. The intention is to

Jan 4, 2022
KNoC is a Kubernetes Virtual Kubelet that uses an HPC cluster as the container execution environment
KNoC is a Kubernetes Virtual Kubelet that uses an HPC cluster as the container execution environment

Kubernetes Node on Cluster KNoC is a Virtual Kubelet Provider implementation that manages real pods and containers in a remote container runtime by su

Oct 26, 2022
K8s-socketcan - Virtual SocketCAN Kubernetes device plugin

Virtual SocketCAN Kubernetes device plugin This plugins enables you to create vi

Feb 15, 2022
A kubernetes cni, connecting containers to neutron virtual networks.
A kubernetes cni, connecting containers to neutron virtual networks.

neutron-cni A kubernetes cni, connecting containers to neutron virtual networks. Network Topology Architecture Quick Start Build make build-dev-im

May 5, 2022
📦 Package manager for CLI

AFX - Package manager for CLI AFX is a package manager for command-line tools and shell plugins. afx can allow us to manage almost all things availabl

Dec 2, 2022
:rocket: Modern cross-platform HTTP load-testing tool written in Go
:rocket: Modern cross-platform HTTP load-testing tool written in Go

English | 中文 Cassowary is a modern HTTP/S, intuitive & cross-platform load testing tool built in Go for developers, testers and sysadmins. Cassowary d

Dec 29, 2022
Modern Job Scheduler
Modern Job Scheduler

Kala Kala is a simplistic, modern, and performant job scheduler written in Go. Features: Single binary No dependencies JSON over HTTP API Job Stats Co

Dec 21, 2022
Resilient, scalable Brainf*ck, in the spirit of modern systems design

Brainf*ck-as-a-Service A little BF interpreter, inspired by modern systems design trends. How to run it? docker-compose up -d bash hello.sh # Should p

Nov 22, 2022