<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0);">
<div style="font-size: 14px; font-family: Calibri, sans-serif;">
<div><font color="#1f497d">> Upon reading the source, I don't see "cryptsetup luksFormat" being called anywhere (nova/libvirt/storage/*).</font></div>
<div>Check out <a href="https://github.com/openstack/nova/blob/master/nova/virt/libvirt/imagebackend.py#L690">imagebackend.py:Lvm.create_image</a> and <a href="https://github.com/openstack/nova/blob/master/nova/virt/libvirt/storage/dmcrypt.py#L48">dmcrypt.py:create_volume</a>.</div>
<div><br>
</div>
<div><font color="#1f497d">> How is this feature envisioned to work?</font></div>
</div>
<div style="font-size: 14px; font-family: Calibri, sans-serif;">The LVM volume with the '-dmcrypt' suffix is the
<i>unencrypted</i> device that is passed to the VM. From a DevStack machine with an encrypted instance:</div>
<div>
<p style="margin: 0px;"><font face="Courier" style="font-size: 12px;"><b>$</b> sudo cryptsetup status /dev/mapper/065859b2-50d6-46d6-927a-2dfd07db3306_disk-dmcrypt</font></p>
<p style="margin: 0px;"><font face="Courier" style="font-size: 12px;">/dev/mapper/065859b2-50d6-46d6-927a-2dfd07db3306_disk-dmcrypt is active and is in use.</font></p>
<p style="margin: 0px;"><font face="Courier" style="font-size: 12px;">  type:    PLAIN</font></p>
<p style="margin: 0px;"><font face="Courier" style="font-size: 12px;">  cipher:  aes-xts-plain64</font></p>
<p style="margin: 0px;"><font face="Courier" style="font-size: 12px;">  keysize: 256 bits</font></p>
<p style="margin: 0px;"><font face="Courier" style="font-size: 12px;">  device:  /dev/mapper/stack--volumes--default-065859b2--50d6--46d6--927a--2dfd07db3306_disk</font></p>
<p style="margin: 0px;"><font face="Courier" style="font-size: 12px;">  offset:  0 sectors</font></p>
<p style="margin: 0px;"><font face="Courier" style="font-size: 12px;">  size:    2097152 sectors</font></p>
<p style="margin: 0px;"><font face="Courier" style="font-size: 12px;">  mode:    read/write</font></p>
</div>
<div>
<p style="margin: 0px;"><font face="Courier" style="font-size: 12px;"><b>$</b> sudo fuser -vam /dev/mapper/065859b2-50d6-46d6-927a-2dfd07db3306_disk-dmcrypt </font></p>
<p style="margin: 0px;"><font face="Courier" style="font-size: 12px;">                     USER        PID ACCESS COMMAND</font></p>
<p style="margin: 0px;"><font face="Courier" style="font-size: 12px;">/dev/dm-1:           libvirt-qemu   8429 F.... qemu-system-x86</font></p>
</div>
<div style="font-size: 14px; font-family: Calibri, sans-serif;">While information in the '*-dmcrypt' device is visible to a root user on the compute host, the underlying device (stack--volumes--default-* in the example above) is encrypted, and everything written
 to the underlying disk is also encrypted. Try searching for the text in the underlying device – you shouldn't be able to find it.</div>
<div style="font-size: 14px; font-family: Calibri, sans-serif;"><br>
</div>
<div style="font-size: 14px; font-family: Calibri, sans-serif;">Joel</div>
<div style="font-size: 14px; font-family: Calibri, sans-serif;"><br>
</div>
<div style="font-size: 14px; font-family: Calibri, sans-serif;"><br>
</div>
<span id="OLK_SRC_BODY_SECTION" style="font-size: 14px; font-family: Calibri, sans-serif;">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Chris Buccella <<a href="mailto:chris.buccella@verilume.com">chris.buccella@verilume.com</a>><br>
<span style="font-weight:bold">Reply-To: </span>"<a href="mailto:openstack-dev@lists.openstack.org">openstack-dev@lists.openstack.org</a>" <<a href="mailto:openstack-dev@lists.openstack.org">openstack-dev@lists.openstack.org</a>><br>
<span style="font-weight:bold">Date: </span>Monday, April 11, 2016 at 1:06 PM<br>
<span style="font-weight:bold">To: </span>"<a href="mailto:openstack-dev@lists.openstack.org">openstack-dev@lists.openstack.org</a>" <<a href="mailto:openstack-dev@lists.openstack.org">openstack-dev@lists.openstack.org</a>><br>
<span style="font-weight:bold">Subject: </span>[openstack-dev] [nova] Encrypted Ephemeral Storage<br>
</div>
<div><br>
</div>
<div>
<div>
<div dir="ltr">
<div>
<div>
<div>
<div>I've been looking into using encrypted ephemeral storage with LVM. With the [ephemeral_storage_encryption] and [keymgr] sections to nova.conf, I get an LVM volume with "-dmcrypt" is appended to the volume name, but otherwise see no difference; I can still
 grep for text inside the volume.<br>
<br>
Upon reading the source, I don't see "cryptsetup luksFormat" being called anywhere (nova/libvirt/storage/*).
<br>
</div>
<br>
I was expecting a new encrypted LVM volume when a new instance was created. Are my expectations misplaced? How is this feature envisioned to work?<br>
<br>
<br>
</div>
<div>Thanks,<br>
<br>
</div>
<div>-Chris<br>
</div>
</div>
</div>
</div>
</div>
</div>
</span>
</body>
</html>