Create, control and connect to VirtualBox VM instances.
Download latest release, extract the archive then run ./install.sh
Usage: viper <command> [options]
Create, control and connect to VirtualBox VM instances.
Available commands:
Listing:
ls List created VMs
ps List running VMs
images List images
ip Show IP address for a running VM
VM basic:
create Create a VM from image
tag Create tag for a VM
start Start one or more VMs
stop Stop one or more VMs
ssh ssh into a running VM
rm Remove one or more VMs
Host operations:
port Forward port(s) from a VM to host
cp Copy files between host and VM
Use the following command to create a VM
$ viper create <image name>
# example
$ viper create ubuntu/bionic
Or in case you want to create and provision the VM: (see samples folder for sample provision scripts)
$ viper create <image name> /path/to/provison.sh
# example
$ viper create ubuntu/bionic ~/init.sh
To get list of all available images use:
$ viper images
ubuntu/bionic (cached)
centos/8
The cached flag means, the image has been already downloaded and cached before.
This subcommand list all VMs (stopped and running)
$ viper ls
VM NAME IMAGE CPU MEM TAGS
vm_01 ubuntu/bionic 1 1024 MB spark kafka
vm_02 ubuntu/bionic 1 1024 MB
$ viper ps
VM NAME IMAGE CPU MEM TAGS
vm_01 ubuntu/bionic 1 1024 MB spark kafka
$ viper start vm_01 vm_02
$ viper ssh vm_03
$ viper stop vm_03
Will stop and remove listed VMs
$ viper rm vm_03
Copy remote file on VM to you local host in the current path:
$ viper cp vm_01 --remote-file=/path/to/file/on/vm
Copy local file from your host to the VM's home directory:
$ viper cp vm_01 --local-file=/path/to/file/on/host
forward ports from VM to local host (all ports from 8080 to 8090):
$ viper port vm_01 8080-8090
- Vagrant uses a
Vagrantfile
which I think is most suited to be source-controlled, and for my case it is an overhead to maintain such file for each vm I want to create. (like create k8s cluster, etc...), I want kind of global accessibility.