Install virtualbox on different hard drive.

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
iamphil
Level 3
Level 3
Posts: 106
Joined: Mon Nov 11, 2013 9:18 pm
Location: Missouri

Install virtualbox on different hard drive.

Post by iamphil » Fri Aug 31, 2018 2:15 pm

I have an SSD (/dev/sdb1) that I have my primary OS (Mint 18) on. I also have a 1tb (/dev/sda1) sata drive that I want to install virtualbox on. I need to run some windows apps, but don't want to corrupt my SSD with M$ crap. Can't seem to find a way to set virtualbox to that drive. Drive is split into two partitions. One is a little over 200gb (the partition I want to use) and the other is about 750gb, both formatted to NTFS.

Any help would be appreciated.

BTW, please keep any advice in simple terms, as I'm not very smart in working linux. THANKS. :)

User avatar
Flemur
Level 16
Level 16
Posts: 6101
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Install virtualbox on different hard drive.

Post by Flemur » Fri Aug 31, 2018 2:33 pm

iamphil wrote:
Fri Aug 31, 2018 2:15 pm
I have an SSD (/dev/sdb1) that I have my primary OS (Mint 18) on. I also have a 1tb (/dev/sda1) sata drive that I want to install virtualbox on. I need to run some windows apps, but don't want to corrupt my SSD with M$ crap.
I had kept the actual vbox installation in it's normal location under "/", but managed to move the several-GB file (7GB?), which contained the windows installation, to a different partition, by editing one of the .xml files in the vbox files under $HOME. (and, obviously, moving the 7GB file somewhere else).

Is that what you want to do?

Note the "managed to move": I didn't find a way to create it where I wanted it, just moved it afterwards.

To find the xml file to edit, look for vbox config files under your $HOME and find the one containing the name of your windows installation.

Disclaimer: quit using vbox several months ago after wine improvements.

