Create and Manage Virtual Machines Using VirtualBox
Sponsored Link
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
This command did not work for me:
sudo apt-get install VirtualBox_1.3.2_Ubuntu_Edgy_x86.deb
To get it to install (from terminal) I instead had to use:
dpkg -i VirtualBox_1.3.2_Ubuntu_Edgy_x86.deb
Thanks for introducing this. It looks very cool.
Getting the following error:
No precompiled module for this kernel found -- trying to build one
Messages 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 install
will generate:Reading package lists... Done
Building 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
you are running two instances of package installations check the process and kill it using ps -ef
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.I would try this:
Find out your kernel version with
uname -r
Download 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.bz2
Set the environment variable KERN_DIR:
export KERN_DIR="/path/to/kernelsource"
In the same terminal session try to reinstall VirtualBox.
Good luck!
Does this work in dapper? If so, do you change which VirtualBox you install?
TIAFAI
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…
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.
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)
Just confirming that the instructions from the FAQ worked perfectly.
Thanks a lot.
Odli?no. Obrisal sam vmware sa diska. ?estitam.
jan 23rd 740pm
Does this work with kubuntu 6.10 thank for your time
I hope it should work and i have not tested this on kubuntu 6.10
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:0x80004004”
what can I do?
thanks
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?
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.
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
[email protected]
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.
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:
0x80004005
Component:
Console
Interface:
IConsole {1dea5c4b-0753-4193-b909-22330f64ec45}
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
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.
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…
sorry, I should add it’s Ubuntu Edgy 2.6.17-11-generic
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,
Make that 2.6.17-11-generic – my bad!
Thanks,
Nice tutorial, I used it as the basis for a tutorial I made to install Vista in VirtualBox:
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
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
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.
I have VirtualBox running on Ubuntu Feisty but when try add a share it cannot find the VM and if I try
[email protected]:/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 = 0x80070057
[!] Full error info present: true , basic error info present: true
[!] Result Code = 0x80070057
[!] 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}
[email protected]:/home/bob/.VirtualBox#
I get the above error.
yet in the .VirtualBox/machines the VM is there.
any ideas?