Can't open my encrypted vdi on a different host...

Discussions related to using VirtualBox on Windows hosts.
Post Reply
Leo.Coppola
Posts: 6
Joined: 19. Sep 2015, 08:09

Can't open my encrypted vdi on a different host...

Post by Leo.Coppola »

Hi, i'm trying to move my virtual machine created in virtualbox 5.0.4.102546 and connected to an encrypted vdi to another Windows host. On the new host It won't boot. Virtualbox installed on the new host (same version) won't recognize the encrypted vdi and doesn't boot.
Any suggestions?

Thanks
Leo
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: just about all that run

Re: Can't open my encrypted vdi on a different host...

Post by loukingjr »

You need to move the entire VM folder, not just the .vdi.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
Leo.Coppola
Posts: 6
Joined: 19. Sep 2015, 08:09

Re: Can't open my encrypted vdi on a different host...

Post by Leo.Coppola »

already tried...i moved C:\Documents and Settings\"user"\VirtualBox VMs\"vm folder" on the new host. Maybe due to different Windows versions between old host (win 7 pro 64) and the new one (Xp pro 32)?
Thanks
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: just about all that run

Re: Can't open my encrypted vdi on a different host...

Post by loukingjr »

Maybe. For example Windows XP doesn't support USB 3.0 natively. Plus, VirtualBox dropped XP support (see: Supported Hosts) so whatever works now is about all that will work.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Can't open my encrypted vdi on a different host...

Post by mpack »

Leo.Coppola wrote:already tried...i moved C:\Documents and Settings\"user"\VirtualBox VMs\"vm folder" on the new host.
That sentence doesn't really make sense. Are you saying that you moved the original VM folder to a new host?

..because if all you did was create a new folder with the same name, then that is not at all the same thing.

If you separate an encrypted VDI from the parent VM then the VDI is dead. There is no recovery mechanism available.


You may care to read a previous topic on this subject: viewtopic.php?f=1&t=69503
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: just about all that run

Re: Can't open my encrypted vdi on a different host...

Post by loukingjr »

I assumed the OP meant he moved the VM Folder onto a new host, not just moved it around. I've been wrong before. :)
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
Leo.Coppola
Posts: 6
Joined: 19. Sep 2015, 08:09

Re: Can't open my encrypted vdi on a different host...

Post by Leo.Coppola »

Thanks to the user "GlobalTommy". I moved the encrypted vdi and .vbox file to the new host. Edited .vbox file with a xml editor. Setted parameters with the right ones (vdi path, type of encryption CRYPT/KeyId and CRYPT/KeyStore...etc) and it worked.
I hope next versions of Virtualbox include a simple way to do this.
Leo
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Can't open my encrypted vdi on a different host...

Post by mpack »

Leo.Coppola wrote:I hope next versions of Virtualbox include a simple way to do this.
The current version of VirtualBox includes a simple way to move VMs, you just didn't follow it.

Howto: Move a VM.
Leo.Coppola
Posts: 6
Joined: 19. Sep 2015, 08:09

Re: Can't open my encrypted vdi on a different host...

Post by Leo.Coppola »

"The basic procedure for moving VMs created by VirtualBox v4.0.0 or later is to copy the VM folder (with contents) to your preferred location, then use the GUI's Machine|Add menu item to register the .vbox file (found in the VM folder) from its new location."

I already tried exactly this procedure...then copied vdi on the new host but VM doesn't recognize my vdi as encrypted.
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: just about all that run

Re: Can't open my encrypted vdi on a different host...

Post by loukingjr »

Leo.Coppola wrote:"The basic procedure for moving VMs created by VirtualBox v4.0.0 or later is to copy the VM folder (with contents) to your preferred location, then use the GUI's Machine|Add menu item to register the .vbox file (found in the VM folder) from its new location."

I already tried exactly this procedure...then copied vdi on the new host but VM doesn't recognize my vdi as encrypted.
Copying the .vdi on the new host is not the same as copying the "VM Folder (with contents)" on the new host.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
Leo.Coppola
Posts: 6
Joined: 19. Sep 2015, 08:09

Re: Can't open my encrypted vdi on a different host...

Post by Leo.Coppola »

The paths on the two hosts are the same for .vbox files but not for vdi file. You mean that vdi path must be the same on the two host? If so should i re-create the same paths on the new host?...and if i can't?
What can i do?
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: just about all that run

Re: Can't open my encrypted vdi on a different host...

Post by loukingjr »

Was the original .vdi inside the VM Folder or had you created it to a different location? In order to move a VM to a new host, the VM Folder has to contain all the files including the .vdi.

If the .vdi was inside the VM Folder, depending on how you copied the VM Folder from the original host to the new host, this may be the issue…
If you are running on a Windows host then be wary of moving VMs to removable storage. Windows has a nasty habit of changing the drive letters of removable drives, which will invalidate the VM path stored when you used Machine|Add.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
Leo.Coppola
Posts: 6
Joined: 19. Sep 2015, 08:09

Re: Can't open my encrypted vdi on a different host...

Post by Leo.Coppola »

for a better performance i put the vdi file on a different hard drive. Let me explain:

On the old host the paths were:
- .vbox --> C:\Documents and Settings\"user"\VirtualBox VMs\"vm folder"
- .vdi --> D:\VirtualMachines

Paths on the new one:
- .vbox --> C:\Documents and Settings\"same user"\VirtualBox VMs\"vm folder"
- .vdi --> C:\VirtualMachines

Leo
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: just about all that run

Re: Can't open my encrypted vdi on a different host...

Post by loukingjr »

Which is why moving it didn't work. In the future, if you think you will have better performance on an external drive, create the VMs on it so the structure is intact.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Can't open my encrypted vdi on a different host...

Post by mpack »

loukingjr wrote:In the future, if you think you will have better performance on an external drive, create the VMs on it so the structure is intact.
... or use the "move VM" procedure to move the VM if it already exists.

So the reason you had trouble to begin with is that you overrode the default folder structure without understanding the ramifications. If you are going to use something as dangerous as drive encryption then it's probably in your own interests to find out how this stuff works. There is plenty of discussion on these forums on the reasons for keeping to the standard folder structure (meaning: keep all the files belonging to a VM in a single folder, though by all means locate that folder wherever is most convenient). The user manual alludes to this as well, in section 10.1 where it discusses the reasons why the folder structure changed for v4.x.
Post Reply