The details about the direction of the merge and its implication is described in Merge operating modes below. The default is to merge the virtual machine into its parent (equivalent to -p).
vmhome_path must be a valid virtual machine home directory. If no value is provided, the current working directory is assumed.
OPTIONS
Merge operating modes
Merge operating modes are exclusive.
If each affected virtual machine is organized as a subdirectory of its parent, the directories are moved as required to reflect the updated parent-child relationship.
The merge method selection options are as follows:
-c
Merge the virtual machine into its child.
The virtual machine located in vmhome_path must have at least one child.
This method merges the storage and settings of the virtual machine located in vmhome_path into its child(s) and then deletes it, moving the child(s) as necessary. If the original virtual machine had a parent, it now becomes the parent of the child(s) virtual machine.
If the virtual machine located in vmhome_path has more than one child, safe merging (see -s) is automatically enabled. This may induce a longer time to process the merge.
If the virtual machine located in vmhome_path has no parent, its child will become root of the virtual machine hierarchy tree. If there is several childs, each one will become root of their own tree, becoming unrelated to each other. In this situation, unless -y has been used an interactive confirmation is required before proceeding.
-p
Merge the virtual machine into its parent (default behavior).
The virtual machine located in vmhome_path must have a parent and be its only child.
This method merges the storage and settings of the virtual machine located in vmhome_path into its parent and then deletes it. If the original virtual machine had any child, they now become childs of the resulting parent virtual machine.
Other options
The other options are as follows:
-h
Show usage information summary then exit.
-q
Decrease verbosity. Add several -q options to decrease verbosity even more (-qq by default to get minimal output). See vmtools.conf(5) for more information about verbosity levels.
See -v to increase the verbosity level.
-s
Enable safe merging.
By default, vmmerge attempts to apply a fast merging algorithm where the content of the virtual machine storage image is directly merged. The downside of this is that in case of an error, it becomes impossible to completely rollback to the previous state as the content of the image files has already be merged. This however does not break any virtual machine (the parent and child virtual machines simply have an identical storage content) and is usually acceptable in regards to the benefits.
When safe mode is enabled, vmmerge only operates on copies of the storage image files during the merging process. In case of error, this allows a complete rollback to the previous state. The downside of this is that storage images are often large files and copying them may therefore require time and disk space, making virtual machines merging a heavy and slow process.
Note that for implemenation reasons safe mode is automatically enabled when child-merging a virtual machines with several childs.
-v
Increase verbosity. Add several -v options to increase verbosity even more (-vvv by default to get the most verbose output, including debugging messages). See vmtools.conf(5) for more information about verbosity levels.
See -q to decrease the verbosity level.
-y
Don’t ask any question: accept all confirmation requests and automatically select the default answer in any other situation.
Use this option with great care: no confirmation will be asked before deleting or overwriting any files!
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/lib/vmtools
Libraries shared by the vmtools project utilities.
Moreover, the content of /usr/local/share/vmtools can be overridden in the following locations (in the order of precedence):
~/.config/vmtools
User overrides (if cfg_include_userhome is set to “yes”).
/etc/vmtools
System-wide overrides.
EXITSTATUS
0
The operation ended successfully.
1
An error occurred, incomplete tasks have been reverted.
2
Wrong usage, nothing has been done.
3
Operation cancelled by the user, nothing has been done.
EXAMPLES
In the examples below, the notation A/B/C means that B is both a child virtual machine and a subdirectory of A and C is both a child virtual machine and a subdirectory of B.
Example 1: Parent merge (default behavior):
Invoking one of the commands on the tree /A/B/C:
vmmerge /A/Bvmmerge -p /A/B
These two commands are equivalent and merge B into its parent A. C becomes a child of A, producing A/C.
Example 2: Child merge:
Invoking the command:
vmmerge -c /A/B
On the tree: /A/B/C
Merges B into its child C. Here too the updated C becomes a child of A, producing A/C.