Create and Manage Virtual Machines Using VirtualBox
Posted by admin on January 18th, 2007
Email This Post
Install Virtualbox in Ubuntu Gutsy
If you want to install Virtualbox in Ubuntu Dapper,Edgy,Feisty,Gutsy you need to download the latest .deb package from here if you are using Ubuntu dapper you need to download the appropriate package from this link.In this example i am showing how to install virtualbox in Ubuntu edgy.
Preparing Your system
First you need to install the following packages
sudo apt-get install libxalan110 libxerces27
wget http://www.virtualbox.org/download/1.5.4/virtualbox_1.5.4-27034_Ubuntu_gutsy_i386.deb
Once you download the package you have virtualbox_1.5.4-27034_Ubuntu_gutsy_i386.deb file
Install.deb file using the following command
sudo dpkg -i virtualbox_1.5.4-27034_Ubuntu_gutsy_i386.deb
At the time of installation if you have any dependency problems like the following errors
Selecting previously deselected package virtualbox.
(Reading database … 174459 files and directories currently installed.)
Unpacking virtualbox (from virtualbox_1.5.4-27034_Ubuntu_gutsy_i386.deb) …
dpkg: dependency problems prevent configuration of virtualbox:
virtualbox depends on libxalan110; however:
Package libxalan110 is not installed.
virtualbox depends on libxerces27; however:
Package libxerces27 is not installed.
dpkg: error processing virtualbox (–install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
virtualbox
If you see the above error message you can use the following command to install all the required dependencies
sudo apt-get -f install
This will complete the installation
Starting the VirtualBox Graphical User Interface
If you want to start Virtualbox GUI use the following command from your terminal(Applications—>Accessories— >Termianl)
VirtualBox
Once it opens you should see the following screen

VirtualBox Version Details

Creating a Virtual machine
If you want to create a Virtual machine you need to click on “New” button in the user interface will guide you through the new virtual machine

Now the following wizard will appear click next

In the next screen You nees to select VMname and OS Type and click next

Now you need to select the memory for your VM

Here you need to select the Virtual hard disk details and click next

Summary of your Virtual Machine and click finish

Once you click on finish You should see the following screen

If you want to start this VM you need to click on “Start” in the user interface

This is virtualbox installation in ubuntu edgy and also explains how to create a new virtual machine now you can install whatever OS you want to test.If you want more information on virtualbox check here
If you want to be notified the next time we write something please subscribe to our RSS feed.Thanks for Visiting!

January 18th, 2007 at 3:39 pm
This command did not work for me:
sudo apt-get install VirtualBox_1.3.2_Ubuntu_Edgy_x86.debTo get it to install (from terminal) I instead had to use:
dpkg -i VirtualBox_1.3.2_Ubuntu_Edgy_x86.debThanks for introducing this. It looks very cool.
January 22nd, 2007 at 8:17 pm
Getting the following error:
No precompiled module for this kernel found -- trying to build oneMessages displayed during module compilation will be logged to /var/log/vbox-install.log
Compilation of kernel module failed, aborting installation
dpkg: error while cleaning up:
subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
VirtualBox_1.3.2_Ubuntu_Edgy_x86.deb
And at this point I cannot install or uninstall, completely stuck
The /var/log/vbox-install.log file contains:
make: Entering directory `/opt/VirtualBox-1.3.2/src'Makefile:42: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR= and run Make again.. Stop.
make: Leaving directory `/opt/VirtualBox-1.3.2/src'
Shouldn’t the .deb file reference whatever kernel sources it needs (so they get installed)?
Also, running
sudo apt-get -f installwill generate:Reading package lists... DoneBuilding dependency tree
Reading state information... Done
E: The package virtualbox needs to be reinstalled, but I can't find an archive for it.
Any suggestions?
Thanks,
Marius
January 22nd, 2007 at 8:44 pm
you are running two instances of package installations check the process and kill it using ps -ef
January 22nd, 2007 at 11:01 pm
I don’t think it is that. Even rebooted my machine. Now synaptic is completely hosed, running any search will return right away with no results. Damn virtualbox
Also, apt-get keeps saying “The package virtualbox needs to be reinstalled, but I can’t find an archive for it.”.
I should probably install the sources for my kernel, but with synaptic being hosed not sure how to do that. This hopefully would allow the installation of virtualbox to complete properly.
Now for every single apt operation I get
subprocess post-installation script returned error exit status 1, cannot even forcefully remove virtualbox. It seems to call the same script even for remove.January 23rd, 2007 at 8:26 am
I would try this:
Find out your kernel version with
uname -rDownload the sources from http://www.kernel.org/pub/linux/kernel/
Unpack the sources wherever you want them:
tar xvjf linux-2.x.x.x.tar.bz2Set the environment variable KERN_DIR:
export KERN_DIR="/path/to/kernelsource"In the same terminal session try to reinstall VirtualBox.
Good luck!
January 23rd, 2007 at 1:14 pm
Does this work in dapper? If so, do you change which VirtualBox you install?
TIAFAI
January 23rd, 2007 at 1:55 pm
I’m having the exact same problem as Marius Scurtescu, if there is a solution the either a correct the install or removal of VirtualBox, please provide it.
Tried snauth’s solution and a little hazy on how to set the KERN_DIR enviroment and the likes.
Otherwise, thanks for the great article and seems like a great product when it’s working, but I’m in a bind now with the synaptic manager…
January 23rd, 2007 at 2:11 pm
Does this work in dapper? If so, do you change which VirtualBox you install?
TIAFAI
Yes you need to download the dapper version of .deb package from virtualbox download lonk provided in the article.
January 23rd, 2007 at 2:24 pm
Any one is having problem same as Marius here is the solution from virtualbox FAQ
Debian packages: If the installation of the VirtualBox_*.deb package was not successful because the compilation of the kernel module fails, it might not be possible to remove the package nor to install other packages as the pre-remove (prerm) script of the package (which is executed prior to package removing or upgrading) aborts with an error “(Kernel module not found)…fail!”. In that case do the following:
Edit /etc/init.d/virtualbox and change line 129 from ‘exit 1′ to ‘exit 0′
Reinstall the virtualbox package by ‘dpkg -i ‘. An installation failure of this package is expected.
Edit /var/lib/dpkg/info/virtualbox.postinst and change line 39 from ‘exit 1′ to ‘exit 0′
Execute ‘
dpkg --configure --pending‘The package should now be installed successfully. However, the kernel module is still not compiled. Before you will be able to execute VirtualBox you have to create a kernel module for your current kernel, as described in the User Manual(check the link provided at the end of the article)
January 23rd, 2007 at 6:13 pm
Just confirming that the instructions from the FAQ worked perfectly.
Thanks a lot.
January 23rd, 2007 at 6:23 pm
Odlično. Obrisal sam vmware sa diska. Čestitam.
January 24th, 2007 at 3:42 am
jan 23rd 740pm
Does this work with kubuntu 6.10 thank for your time
January 24th, 2007 at 9:22 am
I hope it should work and i have not tested this on kubuntu 6.10
January 27th, 2007 at 3:37 pm
Hallo, my VirtualBox installation works without errors in Edgy with kernel 2.6.17-10-generic, but when I call VirtualBox in the terminal, a window opens with a COM error message inside like “Failed to create the VirtualBox COM object” and in the window “Callee RC:0×80004004″
what can I do?
thanks
January 31st, 2007 at 9:40 am
Driving me nuts! I can install Windows and all hardware is detected by the windows guest. When I try to install Server 6.0.6 or Server 6.10, neither guest boot the kernel. Does vbox have problems with booting smp kernels?
February 13th, 2007 at 8:24 pm
Installation on Edgy for me went fine. The only problem I had was once I created a virtual instance and tried to start it got a 1909 error that said it couldn’t find a driver. Had to add read write privledges to the /dev/vboxdrv with a
sudo chmod a+rx vboxdrv
and it works like a charm.
February 16th, 2007 at 9:56 pm
I’m another Windows user attempting to migrate to Linux/Ubuntu 6.10. Have VirtualBox running with my Windows XP host, but still struggling with the Linux Host setup/install.
Can you please tell me how/where to get the additional apps that VirtualBox requires?
I tried your instructions and when I ran the following:
sudo apt-get install libxalan110 libxerces27
The TERMINAL halted with a message that the libxalan110 could not be found.
Thanks
Scott
scottcarson@austin.rr.com
February 18th, 2007 at 4:01 pm
VirtualBox is great! Thanks for doing this write up. I just want to pass on a couple of tips that helped me get things going.
First, during the initial install, the vboxdrv kernel module doesn’t load, so the installation fails with a
scaring sounding message about not being able to complete the postisntall script. To resolve this, you can either just run the installation again, and it completes w/o any failure messages, or you can run
sudo modprobe vboxdrv
and that will get the driver loaded.
I don’t know if others have run into this, but trying to install a new Windows guest OS from a physical CD/DVD drive was painfully slow. It’s much easy to copy the CD/DVD onto your system to a location like /tmp/winxp.iso and then point at it during the initial install with the “Devices” -> “Mount CD/DVD-ROM” -> “CD/DVD-ROM Image…” menu selection.
A quick note for the last post from Scott, check to make sure that you have the “universe” repository enabled in /etc/apt/sources.list.
February 18th, 2007 at 6:05 pm
i get this error what can i do
VirtualBox kernel driver not accessible, permission problem.
At ‘/home/vbox/vbox/src/VBox/VMM/VM.cpp’ (303) in int VMR3Create(void (*)(VM*, void*, int, const char*, unsigned int, const char*, const char*, char*), void*, int (*)(VM*, void*), void*, VM**).
VBox status code: -1909 VERR_VM_DRIVER_NOT_ACCESSIBLE
.
Result Code:
0×80004005
Component:
Console
Interface:
IConsole {1dea5c4b-0753-4193-b909-22330f64ec45}
March 1st, 2007 at 11:08 am
Scott Carson and others getting the error about libxalan110 (or other packages not being found):
To install onto a clean Edgy installation I had to:
1. sudo vi /etc/apt/sources.list
and uncomment the ‘universe’ entries (as mentioned by Kevin Snow)
2. sudo apt-get install linux-libc-dev libc6-dev libqt3-mt libxalan110 libxerces27
3. sudo dpkg -i VirtualBox_1.3.6_Ubuntu_edgy_i386.deb
4. Add your user the vxboxusers group in /etc/group (System->Administration->Users and Groups if you’re not sure)
5. Log out and log back in (so your ‘new’ group is picked up).
Thanks,
:-Phil
March 6th, 2007 at 7:22 pm
if you are getting this error:
VirtualBox kernel driver not accessible, permission problem.
At ‘/home/vbox/vbox/src/VBox/VMM/VM.cpp’ (303) in int VMR3Create(void (*)(VM*, void*, int, const char*, unsigned int, const char*, const char*, char*), void*, int (*)(VM*, void*), void*, VM**).
VBox status code: -1909 VERR_VM_DRIVER_NOT_ACCESSIBLE
Then it is a permissions problem. either you are not root, or you are not in the vboxusers group, see the user manual for virtual box for more info.
If you get an error about the console,
it may be your X Server, starting VirtualBox over a VNC connection can be problematic.
March 12th, 2007 at 2:03 pm
Worked for me, I have a XP pro / Ubuntu dual boot HP dv1000 (955 chipset) I installed virtualbox on Ubuntu (following the instructions EXACTLY) and it all worked fine.
Then installed XP (pro) into virtualbox from the DVD drive and that worked too
Now I just need to get it to set-up a shared file an I’ll be laughing…
March 12th, 2007 at 2:06 pm
sorry, I should add it’s Ubuntu Edgy 2.6.17-11-generic
March 21st, 2007 at 2:06 am
My VirtualBox installation worked without errors in Edgy with kernel 2.6.17-10-generic, and was actually running a virtual OS for a while. But now a few weeks later when I call VirtualBox a window opens with a COM error message inside like “Failed to create the VirtualBox COM object” and in the window “Callee RC:0×80004004″
Help?
Thanks,
March 21st, 2007 at 2:11 am
Make that 2.6.17-11-generic - my bad!
Thanks,
April 2nd, 2007 at 2:36 am
Nice tutorial, I used it as the basis for a tutorial I made to install Vista in VirtualBox:
April 20th, 2007 at 12:31 am
VirtualBox, Everything you need to know…
VirtualBox is a simple easy to use virtualization tool. With support for most common Intel clients such as Windows XP, Vista (note issue about manually installing NIC drivers, Solaris and many versions of Linux. The windows interface is quick to load a…
May 3rd, 2007 at 1:15 pm
Hey nice howto..
I have VirtualBox installed on my kubuntu edgy, I installed opensuse10.2 as guest and it seems to be running fine, I am still in exploration phase though.
i am trying to share my host files on the guest, I executed the command that is in the VBox manual;
VBoxManage sharedfolder add “VM name” -name “sharename” -hostpath “C:\test” -transient
filling in the appropriate names and path relating tomy system;
VBoxManage sharedfolder add “OpenSuse10.2″ -name “mulanga” -hostpath “/home/mojojojo/Desktop” -transient
i am not exactly sure how to do the next step which is mounting from the guest shell because it doesn’t locate the file i had assigned.
can you help in anyway?
thanks
May 4th, 2007 at 11:34 pm
If you get a message saying “VirtualBox kernel driver not accessible, permission problem” … run usermod -G vboxusers -a …log out for the changes to take effect.
From: http://www.virtualbox.org/wiki/User_FAQ
May 5th, 2007 at 4:10 pm
First, thank you once again Ubuntu-geek for this quality how-to.
Second you can use “Open With -> GDebi” to install virtual box + dependencies from the gui (just a FYI for gui-centric individuals)
And last, a word about documentation and “beyond the install” information :
The VirtualBox documentation seems sketchy at times and is geared for rpm systems.
I am trying to maintain some additional, Ubuntu specific documentation here :
http://doc.gwos.org/index.php/VirtualBox
Topics include Seamless Integration of Windows Applications, VBoxGuestAdditions, Networking, Enable USB devices, Sharing your hard drive, Running “headless”, Convert a VMWare appliance, and updating (Virtualbox and/or kernel).
Please consider adding a link to the wiki to your how to !
I am running Virtualbox on Feisty (+ Beryl) and have had no problems.
Any input to the wiki is appreciated! You can PM me on the Ubuuntu forums if you have suggestions, items you would like to see documented in the wiki, or feedback.
May 10th, 2007 at 3:51 pm
I have VirtualBox running on Ubuntu Feisty but when try add a share it cannot find the VM and if I try
root@xxxxx:/home/bob/.VirtualBox# VBoxManage showvminfo Winxp
VirtualBox Command Line Management Interface Version 1.3.8
(C) 2005-2007 InnoTek Systemberatung GmbH
All rights reserved.
[!] FAILED calling virtualBox->FindMachine (Bstr(argv[0]), machine.asOutParam()) at line 1436!
[!] Primary RC = 0×80070057
[!] Full error info present: true , basic error info present: true
[!] Result Code = 0×80070057
[!] Text = Could not find a registered machine named ‘Winxp’
[!] Component = VirtualBox, Interface: IVirtualBox, {e1d95593-f579-4f47-b489-0b67181014e1}
[!] Callee = IVirtualBox, {e1d95593-f579-4f47-b489-0b67181014e1}
root@xxxxx:/home/bob/.VirtualBox#
I get the above error.
yet in the .VirtualBox/machines the VM is there.
any ideas?
May 13th, 2007 at 9:01 pm
Hi,
Great how to. Worked like a charm. I installed VirtualBox using the .deb file for Feisty (KUbuntu 7.0.4) and it worked flawlessly. Have setup a Feisty guest on a Feisty host and it is working perfectly with the guest additions installed.
A welcome pleasant experience after battling with Qemu on Feisty all day long.
Had to re-install Qemu to get it to finally work(was immediately going to ‘Stopped’ after starting Qemu). And then it finally bombed during the Feisty installation as guest OS with a message that primary partition ‘/’ could not be mounted! What a PITA. qcow, qcow2, raw format no help. Tried Edgy, same problem. No help from Google searches.
Same setup on Virtual Box worked flawlessly! Performance appears to be acceptable too with a virtual mem of 256MB running on a Pentium 3GHz processor with 1GB memory on host system running Feisty Fawn (KUbuntu 7.0.4 desktop version).
-Andy
May 18th, 2007 at 3:16 am
if u get:
VirtualBox kernel driver not accessible
run it as root
June 1st, 2007 at 3:29 pm
i cant build form source on edgy 64bit…
$ ./configure
Checking for environment:
Warning! Support for AMD64 host systems is work in progress.
Don’t expect it to work or even to build at the moment.
Determined linux.amd64, OK.
Checking for kBuild: found, OK.
Checking for gcc: found version 4.1.2, using precompiled objects for recompiler, OK.
Checking for as86:
** as86 (variable AS86) not found!
i guess i will just have to wait abit…
June 3rd, 2007 at 7:40 pm
Error cannot install ‘libxalan’
how do I solve this problem?
June 22nd, 2007 at 9:33 am
apt-get install bin86
July 3rd, 2007 at 9:12 pm
Uhmm… Where’s that makefile for VirtualBox located at? Seems like I’m having some minor difficulties getting that KERN_DIR added, although I do know in which directory the source code is… Probably I’m just stupid or something. Maybe I should just cry out for my mom to help me.
August 26th, 2007 at 8:16 pm
Your instructions worked great and Virtual Box opened right up. I am using Ubuntu Feisty 7.04 (32 bit). Virtual Box Version 1.4.0 for i386. However, I also received this error in the terminal at the same time.
WARNING: You are not a member of the “vboxusers” group. Please add yourself
to this group before starting VirtualBox.
You will not be able to start VMs until this problem is fixed.
Qt WARNING: X Error: BadDevice, invalid or uninitialized input device 166
Major opcode: 146
Minor opcode: 3
Resource id: 0×0
Qt WARNING: Failed to open device
Qt WARNING: X Error: BadDevice, invalid or uninitialized input device 166
Major opcode: 146
Minor opcode: 3
Resource id: 0×0
Qt WARNING: Failed to open device
How do I add myself as a member of the group? And when I do that, will those warning messages disappear?
August 26th, 2007 at 8:55 pm
nevermind about adding myself as a user. I managed to do that, but the above warning messages are still there. Can someone give me an instruction on how to remove those warnings?
September 1st, 2007 at 4:50 pm
I have successfully installed Virtualbox on two machines, both running Feisty. I used the repositories listed at Innotek and the installations went perfectly.
On the other hand…
On Machine 1, I have tried to install three guest OSes without success: OS/2 4.5 (crashes during install), Windows 98 (freezes during install) and - scrabbled around in box of operating systems - BeOS 4.5 (can’t access the CD it has just booted from and gives up during install)
On Machine 2, a laptop, I have WIndows 98 installed as guest, but it is very slow, uses 50% CPU at all times, won’t run in anything other than 640*480*16 and crashes on restart if I try to save a snapshot - it has to be rebooted each time.
So rather a mixed experience. Looks nice, installs easily, doesn’t actually, erm, work.
Ian
December 31st, 2007 at 10:16 pm
unable to get WinXp.iso to load correctly in Virtual Box. The install locks up every time.
ANy Ideas?
Thx
Mike
January 26th, 2008 at 11:31 pm
I’ve read all the manual, faqs, pointer, etc and I’m still having problems. I’ve installed Virtualbox, have the account permissions correct, and have created a VM. I don’t know how to load the OS into the VM or have the VM use a directory on a fat32 partition. So everytime that I ‘power up’, I get no bootable OS found. Can anyone point me to the directions on what to do next. Regards.
January 26th, 2008 at 11:41 pm
@hi scott
first you need to create a new VM with the above procedure after taht you need to follow as normal machine procedure for example you want to boot from cd use f2 key to set the boot options at the time of starting your VM then start the installation
January 29th, 2008 at 12:01 am
Your input was definitely helpful. The problem was that, even though the OS cd was being recognized by the Linux, VB was only seeing the cdrom, not the burner. I am now able to select f12, select cdrom, and it accesses the lower cdrom with the OS cd.
Thank you so much!
February 4th, 2008 at 4:08 am
Qt WARNING: Session management error: Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed
Segmentation fault (core dumped)
Why the warning/error above happen? How to solve it?
Thanks
February 6th, 2008 at 12:06 am
The install looks like it works fine.
I added myself to the vboxusers group and verified with grep.
When I try to start VirtualBox, I get the following messages:
*** stack smashing detected ***: /usr/lib/virtualbox/VirtualBox terminated
Aborted (core dumped)
What does this mean and how do I fix it?
Thanks
April 4th, 2008 at 2:46 am
@MKDon
You should run VBoxManage commands with as user “bob”, NOT root. That particular command looks for your “guest” in /home/.bob/
July 4th, 2008 at 12:30 am
Hi
I am geting thefollowing error while trying to start;
The VirtualBox kernel driver is not accessible to the current user. Make sure that the user has write permissions for /dev/vboxdrv by adding them to the vboxusers groups. You will need to logout for the change to take effect..
VBox status code: -1909 (VERR_VM_DRIVER_NOT_ACCESSIBLE).
Result Code:
0×80004005
Component:
Console
Interface:
IConsole {1dea5c4b-0753-4193-b909-22330f64ec45}
Please let me know the solution to resolve this.
October 18th, 2008 at 1:54 pm
Any one know if I can allow access to a guest OS from multiple user accounts in Ubuntu? (For example, so that both my wife and I can access the same guest OS installation of XP?)
Thank you.
November 15th, 2008 at 10:30 pm
I have just installed Virtual Box on Ubuntu 8.04. Seems to work pretty well. There are some apps I need on a daily basis that only work on Windows. Is my box vulnerable since I have Windows running on it or is the fact that the main OS is Linux and Windows is running on the VM mean that I have the natural protection that Linux provides ok?