LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   VirtualBox amd64 binary on Slackware64 (http://www.linuxquestions.org/questions/slackware-14/virtualbox-amd64-binary-on-slackware64-4175436350/)

red_fire 11-09-2012 12:35 AM

VirtualBox amd64 binary on Slackware64
 
Hi,

I'm getting a new laptop soon and planning to install Slackware64 onto it. Does VirtualBox's amd64 binary install flawlessly on Slackware64? I found a thread here from 3 years ago for VirtualBox 3.x which needed a bit of workaround. Has anyone tried it?

Regards.

markush 11-09-2012 01:28 AM

I've used it several times on Slackware64 without any problems. You can run 64bit guests as well as 32bit guests.

Markus

chrisretusn 11-09-2012 03:00 AM

I am using it. I've been using it for several years, before 3.0 was released. I don't recall ever having installation problems with it.

The current version (VirtualBox-4.2.4-81684-Linux_amd64.run) installs without problems (This assumes you have done a Full Install of Slackware.) Be sure to download Oracle_VM_VirtualBox_Extension_Pack-4.2.4-81684.vbox-extpack also. You install this after starting VirtualBox from the Preferences menu.

The only thing you need to do after running the installer is add your user to the vboxusers group. Then after starting add the extension.

solarfields 11-09-2012 06:42 AM

Quote:

Does VirtualBox's amd64 binary install flawlessly on Slackware64?
yes. just make sure you have the kernel source present at install time and as mentioned above, add yourself to the vboxusers group

tronayne 11-09-2012 08:43 AM

Yes, though several versions of VirtualBox and Slackware.

As mentioned above, be sure to install "everything" when you install Slackware (so you'll have the kernel source among other things that might just be useful even if not particularly for VirtualBox).

You'll find what you need at https://www.virtualbox.org/wiki/Downloads; you download VirtualBox 4.2.4 Oracle VM VirtualBox Extension Pack from there (get the current version, currently 4.2.4).

Once that has completed, click the link right above that section for VirtualBox for Linux Hosts; that will take you to https://www.virtualbox.org/wiki/Linux_Downloads. Look down the list to the bottom and select the All Distributions AMD64 link. The file you'll get is VirtualBox-4.2.4-81684-Linux_amd64.run which is 80,362,961 bytes (that's current as of today).

You need to be root to install, you simply
Code:

su -    <or sudo or log in as root>
cd dir_where_download_is
sh VirtualBox-4.2.4-81684-Linux_amd64.run install

That will unpack into /opt/VirtualBox, build the kernel modules, create the necessary files in /etc/init.d (vboxdrv), create a group called vboxusers and put appropriate symbolic links in system directories.

You will need to manually add users to the vboxusers group; you do that
Code:

su -    <or sudo or log in as root)
usermod -a -G vboxusers username[,username,...]

Make sure to, as @chrisretusn recommends, install the Extension Pack before you add any virtual machines.

Something to think about.

When you add a virtual machine it will, by default, be added in your home directory. Say you're installing Win7 as a guest; you'll want to allocate at least 20G to make it useable.

Something I've done (lessons learned during a wasted youth, this) is to add a partition during setup of Slackware that I've named virtual and gave it, oh, 90G (keep in mind that you're new box is going to have something like a 250G, 500G or even 1T drive, so 90G - 100G isn't out of the question). I specify that it mounts to /var/lib/virtual (just because /var/lib is where MySQL and PostgreSQL mount, so what the heck) but you could mount it to wherever you want.

You do have to do a little bit of fiddling (once) before you start up VirtualBox the first time:
Code:

su -
chown root.vboxusers /var/lib/virtual
chmod 775 /var/lib/virtual

but that's not a big burden.

Up to you whether you want virtual machines in your home directory or off somewhere else; it's simple to do and it might save you some trouble somewhere down the road.

Hope this helps some.

glorsplitz 11-09-2012 08:44 PM

thanks tronayne
 
I can confirm tronayne help/guide.

Followed your post here and vbox works great, slack64 host with xp, centos, slack32 guests.

chrisretusn 11-09-2012 10:11 PM

Quote:

Originally Posted by tronayne (Post 4825754)
Something to think about.

When you add a virtual machine it will, by default, be added in your home directory. Say you're installing Win7 as a guest; you'll want to allocate at least 20G to make it useable.

--snip---

Up to you whether you want virtual machines in your home directory or off somewhere else; it's simple to do and it might save you some trouble somewhere down the road.

Just want to add a few things to tronayne's excellent post. By default, as tronayne has mentioned, virtual machines are added in your user's home directory, specifically $HOME/VirtualBox VMs/. I am one of those old school folks who thinks that spaces do NOT belong in file names and especially directory names (eventually they will cause problems). At the very least I would advise changing that; a simple fix such as $HOME/VirtualBoxVMs/.

My current space usage from 4 virtual machines is 57G. At one time I had several VM's at well over 100GB. Keep in mind that allotting 20GB to one VM does not mean it will take up that much. My Slackware64 VM has 16GB allotted, but is currently using 7.09GB. I'm only using 13% of my /home partition.

red_fire 11-10-2012 02:30 AM

Hi everyone. Thank you for your replies and also I didn't expect such detailed answer, thank you tronayne.

it's glad to know that VirtualBox will install smoothly on Slackware64 because in the thread I found before, apparently the amd64 binary installer looked into amd64 architecture in the kernel-source and didn't check x86_64.

about the VM directory, on my old laptop I actually put my VMs in a separate partition.

.VirtualBox and VirtualBox VMs in my home folder only exist as symbolic links.

Code:

$ln -s /mnt/VirtualBox /home/myhome/.VirtualBox
$ln -s /home/myhome/.VirtualBox/Machines /home/myhome/"VirtualBox VMs"

This was the only thing I could think of to keep VMs away from my main system :D

markush 11-10-2012 02:45 AM

I have also a separate partition which is mounted as /usr/local/vm, but I simply made myself to the owner of this directory. The configurations for the virtual machines are still in my homefolder, but the images of the vms are in /usr/local/vm.

Markus

glorsplitz 11-19-2012 09:37 AM

wasn't sure about upgrading

downloaded VirtualBox-4.2.4-81684-Linux_amd64.run, Oracle_VM_VirtualBox_Extension_Pack-4.2.4-81684.vbox-extpack

sh VirtualBox-4.2.4-81684-Linux_amd64.run, said it was upgrading to newer version

then installed extension pack

brought it up and everything is running good

thanks again tronayne

leigh8904 11-21-2012 07:01 AM

Another way to specify where VirtualBox configuration and VMs / hard disk images are stored is to set the VBOX_USER_HOME environment variable.

larryhaja 11-22-2012 12:48 PM

At work we run VirtualBox in headless mode. We setup a separate vbox user to run the Virtual Machines from that users home directory. So, essentially it would be /home/vbox/VirtualBox\ VMs/. If you have a separate user that runs VirtualBox it is pretty easy to move the users home directory.

Code:

# useradd vbox
# mkdir /usr/local/vbox
# chown vbox:vbox /usr/local/vbox
# chmod 700 /usr/local/vbox
# grep vbox /etc/passwd
vbox:x:1001:1001::/home/vbox:/bin/bash
# usermod -d /usr/local/vbox vbox
# grep vbox /etc/passwd
vbox:x:1001:1001::/usr/local/vbox:/bin/bash

This won't solve the problem of the currently running user having VirtualBox in a separate directory.

But if what leigh8904 says is correct you could just add the variable VBOX_USER_HOME to one of your startup scripts.
Code:

# echo "export VBOX_USER_HOME=/usr/local/vbox" >> ~/.bash_profile


All times are GMT -5. The time now is 05:45 AM.