In this article:
NAMEvmfix — detect and fix virtual machines issues
|vmfix||[-Aabdhlnpqrsv] [directory …]|
DESCRIPTIONDetect and fix virtual machines issues, also provide a few cleaning functionalities.
Tests selection optionsTest selection options order has no impact on the tests execution order.
Delete temporary bakup directories.
Delete work files (cosmetic).
Delete lock files.
Fix parent-child link issues.
Fix storage image files path issues.
Other optionsThe other options are as follows:
- Execute all tests, including the cosmetic ones (equivalent to -bdlps).
- Execute all defects tests (equivalent to -blps).
- Show usage information summary then exit.
- Do not modify anything, only check for issues.
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.
- Enable recursive mode.
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.
- Default location to store temporary files, by default /tmp.
- Location of user’s configuration files, by default ~/.config.
- Libraries shared by the vmtools project utilities.
- Virtual machine default settings, see vmtools.conf(5).
- User overrides (if cfg_include_userhome is set to “yes”).
- System-wide overrides.
- No issue has been found.
- An internal error occurred.
- Wrong usage.
- At least one of the selected tests has found an issue.
- Example 1:
Force to remove a lock preventing to start the current virtual machine:
cd ~/myVM vmfix -l
- Example 2:
Check that a virtual machine tree has no issue (simple reporting, the -n flag prevents any modification):
vmfix -ran /path/to/virtual_machines
- Example 3:
Quickly remove all remaining lock files and temporary directories from a virtual machine tree (useful as a system startup script, cleaning-up the environment before any virtual machine gets started):
vmfix -rtl /path/to/virtual_machines
After having found and solved one or several issues, it is recommended to run the vmfix command another time in order to ensure that there is no remaining issue.
- Some tests require to lock the targeted virtual machine. These tests will be ignored and a warning message dispayed if a locking issue has been detected or of some virtual machines are currently running.
The -p (parent-child issues) and -s (storage path issues) only attempt to fix situations considered as non-ambiguous. Facing more complex situations, they will bet on the safe side and limit themselves to reporting the issues found but not apply any fix.
- The parent and storage image paths are defined in the virtual machine settings file. The file name is defined by the cfg_file_vmsettings setting and is vm.settings by default.
- The childs paths are defined in the childs database file. The file name is defined by the cfg_file_childs setting and is childs.lst by default.
QCow2 files backing chain path is stored directly in the QCow2 binary file. It can be modified using the following command:
qemu-img rebase -u -b backing_file image_file