luks_open


Description:

[ Version ( since = "1.5.1" ) ]
public bool luks_open (string device, string key, string mapname) throws Error

open a LUKS-encrypted block device

This command opens a block device which has been encrypted according to the Linux Unified Key Setup (LUKS) standard.

device is the encrypted block device or partition.

The caller must supply one of the keys associated with the LUKS 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.

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.

Parameters:

this

A GuestfsSession object

Returns:

true on success, false on error