Problems moving .vdi file

Discussions related to using VirtualBox on Linux hosts.

Problems moving .vdi file

Postby John Jason » 26. Jan 2020, 06:51

I have VirtualBox 5.2.34 on Xubuntu 18.04, up to date. There is a Windows 10 virtual machine and .vdi file that is working fine, except that for some reason I cannot understand, apparently during its installation it created the .vdi file in ~/Software/VirtualBox instead of ~/.VirtualBox/VDI. I managed to successfully move the .vdi file to ./.VirtualBox/VDI, and it is still working, but every time it is launched it creates a folder 'VirtualBox VMs' in the root of my home folder, where it places a log file (./VirtualBox VMs/). If I delete this folder it just recreates it the next time I launch the virtual machine.

I have spent hours poking at every setting I can find, but I can't figure out how to get it to place the log files in ~/.VirtualBox where they belong. I could use some suggestions!
John Jason
 
Posts: 2
Joined: 26. Jan 2020, 06:31

Re: Problems moving .vdi file

Postby mpack » 26. Jan 2020, 11:07

John Jason wrote:except that for some reason I cannot understand, apparently during its installation it created the .vdi file in ~/Software/VirtualBox instead of ~/.VirtualBox/VDI.

Says who? VirtualBox hasn't organized its files in that way for about a decade, and even then it never quite did that.

A VDI files goes into the folder of the VM that owns it, along with all other files related to that VM. The only thing you should have in your .VirtualBox folder are config and log files related to the manager/frontend.

User Manual 10.1: Where VirtualBox Stores Its Files.
mpack
Site Moderator
 
Posts: 30971
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Problems moving .vdi file

Postby John Jason » 26. Jan 2020, 23:55

mpack wrote:Says who? VirtualBox hasn't organized its files in that way for about a decade, and even then it never quite did that.
A VDI files goes into the folder of the VM that owns it, along with all other files related to that VM. The only thing you should have in your .VirtualBox folder are config and log files related to the manager/frontend.


That's very interesting. I read the link you provided, and it's not the way my installation has always been organized. But I should have added at the beginning here that VirtualBox was originally installed in 2013, from the Ubuntu repositories. At that time I already had two machines, Windows 2000 and Windows XP, both created years before on another Linux computer. After installing Xubuntu 13.10 (fresh install) on the new computer and then installing VirtualBox, I copied the ~/.VirtualBox folder from the old to the new computer. When I then launched VirtualBox on the new computer my two machines were right there, and working as before. Since then VirtualBox and the entire OS has been just upgraded, no new fresh installs, although just now, hoping it would help to fix my problem, I added the PPA that gave me 6.12, which is now installed and running fine.

Yet it made no difference. I had copied the .vdi file to ~/.VirtualBox/VDI, where it sat next to the .vdi files for Windows 2000 and Windows XP, then deleted the ~/VirtualBox VMs folder, but every time I launched Windows 10 VirtualBox recreated the folder and copied the Windows 10 log file to it.

Eventually I solved the problem. I deleted the Windows 10 virtual machine entry in the Machine view, and then recreated it. When I did so I chose 'use an existing .vdi file' and changed the default location, something that I had apparently overlooked when I had first installed it. Then I deleted the ~/VirtualBox VMs folder yet again, and finally launched my recreated Windows 10 machine. When I shut it down I was happy to note that VirtualBox finally did not recreated the ~/VirtualBox VMs folder.

Why did I go to all this trouble? Because my backup routines include a 'just configs' and other options for different things to back up. The 'just configs' option backs up only dot files, so it does not get log files stored in ~/VirtualBox VMs. Plus, I don't like things scattered all over. When I copy or back up ~/.VirtualBox I want to know that I have everything.
John Jason
 
Posts: 2
Joined: 26. Jan 2020, 06:31


Return to VirtualBox on Linux Hosts

Who is online

Users browsing this forum: No registered users and 18 guests