Menu
InformatiWeb
  • Index
  • Courses
  • Tutorials
  • InformatiWeb Pro

Login

Registration Password lost ?
FR
  • IT
    • Articles
    • Backup
    • BIOS
    • Live CD
    • MultiBoot
    • Security
    • Virtualization
    • Web
    • Windows
  • InformatiWeb
  • Courses
  • IT
  • Learn to virtualize machines with VirtualBox
  • Encrypt your VM virtual hard disk
25 / 32
  • Connect an USB key to a VM
  • Install guest additions on Linux
  • Virtualization
  • 19 December 2022 at 14:15 UTC
  • Lionel

Encrypt the virtual hard disk of your virtual machine on VirtualBox 7.0

With VirtualBox 7, you can easily encrypt your virtual machine's virtual hard disk to prevent anyone from using it without your permission.
Which is very practical on a family PC, for example.

  1. Virtual machine usable without protection by default
  2. Encrypt your virtual machine's virtual hard disk
  3. Disable virtual hard disk encryption

1. Virtual machine usable without protection by default

By default, anyone can open a virtual machine and start it.

Indeed, all you need is access to the files of the desired virtual machine : its configuration (.vbox), its virtual hard disk (.vdi), ...

As you can see, its configuration is written in plain text and can be modified with any text editor.

2. Encrypt your virtual machine's virtual hard disk

To keep data created inside your virtual machine private, all you need to do is encrypt your virtual machine's virtual hard disk.
To do this, select your virtual machine in VirtualBox and click on : Configuration.

In the settings of your virtual machine, go to : General -> Disk Encryption.

Check the "Enable Disk Encryption" box and select the encryption you want to use : AES-XTS256-PLAIN64 or AES-XTS128-PLAIN64.

Specify the password to use which will be requested each time your virtual machine starts and click OK.

Wait while your virtual hard disk (.vdi) is encrypted.
This can take a long time depending on how much data is already there and depending on your computer's performance.

Plain Text

Encrypting medium ...[virtual hard disk name].vdi.

In your virtual machine's information, you will see that its virtual hard disk is encrypted.

When you start your virtual machine, a "Disk Encryption" window will appear and ask you to enter the encryption password defined previously.

Plain Text

This virtual machine is password protected. Please enter the encryption password below.

The virtual machine starts.

Your virtual machine's guest operating system appears without issue.

Note that this feature only encrypts the virtual hard disk and data about this encryption will appear in your virtual machine's configuration file.

Plain Text

<HardDisks>
  <HardDisk uuid="{xxxx...xxxxx}" location="[virtual hard disk name].vdi" format="VDI" type="Normal">
    <Property name="CRYPT/KeyId" value="[VM name]" />
    <Property name="CRYPT/KeyStore" value="xxxxx" />
  </HardDisk>
</HardDisks>

3. Disable virtual hard disk encryption

To disable virtual hard disk encryption, shut down your virtual machine and click : Configuration.

Go to "General -> Disk Encryption".

Uncheck "Enable Disk Encryption" and click OK.

Specify the password defined earlier for disk encryption and click OK.

Wait while your virtual hard disk is decrypted.

Plain Text

Decrypting medium ...[virtual hard disk name].vdi.

Next, start your virtual machine.

As you can see, your virtual machine starts normally again without prompting you for a password.

Share this tutorial

Partager
Tweet

To see also

  • Hyper-V - Coexistence with VirtualBox or VMware Workstation

    Virtualization 8/30/2019

    Hyper-V - Coexistence with VirtualBox or VMware Workstation

  • VirtualBox - Clone a virtual machine (VM)

    Virtualization 8/25/2018

    VirtualBox - Clone a virtual machine (VM)

  • VirtualBox - Configure settings of your VMs

    Virtualization 7/22/2018

    VirtualBox - Configure settings of your VMs

  • VirtualBox - Connect an USB key to a VM

    Virtualization 11/6/2020

    VirtualBox - Connect an USB key to a VM

Comments

You must be logged in to post a comment

Share your opinion

Pinned content

  • Useful softwares
  • Our programs
  • Terms and conditions
  • Share your opinion

InformatiWeb Pro

  • Win. Server administration
  • Linux Administration
  • Virtualization

Contact

  • Guest book
  • Technical support
  • Contact

® InformatiWeb.net 2008-2022 - © Lionel Eppe - All rights reserved.

Total or partial reproduction of this site is prohibited and constitutes an infringement punishable by articles L.335-2 and following of the intellectual property Code.