Posts Tagged VirtualBox
First things first, install
dkms or VirtualBox will break with every kernel upgrade.
apt-get install dkms
Now, download the Linux alternate installer for your architecture from here (under “All distributions”). Transfer it to your Ubuntu Server as needed.
Run the installer:
You should get the following output:
Verifying archive integrity... All good. Uncompressing VirtualBox for Linux installation............ VirtualBox Version 4.2.12 r84980 (2013-04-12T10:28:02Z) installer Installing VirtualBox to /opt/VirtualBox Python found: python, installing bindings... Building the VirtualBox kernel modules VirtualBox has been installed successfully. You will find useful information about using VirtualBox in the user manual /opt/VirtualBox/UserManual.pdf and in the user FAQ https://www.virtualbox.org/wiki/User_FAQ We hope that you enjoy using VirtualBox.
Now, download the extension pack from here, transferring it to your server as necessary. Install it with
VBoxManage extpack install /path/to/extpack
Now, to set up phpVirtualBox to manage VirtualBox.
Create a user call phpvirtualbox with a hard-to-guess password.
(You may need to SSH into your host as the new user for their directory and settings to be created completely.)
Now, create and edit
/etc/default/virtualbox with your favorite text editor, and paste in the following
Start the virtualbox web service
Have it autostart at boot
sudo update-rc.d -f vboxweb-service remove && sudo update-rc.d vboxweb-service defaults
Download the appropriate version of phpVirtualBox from here, transfer it to somewhere on your server, unzip it, and move it to a location under /var/www (such as ‘phpvirtualbox’) for web access. Chown it www-data:www-data recursively.
Rename config.php-example to config.php and edit it
Edit the following to match your phpvirtualbox username and password
/* Username / Password for system user that runs VirtualBox */ var $username = 'vbox'; var $password = 'pass';
Now browse to http://yourserver/phpvirtualbox
Default login is admin:admin
If you want the hard drive images stored somewhere other than /home/phpvirtualbox, click file > preferences and set it.
If you have problems with the remote not cursor not matching the local mouse cursor, do your best to install Guest Additions to the guest OS. This does correct it, even if you’re logging in via RDP.
I’ve been using VirtualBox for my Windows XP VM when I’m in linux to get a handle on those Windows apps that I absolutely need, and to sometimes address a piece of hardware that otherwise won’t work. One of the biggest issues I’ve had is a distinct lack of VirtualBox to address my BlackBerry — I absolutely must use my Windows hard drive to do it.
VMWare Workstation seems to overcome whatever shortfall exists in VirtualBox to address it, and I’m happy to say, it works quite well. However, now I have this VirtualBox hard drive image with all my software already installed, and I want to boot it in VMWare. How to convert it?
Fortunately, the VBoxManage utility of VirtualBox can actually convert a VirtualBox vdi image to the vmdk format used by VMWare. It can do it rather easily, as well.
The command format is:
VBoxManage clonehd | [--format VDI|VMDK|VHD|RAW|] [--variant Standard,Fixed,Split2G,Stream,ESX] [--existing]
"c:Program FilesOracleVirtualBoxVBoxManage.exe" clonehd "Win XP.vdi" xp.vmdk --format vmdk --variant standard
Absolute path to VBoxManage is necessary unless it’s in the Windows $PATH.
VBoxManage clonehd "Win XP.vdi" xp.vmdk --format vmdk --variant standard
Successful run gets this output:
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% Clone hard disk created in format 'vmdk'. UUID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Next, open VMWare and select Create a new virtual machine
Select “I will install the operating system later”
Make your OS selection about the OS that’s currently on the vmdk you will be using. (The guest OS, not the host OS).
Later on, you will have the option to use an existing vmdk image as your virtual hard drive. Do so.
You should now be able to finish setup and boot your converted disk image.
Note that creating a new machine and using an existing hard drive image is not a feature of VMWare Player. Workstation or another product is required. However, JoVa has shared a great workaround:
Since my tip for VMWare Player is not very clear on what to do exactly, I have the following, easy steps that you can follow, right after you started VMWare Player.
1) Select: Create new Virtual Machine
2) Select Guest Operating OS “Microsoft Windows” and select the version you have (for example “Windows XP Professional”)
3) Click “Next” and give a the virtual machine a name, for example “XP-pro”.
4) Click “Next” set the maximum disk size to the size of your actual virtual machine (important!)
5) Click “Next”and click “Finish”. The VM is created
6) Copy your VM (the .vmdk file) over the created (empty) .vmdk (e.g. xp-pro.vmdk)
7) Play the virtual machine
Questions, comments, or feedback is appreciated, as always.
If you’re using the closed-source version (the non-OSE) of VirtualBox for virtualization, upgrading your Ubuntu version will likely break your VirtualBox installation. This is because VirtualBox uses dkms to automatically pull in and recompile the kernel modules during a kernel upgrade, but when you upgrade your Ubuntu version, the third-party repository is disabled for compatibility.
What you need to do is re-add the repository line for VirtualBox in Synaptic. This is very easy. It’s important to understand that none of the steps listed here will harm your existing VMs — those files are located in ~/.virtualbox for older installs, and “~/VirtualBox VMs” (and the equivalent on Windows machines) in newer installs. You may want to consider backing those files up somewhere else before starting.
Assuming that your Ubuntu upgrade is already complete, you need to know the nickname for your Ubuntu version. This is easily found at System > About Ubuntu.
Once you’ve found that, simply re-add the correct repository line using the following steps:
Step 1 – Find your version
Go to the VirtualBox download page and find the repository line for your version of Ubuntu.
Although VirtualBox development is kept close to the Ubuntu release schedule, new repository lines may not be immediately available after a new Ubuntu release is launched. Simply check back to that page until they have posted the new repository.
Step 2 – Install dkms
This may be required for other programs, but you will want to make sure dkms is installed to keep the VirtualBox modules up to date after installation. Install dkms using your favorite package manager or enter the following command at a terminal:
sudo apt-get install dkms
(I noticed that VirtualBox 4 installs dkms as a dependency — previous versions may as well. It’s always best to play it safe.)
Step 3 – Enter the repository information in Synaptic Package Manager
Open Synaptic and follow the following menu trees to add the new repository line.
system > administration > synaptic package manager
settings > repositories
Click other software tab
Click add button
Paste your repository line that matches your version, found at the VirtualBox website, here.
Close and click reload.
Step 4 – Install VirtualBox
Now, install the virtualbox-4.0 (or the current version) using your favorite package manager, or enter this at a terminal:
sudo apt-get install virtualbox-4.0
If you experience issues with message related to no key, no signature, or bad signature, refer to the VirtualBox Linux Downloads page for information on resolving that. The messages are generally safe to ignore, though more cautious users may want to install the signing key to make sure the downloads have the correct digital signature.
Questions, comments, and feedback are welcome and appreciated.
If you’re a VM user like I am, one of the most frustrating tasks is that of trying to increase the size of a VBox hard drive.
Google searches come up with a myriad of solutions, some of them unnecessarily complex and unhelpful. Fortunately, there’s a fairly simple process to get it done right and quickly.
Step 1: Increase the size of the hard drive in VirtualBox
Using the VBoxManage program, increase the size of the vdi image using the following command. Modify it slightly based on your OS’s path deliminators. Example:
VBoxManage modifyhd "/home/mike/VirtualBox VMs/Windows XP/Windows XP.vdi" --resize 25000
The parameter of the ‘resize’ argument is the new size in MB. The above will resize to 25GB.
Now the new size will show up in VBox Media Manager, but your OS will only use the previous size (because of disk partitioning).
Step 2: Resize the partitions
This can be the tricky part. Think of your VM as a physical machine. What you’ll want to do is boot the VM from a bootable CD with a tool that can resize partitions. The disk utility on a Ubuntu Live CD makes a good choice. Once you’re in the tool, resize your VM’s partitions and reboot it.
If you have an iPod, and have installed Ubuntu Linux, you may have gotten used to manging your audio library with iTunes. When you go to reach for iTunes on Ubuntu, you may have a moment of panic when you realize there’s no Linux client. Don’t worry, there’s alternatives.
First, try a Linux-native application, such as Rhythmbox, banshee, or Amarok for music and tripod for photos. These apps all have some support for iPod devices, and can help you manage your already-existing music library. If you’re using iTunes for music downloads, you may find the music store section of Rhythmbox helpful.
iTunes in Wine via PlayOnLinux
Second, you can try installing iTunes 7 using PlayOnLinux. PlayOnLinux is an application that helps you install programs using wine and gives each program it’s own configuration environment. Programs are installed using configurations that usually give the best results, so there’s little if any manual configuration required after the fact.
Remember, wine is an interpretive layer between the Windows-native application and the Linux environment, and therefore there’s a good chance that iTunes will run slowly and some features may simply not work.
You can find PlayOnLinux in Software Center, Synaptic, or install it using the command line:
sudo apt-get install playonlinux
iTunes in Wine via manual install
Lastly, if none of the above options pan out for you, or you want to try the latest version, you can try installing iTunes manually using wine.
Start by making sure you have wine and ubuntu-restricted-extras installed. You can install these using Synaptic or the following command at the command line:
sudo apt-get install wine ubuntu-restricted-extras
With those installed, it’s time to get iTunes installed. WineHQ gives very mixed ratings for iTunes under wine, so your mileage may vary. In addition, you may find the WineHQ Forum on iTunes and wine helpful.
You can find older versions of iTunes at OldApps.com iTunes page.
Lastly, if you find you simply can’t live without iTunes in a Windows environment, you may try running a Windows virtual machine in a hypervisor like VMware (my personal favorite) or VirtualBox. I prefer VMware because it seems to have better hardware pass-through support than even the closed-source versions of VirtualBox
Have you been able to get iTunes running on Ubuntu? Have any experience or tips to share? Please do so in the comments below.
Ubuntu Post-Installation Guide v9.10
Note: Unless otherwise specified, packages are installed/uninstalled using
System > Administration > Synaptic Package Manager.
Repositories are updated in
(System > Administration > Synaptic Package Manager > Settings > Repositories)
(System > Administration > Software Sources)
> Third Party Software (for Jaunty) or
> Other Software (karmic).
Java, Flash Player
By default, openjdk-6-jre is the Java VM used on Ubuntu. This is because OpenJRE is actively developed, while Sun’s Java VM is not. Also, by default, Flash is not installed. To install Sun’s Java VM (which can be successfully installed alongside OpenJRE) as well as Flash Player, install: ubuntu-restricted-extras
Medibuntu (DVD, MP3 and WMA support, etc)
Additional codec support (MP3, WMA, etc) is provided by the non-free-codec in the Medibuntu repository. (See for information) Running the following lines in a terminal will install the correct Medibuntu repository as well as the required keyring to authenticate packages:
sudo wget -cs).list --output-document=/etc/apt/sources.list.d/medibuntu.list && sudo apt-get -q update && sudo apt-get --yes -q --allow-unauthenticated install medibuntu-keyring && sudo apt-get -q update
Following that, install the following packages:
libdvdcss2 (Allows to read encrypted DVDs)
non-free-codecs (Additional codecs)
On supported video chipsets and with the correct video drivers, Compiz can enable a variety of visual effects. If Compiz is supported on your system, it can be enabled via System > Preferences > Appearances > Visual Effects and settings the level to Normal or higher. If compiz is enabled, it is recommended to install compizconfig-settings-manager
Other Useful Programs
The following packages are useful, and installation is encouraged:
–sound and video:
(music management application which also supports a wide range of MP3 players)
While empathy is the new default IM client, pidgin is recommended for facebook users. Empathy, at the present time, does not have the same level of facebook
support that pidgin has). install:
pidgin and pidgin-facebookchat
gnome-format (a tool to easily format removable memory cards)
fglrx-amdcccle – Catalyst Control Center for ATI graphics cards
nvidia-settings – Tool for configuring the NVIDIA graphics driver
nautilus-wallpaper – Adds ‘Set as wallpaper’ to right-click menu
nautilus-image-converter – Adds ‘Rotate’ and ‘Scale’ image commands
to right-click menu
A free Virtual Machine system.
virtualbox-ose is available directly from Synaptic, but does not support USB device pass-through (allows the VM to communicate with USB devices). Sun’s VirtualBox 3.0 does support USB device pass-through easily.
See http://www.virtualbox.org/wiki/Linux_Downloads for instructions on how to add the VirtualBox repository to your system. After adding that repository, you can install the virtualbox-3.0 package.
Be sure to give yourself access to VirtualBox using System > Administration > Users and Groups
and give yourself User Privileges to ‘Use VirtualBox’
Intel microcode update
Systems with Intel CPUs should install the intel-microcode package. This provides an updated microcode to the processor at boot-time which can address processor errors and lock-ups.
Broadcom wireless issues
Systems with broadcom wireless cards which are detected but do not show any wireless networks should install the b43-fwcutter package. This provides an updated firmware for the card which fixes numerous issues. This would have to be installed using a wired network.
Dropbox on Ubuntu
Add the repository line for your Ubuntu distribution and install the nautilus-dropbox package (Reference: http://www.getdropbox.com/downloading)
It is strongly recommended to use software that is distributed in the repositories. If you need to install a program from another source, the .DEB format is the best choice. This installs the program and adds a listing in Synaptic for easily unisntalling the program when you want to.