Page 1 of 1

Install virtualbox on different hard drive.

Posted: Fri Aug 31, 2018 2:15 pm
by iamphil
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. :)

Re: Install virtualbox on different hard drive.

Posted: Fri Aug 31, 2018 2:33 pm
by Flemur
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...???)

Re: Install virtualbox on different hard drive.

Posted: Sun Sep 02, 2018 3:43 pm
by iamphil
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.

Re: Install virtualbox on different hard drive.

Posted: Sun Sep 02, 2018 9:28 pm
by Valsodar
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.

Re: Install virtualbox on different hard drive.

Posted: Mon Sep 03, 2018 1:04 am
by smurphos
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.

Re: Install virtualbox on different hard drive.

Posted: Mon Sep 03, 2018 2:06 am
by catweazel
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.

Re: Install virtualbox on different hard drive.

Posted: Mon Sep 03, 2018 2:16 am
by catweazel
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.

Re: Install virtualbox on different hard drive.

Posted: Mon Sep 03, 2018 6:10 am
by Valsodar
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.

Re: Install virtualbox on different hard drive.

Posted: Mon Sep 03, 2018 9:34 am
by Flemur
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.

Re: Install virtualbox on different hard drive.

Posted: Mon Sep 03, 2018 11:02 am
by Valsodar
Sure, that works too. But if the user doesn't know which file to edit, using the GUI is easiest way. ;)

Re: Install virtualbox on different hard drive.

Posted: Tue Sep 04, 2018 7:12 pm
by iamphil
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. :)

Re: Install virtualbox on different hard drive.

Posted: Sun Sep 23, 2018 2:39 pm
by Flemur
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.

Re: Install virtualbox on different hard drive.

Posted: Sun Sep 23, 2018 11:25 pm
by Valsodar
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