Skip to content

🔧 Run a single command in a virtual machine with zero-setup and great performance

License

Notifications You must be signed in to change notification settings

svenstaro/vmexec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vmexec - run a single command in a VM

CI Crates.io license Stars Lines of Code

Run a single command in a virtual machine with zero-setup and great performance

vmexec is a zero-setup CLI tool that runs single commands in a throwaway virtual machines. The idea is for you to run a command a command in VM without having think about the performance implications, how to mount files, how to forward ports, etc.

Nowadays, many are used to the convenience of container runners such as podman or docker but so far it hasn't been as covenient to run a VM, often requiring a manual set up step.

It has a docker run-inspired interface that many should already be familiar with.

Requirements

  • virtiofsd
  • QEMU

Kernel Samepage Merging (KSM)

It is strongly encouraged to enable KSM in your kernel in order to allow for multiple similar VMs to share their pages, thereby strongly cutting their memory costs.

To temporarily enable KSM, you can do this as root:

echo 1 > /sys/kernel/mm/ksm/run

However, you are advised to enable this permanently by running

vmexec ksm enable

as root.

TODO

  • Document/bench KSM
  • Better README

About

🔧 Run a single command in a virtual machine with zero-setup and great performance

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages