Posts Tagged VirtualBox
Repositories for VirtualBox 4.2.x
Posted by Luis Gallardo in Linux on 24/10/2012

After the release of VirtualBox 4.2.x versions, I decided to update the repositories on one of the computers at work, which runs Ubuntu 12.04. To do so just put the following into the file /etc/apt/sources.list:
deb http://download.virtualbox.org/virtualbox/debian precise contrib
After this change you must refresh the package list and update VirtualBox:
aptitude update aptitude install virtualbox-4.2
Repositories on Debian
For Debian testing (wheezy) and stable (Squeeze) you must put the following lines:
deb http://download.virtualbox.org/virtualbox/debian wheezy contrib deb http://download.virtualbox.org/virtualbox/debian squeeze contrib non-free
Setting apt-cacher
If you followed the apt-cacher and VirtualBox recipe from this blog, I inform you only the /etc/apt/sources.list file must be edited as explained above, I mean, the apt-cacher server remains unchanged.
Reference: Download VirtualBox for Linux Hosts
Installing VirtualBox Guest Additions on CentOS
Posted by Luis Gallardo in Linux on 09/09/2012

If for any reason you need to install CentOS on a virtual machine using VirtualBox and you want to take advantage of the extras features provided by the Guest Additions (network and graphic drivers, for enabling full screen and mouse integration options) you can follow these steps::
- In the virtual machine with CentOS install the needed files for compiling the Guest Additions:
yum install kernel-headers kernel-devel yum groupinstall "Development Tools"
This will take long because it downloads a lot of packages.
- Select Guest Additions on VirtualBox menu.

On the virtual machine a link will be created to mount the CDROM. Right click on it and choose Mount. Once mounted go to:
cd /media/VBOXADDITIONS_4.1.20_80170/
There run the binary file for Linux installation:
./VBoxLinuxAdditions.run
Once it had finished the Guest Additions will be installed on Fedora!
Installing on Red Hat
The above steps are valid for Red Hat, you only need to set a repository from where packages and group of packages will be downloaded.
VirtualBox Guest Addtions on OpenSuse 10.1
Posted by Luis Gallardo in Linux on 13/05/2012

A coworker came to me with a virtual machine running OpenSuse 10.1, where she wanted to use one of the VirtuaBox’s Guest Additions features: shared folders. The first thing I detected was it didn’t have the Guest Additions installed, so I proceeded to install them but the VirtualBox’s installing script didn’t compile because all the stuff needed to compile a Linux module was missing. On this article I describe all I had to do to compile the Guest Additions on OpenSUse 10.1.
OpenSuse 10.1 repositories
First I supposed I had to install the kernel sources and the needed compilers, but checking the repositories I realized that it only had as source the installation CD that was used to create the virtual machine. OpenSuse 10.1 is an old distribution and its repositories are no longer supported officially, so I had to find somebody who had the mirrors published, so I came across to this mirror list. I used the first option and from Software Sources I put the url shown on the picture:
Requisites to compile the Guest Additions
Once the repository was added I proceeded to install the requisites to compile the Guest Additions, begging with the C/C++ tools and compilers. To do so, I went to the OpenSuse’s Control Center, and from Software Management I choose C/C++ compilers and tools option from the selections, as shown in the following image:
In order to compile the Guest Additions it still left another requisite: the kernel sources. Here I found another problem, because the virtual machine had kernel 2.6.16.46-0.12-default but the repository didn’t have the sources for that version but the 2.6.16.13-4-default version instead. The solution was to remove the kernel image 2.6.16.46-0.12 and use the one provided in the repository 2.6.16.13-4, to do so yo can use the Software Management or from a terminal type this:
zypper remove kernel-defaultzypper install kernel-default
Then you can install the kernel sources:
zypper install kernel-source kernel-sysm
Once installed all requisites, just run the Guest Additions script from the directory it was mounted:
./VBoxLinuxAdditions.run
To changes take effect you must reboot the guest.
Shared folders
You can active the shared folders from VirtualBox’s by going to Device > Shared Folders, and select the one you want to map in the host’s file system. If you check Auto-mount next boot, and for the shown example, a shared folders will appear in /media/Sf_videos
References
Installing Oracle VM VirtualBox Extension Pack
Posted by Luis Gallardo in Linux on 08/04/2011

