Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I wonder what is the best practice for storing the virtual machine encrypted. I tried putting the image it a TrueCrypt volume, but it doesn't work nicely:

  • With the volume unmounted the VirtualBox complaints about missing VM disk, which is a bit annoying after a while.
  • There's no way to quickly unmount the volume without shutting down the VM first (except for a dirty unmount, which is no good idea).

Maybe there's a better way or maybe a VM integrating encryption?

share|improve this question

To add an up-to-date answer to this question, Oracle VM VirtualBox now supports hard disk encryption as of VirtualBox 5.0.

You must first create the virtual machine and then encrypt the hard disk images attached to it, either through the GUI or the vboxmanage API.

From the manual:

Starting with VirtualBox 5.0, it is possible to encrypt the data stored in hard disk images transparently for the guest. It does not depend on a specific image format to be used. Images which have the data encrypted are not portable between VirtualBox and other virtualization software.

It currently has severe limitations: see the manual for details.

This feature was hotly debated but finally implemented.

share|improve this answer

TrueCrypt is a really great solution for this, but there are different ways you can go about accomplishing your goals; here are a few ideas:

  1. Encrypt the hard drive of the Host OS (assuming you're running an OS that TrueCrypt supports encrypting the boot partition for)

  2. Use the "Favourites" sub-menu in TrueCrypt to simplify mounting the encrypted volume, or use TrueCrypt's command-line parameters to mount the volume and then add this command to your system's StartUp routines

  3. Install TrueCrypt on the Guest OS and encrypt its virtual hard drive from within that Guest OS (assuming you're virtualizing an OS that TrueCrypt supports encrypting the boot partition for)

  4. Set up two scripts which would presumably rely on command-line parameters:

    a. The "start" script -- mounts the TrueCrypt volume, then starts your Virtual Machine

    b. The "stop" script -- shuts down your Virtual Machine (and waits for it to stop), then dismounts the TrueCrypt volume

  5. Develop the habit of being careful to mount/dismount your TrueCrypt volume at the appropriate times (the downside is the potential for human error since this does require some practice and common sense, such as not using your computer while you're half-asleep)

I like option 1 the most, but if your needs require that the Virtual Machine be encrypted separately then one of the other options will be more interesting to you.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.