Add support for images with existing partitions and filesystems
Enable support for running vmdb2 with a disk image that has already
been partitioned, with pre-existing filesystems in those partitions.
This can be useful in scenarios where an appliance disk image is being built: There
needs to be a "debug" version of the appliance that provides direct SSH access, the use
of sudo
, etc., and also a "production" version that does not. Otherwise the disk
images need to be identical to aid in diagnosing issues found in production
environments. The production and debug images can be produced by first creating the
"release" version using vmdb2
, and then passing the production disk image to a second
vmdb
where developer access is configured.
The kpartx_plugin's new "tags" key takes a list of partition/mountpoint tags to use when referring to the partitions later in the vmdb2 spec file.
The mount_plugin has been updated to detect the filesystem and uuid if the mountpoint tags for the disk image were defined via the new "tags" kpartx_plugin key, rather than via invoking the mkfs plugin. This allows the mount_plugin to use the fstype to determine if zerofree can be run on a partition when it is unmounted during build teardown.