Can i change the location of .VirtualBox folder?
Can i change the location of .VirtualBox folder?
Is it possible to change the location of .VirtualBox folder that is in the users directory? I tried the option from the Preferences>General>Default Machine Folder but this changes only the location of the virtual machines hard disks.
-
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 i change the location of .VirtualBox folder?
It doesn't even do that. It determines where any future VMs will be created - it has no bearing on the location of existing VMs, nor is it only for hard disk images.emil78 wrote:I tried the option from the Preferences>General>Default Machine Folder but this changes only the location of the virtual machines hard disks.
Yes, you can control the location of the ".VirtualBox" folder by setting the VBOX_USER_HOME environment variable... but I struggle to see why anyone would need to. That folder contains almost nothing - a small xml and a couple of log files, so your reason surely can't be because of disk space. Perhaps you should tell us your problem instead of your solution?
Re: Can i change the location of .VirtualBox folder?
Can you tell me how to change the .VirtualBox location from command prompt using the VBOX_USER_HOME variable?
I want the folder to be outside C: drive, because when i reinstall Windows it will delete it.
I want the folder to be outside C: drive, because when i reinstall Windows it will delete it.
-
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 i change the location of .VirtualBox folder?
You could just copy the folder somewhere safe and put it back afterwards.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
There are three groups of people. Those that can count and those that can't.
Re: Can i change the location of .VirtualBox folder?
Yes, but if i forget to do that it will be deleted. I prefer to be outside C drive since this can be done, but i don't know how to do that from the command prompt.
-
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 i change the location of .VirtualBox folder?
If you forget to preserve the contents of the .VirtualBox folder then it's no biggie: like I said, it contains almost nothing. All you would lose is the list of registered VMs, so all you would have to do is reregister them, which you might well have to do anyway (e.g. if reinstalling Windows caused drive letters to change).
Telling you how to configure an environment variable on your host is really beyond the scope of these forums. But, I'm sure that Googling for VBOX_USER_HOME will help.
Telling you how to configure an environment variable on your host is really beyond the scope of these forums. But, I'm sure that Googling for VBOX_USER_HOME will help.
Re: Can i change the location of .VirtualBox folder?
I tried this from the command prompt but it didn't work:
Also, where can i see all available variables for Virtualbox?
Code: Select all
set VBOX_USER_HOME=E:\VM\.VirtualBox-
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 i change the location of .VirtualBox folder?
Did you check Google as I suggested? Setting an environment variable inside a command console only applies for that command console, and only until it closes. This isn't DOS, where one OS environment applies to all apps.
On my PC I would set global environment variables in My Computer | Advanced | Environment variables.
On my PC I would set global environment variables in My Computer | Advanced | Environment variables.
Re: Can i change the location of .VirtualBox folder?
I created the variable in the standard way and backup the corresponding registry settings, so when i have to restore the settings i will run the .reg file.