Now in VirtualBox 4.x the USB support and other stuff are installed using and extra package called Oracle VM VirtualBox Extension Pack. This move by Oracle lets distribute VirtualBox as software libre, so if commercial software is needed it can be installed as an extension, without GPL license infringements.
Installing
Let’s see how to install Oracle VM VirtualBox Extension Pack:
- Download Oracle VM VirtualBox 4.2.12 Extension Pack
- Open VirtualBox, then go to File > Preferences > Extensions and choose the downloaded file (see above image).
- Add the user to VirtualBox group. On Linux you must add the user who will use VirtualBox to the vboxusers group:
adduser lgallard vboxusers
Note: In this example lgallard is the user wichi will use VirtualBox, and for adding users to groups in Linux you must be the system’s administrator (root).
- Close the graphical session and log into again to apply changes..
Once it’s done you can use any USB device or the serial port with your virtual machine!!
Old versions
If you need the Extension Packs for older VirtualBox versions, here I leave some:
- Oracle VM VirtualBox 4.2.10 Extension Pack
- Oracle VM VirtualBox 4.2.8 Extension Pack
- Oracle VM VirtualBox 4.2.6 Extension Pack
- Oracle VM VirtualBox 4.2.4 Extension Pack
- Oracle VM VirtualBox 4.2.2 Extension Pack
- Oracle VM VirtualBox 4.1.22 Extension Pack
- Oracle VM VirtualBox 4.1.20 Extension Pack
- Oracle VM VirtualBox 4.1.18 Extension Pack
- Oracle VM VirtualBox 4.1.16 Extension Pack
- Oracle VM VirtualBox 4.1.14 Extension Pack
- Oracle VM VirtualBox 4.1.12 Extension Pack
- Oracle VM VirtualBox 4.1.10 Extension Pack
- Oracle VM VirtualBox 4.1.8 Extension Pack
- Oracle VM VirtualBox 4.1.6 Extension Pack
- Oracle VM VirtualBox 4.1.4 Extension Pack
- Oracle VM VirtualBox 4.1.2 Extension Pack
- Oracle VM VirtualBox 4.0.12 Extension Pack
Enabling USB support for VirtualBox on Linux
Posted by Luis Gallardo in Linux on 10/03/2011
Even in recent VirtualBox versions the USB support is not enabled by default. Some time ago you needed to edit the /etc/fstab, but all that is in the past. Now just add the user which will be using the USB ports to the vboxuser group:
adduser lgallard vboxusers
To apply changes you must log out and log in to run VirtualBox again.
Repository for VirtualBox 4.x.x
Posted by Luis Gallardo in Linux on 28/02/2011
I had set VirtualBox to download it from Oracle’s repository as a Debian package when upgrading the system. But I opened VirtualBox and got the above message, thing I found odd since it should have automatically updated. Therefore I did a research and found that VirtualBox’s repository changed, before you put into the /etc/apt/sources.list this:
deb http://download.virtualbox.org/virtualbox/debian squeeze non-free
Now you must put this:
deb http://download.virtualbox.org/virtualbox/debian squeeze contrib non-free
After this change you must refresh the package list and update VirtualBox:
aptitude update aptitude install virtualbox-4.1
Setting apt-cacher
If you followed the apt-cacher and VirtualBox recipe from this blog, I inform you only the /etc/apt/sources.list file must be edited as explained above, I mean, the apt-cacher server remains unchanged.
Reference: Download VirtualBox for Linux Hosts
Using pipes with VirtualBox’s serial port
Posted by Luis Gallardo in Linux on 26/11/2010
It might happen you need to access virtual machine’ s serial port from VirtualBox, but maybe you don’t want to use the physical device but try to redirect it to a Linux terminal. This can be done from the VirtualBox’s settings and using an application called socat.
Procedure
- Install socat:
aptitude install socat
- Set the serial in the virtual machine by selecting Host Pipe. If the pipe file doesn’t exist, choose Create Pipe:
- Start the virtual machine.
- Once started, from a terminal type this:
socat /tmp/openwrt -
In this case, the /tmp/openwrt file is the pipe created by VirtualBox. On the other hand, the character “- ” stands for standard input, and it’s part of socat’s syntax. Then you would be ready to see the serial port from the current terminal. The above example is a virtual machine running OpenWrt, which establishes communication thorough the serial port to manage the system.
OpenWrt on VirtualBox
Posted by Luis Gallardo in Linux on 17/11/2010
If you are considering to use OpenWrt on your wireless router and you don’t want to flash it over and over or you just want to check out this Linux version for embedded devices, you can download the test image for VirtualBox from the project’s homepage and play around there.
To make it work just follow these steps:
- Download the OpenWRT Backfire image for VirtualBox.
- Set the virtual machine with these parameters: Read the rest of this entry »
Virtualbox’s repo publick key
Posted by Luis Gallardo in Linux on 22/05/2010
It seems VirtualBox changed its repo publick key (you know, something about Sun becoming Oracle or something like that):
W: GPG error: http://moody lenny Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 54422A4B98AB5139
I leave here the steps needed to “update” the public key just in case it happens again, or if it happens with another key:
- List all available keys and copy the one belonging to VirtualBox:
moody:~# apt-key listpub 1024D/6DFBCBAE 2008-07-14 uid Sun Microsystems, Inc. (xVM VirtualBox archive signing key) sub 2048g/78A86EAF 2008-07-14
- Delete that key:
moody:~# apt-key del 78A86EAF 6DFBCBAE OK
- Download the new key:
wget http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc
- Install the donwloaded key:
moody:~# apt-key add oracle_vbox.asc OK
- Finally, update and upgrade the system:
aptitude update aptitude safe-upgrade
Adding Virtualbox’s repo to apt-cacher
Posted by Luis Gallardo in Linux on 16/04/2010
We’ve already set VirtualBox‘s repositories in our computer, so you can can update it with aptitude. But what if you have several computers in your network using VirtualBox? Yes, every computer will download about 40 MB per release. We can solve that issue by using apt-cacher, as we saw in this post. So, let’s put both thing together…
Setting VirtualBox’s repos in apt-cacher
- Edit /etc/apt-cacher/apt-cacher.conf file by appending VirtualBox‘s repository:
path_map = debian http://ftp.us.debian.org/debian/ ; multimedia http://www.debian-multimedia.org ; virtualbox http://download.virtualbox.org/virtualbox/debian
- Restart apt-cacher service:
/etc/init.d/apt-cacher restart
Setting up clients
- For the above defined mirrors add the the following into the /etc/apt/sources.list file:
deb http://192.168.1.100:3142/debian testing main contrib non-free deb http://192.168.1.100:3142/multimedia testing main deb http://192.168.1.100:3142/virtualbox squeeze non-free
In this example, 192.168.1.100 is the apt-cacher server’s IP address.
- Download Virtualbox’s key file:
wget -c http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc
- Install the key:
apt-key add oracle_vbox.asc
- Update the package’s list:
aptitude update
- Now you can install VirtualBox:
aptitude install virtualbox-3.2
Or you can upgrade to the latest version by typing:
aptitude safe-upgrade
Repeat client’s steps for every machine you want to connect to the cached server.










Planeta Linux
Follow me