open an encrypted block device
This command opens a block device which has been encrypted according to the Linux Unified Key Setup (LUKS) standard, Windows BitLocker, or some other types.
device is the encrypted block device or partition.
The caller must supply one of the keys associated with the encrypted block device, in the key parameter.
This creates a new block device called /dev/mapper/mapname. Reads and writes to this block device are decrypted from and encrypted to the
underlying device respectively.
mapname cannot be "control" because that name is reserved by device-mapper.
If the optional crypttype parameter is not present then libguestfs tries to guess the correct type (for example LUKS or
BitLocker). However you can override this by specifying one of the following types:
luks A Linux LUKS device.
bitlk A Windows BitLocker device.
The optional readonly flag, if set to true, creates a read-only mapping.
The optional cipher parameter allows specifying which cipher to use.
If this block device contains LVM volume groups, then calling lvm_scan with
the activate parameter true will make them visible.
Use list_dm_devices to list all device mapper devices.
This function depends on the feature "luks". See also feature_available .
| this |
A GuestfsSession object |
| optargs |
a GuestfsCryptsetupOpen containing optional arguments |
|
true on success, false on error |