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.
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.
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>
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.
Virtualization 8/30/2019
Virtualization 8/25/2018
Virtualization 7/22/2018
Virtualization 11/6/2020
Pinned content
InformatiWeb Pro
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.
You must be logged in to post a comment