In this article:
NAME
vmtools — a virtual machines manager based on QemuDESCRIPTION
vmtools is a virtual machines manager which strives to be easy, versatile and modular to empower the user as much as possible while adhering to the principle of least privileges.- Easy
-
Every bootable thing should be throwable as-is to the vmup(1) command to be immediately started in a hassle-free fashion, from local standalone disk images files to remote URLs passing through .ova archives to device files.
- Versatile
-
vmtools commands do as few assumptions as possible on the way the user will use them, while providing as many options as possible to customize the command behavior.
- Modular
-
Not only vmtools is entirely developped in shell script language making it easy to inspect and modify it, but it is also explicitely modular.
- configure
- These modules are invoked during the virtual machine creation process. It contains two modules sub-categories: templates which allows to select the templates to apply to the virtual machine, settings which allows to define the virtual machine actual settings. The modules either interactively prompt the user for some input or automatically determine a value (for instance depending on some properties of the image file to boot).
- buildcmd
- These modules rely the virtual machine settings to build the Qemu command-line which will be used to start the guest system.
- clone
- These modules control the cloning process which occurs when copying or forking a virtual machine.
- Principle of least privilege
-
As opposed to some other virtual machines management tools, vmtools does not require root privileges, it not require any privileged service to run and in fact do not require any background service at all.
INHERITANCE
vmtools implements an inheritance system making a typical virtual settings file rather small as it should contain only the few variables customized for the current virtual machine.Parent and child (forked) virtual machines
Virtual machines can be copied and forked using the vmcp(1) and vmfork(1) commands.Templates
Templates implements settings inheritance for virtual machines which are not forked from each other.- Technical
-
A legacy PC will not use the same settings as a modern PC, and neither of them will use the same settings as a MacOS machine, however each of them shares common base settings with every other members of the same category.
- Logical
-
As stated above, virtual machine parent inheritance allows may allow to change a setting for a whole tree by editing only one value in one file. Logical templates allows to link templates which would however not be related to they can share some settings.
CUSTOMIZATION
The vmtools.conf file and the content of the modules directory can be overriden at the system and optionally at the user level.Customizing default settings
To override some default settings system-wide, set them in the /etc/vmtools/vmtools.conf file. Optionally, if cfg_include_userhome is set to “yes” (either in /etc/vmtools/vmtools.conf or by using a command-line argument such as -o), default settings can also be overriden at the user level in the ~/.config/vmtools/vmtools.conf (see FILES below for more information on how to select another location).Customizing modules
To override a module system-wide, create a modules directory with a similar tree than the default /usr/local/share/vmtools/modules and store the customized version of the module there. Optionally, if cfg_include_userhome is set to “yes” (either in /etc/vmtools/vmtools.conf or by using a command-line argument such as -o), default modules can also be overriden at the user level in the ~/.config/vmtools/modules (see FILES below for more information on how to select another location).COMMANDS
vmtools commands are as follows:- vmcp(1)
- Copy or fork virtual machines.
- vmcreate(1)
- Create a new virtual machine.
- vmdown(1)
- Shutdown a virtual machine.
- vmfix(1)
- Detect and fix virtual machines issues.
- vmfork(1)
- Copy or fork virtual machines.
- vminfo(1)
- Report information on a virtual machine.
- vmmerge(1)
- Merge two related virtual machines.
- vmmon(1)
- Access the Qemu monitor shell of a virtual machine.
- vmmv(1)
- Move or rename a virtual machine home directory.
- vmps(1)
- Report information on running virtual machines.
- vmrm(1)
- Delete a virtual machine home directory.
- vmrndmac(1)
- Generate a random MAC address.
- vmup(1)
- Start virtual machine or a bootable file or media.
ENVIRONMENT
- TMPDIR
- Default location to store temporary files, by default /tmp.
- XDG_CONFIG_HOME
- Location of user’s configuration files, by default ~/.config.
FILES
- /usr/local/bin
- Executable files.
- /usr/local/lib/vmtools
- Libraries shared by the vmtools project utilities.
- /usr/local/share/man
- Project man pages.
- /usr/local/share/vmtools/modules
- Default modules location.
- /usr/local/share/vmtools/vmtools.conf
- Virtual machine default settings, see vmtools.conf(5).
- ~/.config/vmtools
- User overrides (if cfg_include_userhome is set to “yes”).
- /etc/vmtools
- System-wide overrides.