At the top of your program, include vixMntapi.h along with any other header files you need. Structures and type definitions are declared in the include file, so you do not need to create them or allocate memory for them.
Call VixMntapi_Init() to initialize the library in your application. This function takes major and minor version number to account for future extensions. You can provide your own logging, warning, or panic functions to substitute for the default VixMntapi handlers, and custom library and temporary directories.
Call VixMntapi_OpenDiskSet() to open a set of virtual disks for mounting. Pass a set of disk handles obtained from the
VixDiskLib_Open() call. The
VixMntapi_OpenDiskSet() function also expects number of disks to open, an optional open mode, and a parameter to pass back the resulting disk-set handle.
Linux vixMntapi does not support read-only access. It is explicitly disabled in the code due to journal replay requirements when mounting
ext3 and later file systems. To mount a disk read-only, you must either mount the virtual disk of a powered off virtual machine, or mount the snapshot of a powered on virtual machine.