How do I encrypt a VirtualBox VM?

2

2

I am running a server on a linux box and want to run some things for my other home computers in a virtual machine.

I would like to encrypt the VM and shut it down when nobody is home, but keep the rest of the server running. I want to prevent a physical intruder from running or examining the VM's contents without a password, like real hard drive encryption or TrueCrypt.

Also, I heard it is best to keep important data in a shared folder on the host machine, so that it can be backed up separately from the VM. I need to make sure its impossible for anything but the VM to access this data without a password.

Is there a way to encrypt the VM and the shared folder without a significant loss of performance or the ability to make backups?

Not The NSA

Posted 2014-03-24T20:28:03.310

Reputation: 21

Question was closed 2014-03-26T13:33:23.420

Answers

1

you can put your virtual disk files in a truecrypt volume, if you wanted, and dismount the volume when not in use.

other than that, all the traditional methods are available for encrypting your VMs filesystem so it won't boot without key.

your shared drive could point to a truecrypt volume if you so choose.

theres really very little about this being a VM that changes anything, other than giving you the option to store the virtual hard disks in an encrypted container.

Frank Thomas

Posted 2014-03-24T20:28:03.310

Reputation: 29 039

0

If you don't want to mess about with truecrypt (and you don't need everything encrypted) you can use the ECryptfs package. This will allow you to manage encytion within the VM without the overhead of truecrypt in the host .

https://wiki.archlinux.org/index.php/ECryptfs

Nikos

Posted 2014-03-24T20:28:03.310

Reputation: 501

I do want everything encrypted, at least everything within reach of the guest os, so that there is zero possibility of accidental leaks from temp files or indexers or the like. But you give me an idea. What about using disk-encryption like dm-crypt on the whole guest hard drive? If that would work, what about running backups from within the vm to a shared folder on a real encrypted hard drive? – Not The NSA – 2014-03-25T01:58:35.283