Edit: see my old post :
viewtopic.php?f=242&t=237094&hilit=virt ... e#p1262584
(though Cosmo, in the post above that one, says there's a place in the GUI...???)
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Mint 18.3 Xfce/fluxbox/pulse-less
Xubuntu 17.10/fluxbox/pulse-less

iamphil
Level 3
Level 3
Posts: 106
Joined: Mon Nov 11, 2013 9:18 pm
Location: Missouri

Re: Install virtualbox on different hard drive.

Post by iamphil » Sun Sep 02, 2018 3:43 pm

Not sure I understand how to do this. Any simpler instructions on how to move to the other drive. It's not seen in the virtualbox>preferences tab. I've made the drives "auto-mount", and they show on the mint sidebar. But don't know how to move to the other drive.

Thanks.

User avatar
Valsodar
Level 3
Level 3
Posts: 142
Joined: Thu Jul 19, 2018 11:30 pm
Location: Sofia, Bulgaria
Contact:

Re: Install virtualbox on different hard drive.

Post by Valsodar » Sun Sep 02, 2018 9:28 pm

iamphil wrote:
Fri Aug 31, 2018 2:15 pm
I have an SSD (/dev/sdb1) that I have my primary OS (Mint 18) on. I also have a 1tb (/dev/sda1) sata drive that I want to install virtualbox on. I need to run some windows apps, but don't want to corrupt my SSD with M$ crap. Can't seem to find a way to set virtualbox to that drive. Drive is split into two partitions. One is a little over 200gb (the partition I want to use) and the other is about 750gb, both formatted to NTFS.

Any help would be appreciated.

BTW, please keep any advice in simple terms, as I'm not very smart in working linux. THANKS. :)
You don't need to install it on a different drive. Install VB as usual, then run it, open its preferences and change location for all VMs. I do this all the time when I need Windows. VB on the Linux drive (sdb1) and the VM itself goes on sdc1.
AsRock B85M Pro4, Core i3-4170, Palit GTX 1050 Ti 4GB, Corsair CX750 PSU, Corsair 32GB DDR3-1600, Corsair Force LE 120GB, WD Caviar Blue + Green = 1.5TB, Firefox 61.0.1 x64, Mint 18.3 Cinnamon, kr 4.13.0-45

User avatar
smurphos
Level 7
Level 7
Posts: 1576
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher...

Re: Install virtualbox on different hard drive.

Post by smurphos » Mon Sep 03, 2018 1:04 am

iamphil wrote:
Sun Sep 02, 2018 3:43 pm
Not sure I understand how to do this. Any simpler instructions on how to move to the other drive. It's not seen in the virtualbox>preferences tab. I've made the drives "auto-mount", and they show on the mint sidebar. But don't know how to move to the other drive.

Thanks.
Open VirtualBox, navigate to File > Virtual Media Manager. You can move existing virtual disks around the filesystem from there.

When creating a new virtual hard disk for a new VM you can either change the default location for all new virtual disks in File > Preferences, or specify a location at the time of creation.

User avatar
catweazel
Level 17
Level 17
Posts: 7482
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Install virtualbox on different hard drive.

Post by catweazel » Mon Sep 03, 2018 2:06 am

Valsodar wrote:
Sun Sep 02, 2018 9:28 pm
You don't need to install it on a different drive. Install VB as usual, then run it, open its preferences and change location for all VMs. I do this all the time when I need Windows. VB on the Linux drive (sdb1) and the VM itself goes on sdc1.
That won't work as described for an existing VM.
¡uʍop ǝpısdn sı buıɥʇʎɹǝʌǝ os ɐıןɐɹʇsnɐ ɯoɹɟ ɯ,ı

User avatar
catweazel
Level 17
Level 17
Posts: 7482
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Install virtualbox on different hard drive.

Post by catweazel » Mon Sep 03, 2018 2:16 am

iamphil wrote:
Fri Aug 31, 2018 2:15 pm
I have an SSD (/dev/sdb1) that I have my primary OS (Mint 18) on. I also have a 1tb (/dev/sda1) sata drive that I want to install virtualbox on.
Copy the VirtualBox virtual disk to the HDD using your file manager.

Open the VBox Manager.

On the File menu, select Virtual Media Manager (VMM).

In VMM, select the virtual disk that resides on your SSD and right-click it.

Select Release. Click Release.

Right-click the virtual disk again and select Remove. Click Remove.

Click Machine Tools and select the virtual machine. Click Settings. Click Storage.

Under Storage Devices, you will have an empty disk controller, it may or may not be labelled SATA, and a controller for CD/DVD. Select the empty disk controller.

Right-click this empty controller and select Add Hard Disk. Select Choose existing disk.

Navigate to the virtual disk on the HDD. Click the virtual disk then click Open.

Finally, click OK.

Test your virtual machine by booting it. Once you are satisfied that the virtual disk on the HDD is in use you can decide if you want to keep the backup on your SSD or delete it.
¡uʍop ǝpısdn sı buıɥʇʎɹǝʌǝ os ɐıןɐɹʇsnɐ ɯoɹɟ ɯ,ı

User avatar
Valsodar
Level 3
Level 3
Posts: 142
Joined: Thu Jul 19, 2018 11:30 pm
Location: Sofia, Bulgaria
Contact:

Re: Install virtualbox on different hard drive.

Post by Valsodar » Mon Sep 03, 2018 6:10 am

catweazel wrote:
Mon Sep 03, 2018 2:06 am
Valsodar wrote:
Sun Sep 02, 2018 9:28 pm
You don't need to install it on a different drive. Install VB as usual, then run it, open its preferences and change location for all VMs. I do this all the time when I need Windows. VB on the Linux drive (sdb1) and the VM itself goes on sdc1.
That won't work as described for an existing VM.
It will, if you know what to do:
1. Do as I said in my previous post.
2. Navigate manually in the file manager to the existing VM.
3. Click on the folder for the existing VM and select "Cut".
4. Navigate manually in the file manager to the new location and paste the VM there.
5. Open VB, right click and remove the VM from the list.
6. Click "New" and add an existing VM from the new location.

After that all new VMs will be stored in the new location. Simple.
AsRock B85M Pro4, Core i3-4170, Palit GTX 1050 Ti 4GB, Corsair CX750 PSU, Corsair 32GB DDR3-1600, Corsair Force LE 120GB, WD Caviar Blue + Green = 1.5TB, Firefox 61.0.1 x64, Mint 18.3 Cinnamon, kr 4.13.0-45

User avatar
Flemur
Level 16
Level 16
Posts: 6101
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Install virtualbox on different hard drive.

Post by Flemur » Mon Sep 03, 2018 9:34 am

My method sure is a lot easier than using the vbox GUI:
Just move the files and then edit
~/.config/VirtualBox/VirtualBox.xml
and change src="/path/to/file.vbox" to point to the new location.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Mint 18.3 Xfce/fluxbox/pulse-less
Xubuntu 17.10/fluxbox/pulse-less

User avatar
Valsodar
Level 3
Level 3
Posts: 142
Joined: Thu Jul 19, 2018 11:30 pm
Location: Sofia, Bulgaria
Contact:

Re: Install virtualbox on different hard drive.

Post by Valsodar » Mon Sep 03, 2018 11:02 am

Sure, that works too. But if the user doesn't know which file to edit, using the GUI is easiest way. ;)
AsRock B85M Pro4, Core i3-4170, Palit GTX 1050 Ti 4GB, Corsair CX750 PSU, Corsair 32GB DDR3-1600, Corsair Force LE 120GB, WD Caviar Blue + Green = 1.5TB, Firefox 61.0.1 x64, Mint 18.3 Cinnamon, kr 4.13.0-45

iamphil
Level 3
Level 3
Posts: 106
Joined: Mon Nov 11, 2013 9:18 pm
Location: Missouri

Re: Install virtualbox on different hard drive.

Post by iamphil » Tue Sep 04, 2018 7:12 pm

User doesn't know, but it doesn't matter. I screwed up the virtualbox playing around with it. So I totally removed it and installed VMware Workstation 14. This allowed me to set the virtual machine on the drive of my choice. Seems to be working for now, but with only a 30 day limit.

Thanks for all the advice. :)

User avatar
Flemur
Level 16
Level 16
Posts: 6101
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Install virtualbox on different hard drive.

Post by Flemur » Sun Sep 23, 2018 2:39 pm

Valsodar wrote:
Mon Sep 03, 2018 11:02 am
Sure, that works too. But if the user doesn't know which file to edit, using the GUI is easiest way. ;)
Well, I found the file ("find" and "grep" are your friends) but couldn't find it in the GUI.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Mint 18.3 Xfce/fluxbox/pulse-less
Xubuntu 17.10/fluxbox/pulse-less

User avatar
Valsodar
Level 3
Level 3
Posts: 142
Joined: Thu Jul 19, 2018 11:30 pm
Location: Sofia, Bulgaria
Contact:

Re: Install virtualbox on different hard drive.

Post by Valsodar » Sun Sep 23, 2018 11:25 pm

Flemur wrote:
Sun Sep 23, 2018 2:39 pm
but couldn't find it in the GUI.
:shock: :shock: :shock:

I trust you know what "Machine Folder" means?

Image
AsRock B85M Pro4, Core i3-4170, Palit GTX 1050 Ti 4GB, Corsair CX750 PSU, Corsair 32GB DDR3-1600, Corsair Force LE 120GB, WD Caviar Blue + Green = 1.5TB, Firefox 61.0.1 x64, Mint 18.3 Cinnamon, kr 4.13.0-45

Post Reply

Return to “Software & Applications”