VirtualBox Disk Encryption Tutorial

Advertisement

Advertisement

Introduction

VirtualBox allows you to encrypt the virtual disk files at the VM level. This means you can use VirtualBox to encrypt the disks even if the operating system you are installing does not support disk encryption or you simply prefer not to use something like LVM disk encryption. One benefit of doing this is that you can still use dynamically expanding disks. If you choose an encrypted LVM disk, you can end up with the maximum size of the virtual disk being used which is highly inefficient for disk space.

Install the VirtualBox Extensions

Find the VirtualBox Extension Pack from the VirtualBox download page. After downloading the file, double-click to run it, and it will load in VirtualBox and ask you to install. After installing, you will be able to encrypt the disks.

Encrypt VM disk

To set a disk to be encrypted, go to the virtual machine settings by right-clicking the virtual machine from the VirtualBox Manager and clicking settings, or highlighting the machine and using the CTRL-S hotkey.

Then visit Settings | General | Disk Encryption.

Select the encryption algorithm to use from the dropdown. AES-256 is good. Then fill out the passphrase for the disks.

Unlock an encrypted disk

When you boot the machine and it tries to access the disk, a pop-up will appear on your host machine asking you to fill out the passphrase for the virtual disk. It does not prompt you from within the guest machine.

Conclusion

After reading this, you should understand how to encrypt virtual disks from the host machine using VirtualBox.

Advertisement

Advertisement