Installation of VirtualBox under Ubuntu

Source: Internet
Author: User
Tags virtual environment

The official source is Virtualbox-ose, the open source version.
You can download it by yourself virtualbox.org: http://www.virtualbox.org/wiki/Linux_Downloads
Pay attention to the choice of platform
The download is the Deb package, installed directly, due to kernel updates may produce the following errors (if not, skip):
VirtualBox won't start until this problem is fixed. Please consult/var/log/vbox-install.log the kernel module does not compile. Most probably the kernel sources were not found. Install them (the package name was probably linux-headers-<version> whereby <version> can be determined by ' Una Me-r ') and execute
/ETC/INIT.D/VBOXDRV Setup
As Root.
Since the VirtualBox is to be recompiled based on the kernel version, our updates are made directly from the source, and no corresponding kernel source files are stored
Use the following command:
sudo apt-get install linux-headers-$ (uname-r)
SUDO/ETC/INIT.D/VBOXDRV Setup
To recompile the VirtualBox
VirtualBox and KVM Conflict resolution:
Lsmod |grep KVM
Confirm that your module is Kvm_intel or KVM_AMD
For example
[Email protected]:~$ lsmod|grep KVM
KVM_AMD 33036 0
KVM 162688 1 KVM_AMD
sudo rmmod kvm_amd
Or: sudo modprobe-r kvm_amd
You can start VirtualBox.
Switch back to KVM
Rmmod Vboxdrv
Rmmod VBOXNETADP
Rmmod Vboxnetflt
Modprobe KVM
Modprobe KVM_AMD
Can write a toggle script
Reference: http://hi.baidu.com/bailiangcn/blog/item/59e69da86db74bbbcb130c9d.html
#!/bin/bash
Now_vm= ' Lsmod | grep VBox '
If [x "$NOW _VM" = X ""]; Then
echo "Now's KVM, swithing to VBox ..."
sudo rmmod kvm_amd
sudo rmmod KVM
sudo modprobe vboxdrv
sudo modprobe vboxnetadp
sudo modprobe Vboxnetflt
Else
echo "Now was VBox, swithing to KVM ..."
sudo rmmod Vboxnetflt
sudo rmmod vboxnetadp
sudo rmmod vboxdrv
sudo modprobe KVM
sudo modprobe kvm_amd
Fi
echo "Switching from to XXX".
Lsmod | grep KVM
Lsmod | grep VBox
echo "Enjoy it now!"

run after installation and found in the application. For example, install XP select Lite XP First download down to the depth of 216M. 1. Clicking "New" on the VirtualBox toolbar will first let you fill in the name of the virtual machine and what system to install.   The list includes everything from Windows3.1 to the latest Windows 7 and versions of Linux and even a small subset of UNIX systems. We certainly chose Windows XP.  2. Then choose the size of the virtual memory if it is not run what big program, select a 256M can be very smooth running this parameter can be modified does not matter. 3. Then select the size of the virtual hard disk first run select Create a new virtual hard disk. Then in the select "Dynamic allocation size", not fixed hard disk file size, as the system expands the hard drive text will correspondingly expand; the second option is the size of the fixed hard disk file.  Other points to complete the configuration next. 4. Now a virtual environment is ready, but to install the ISO image should also be hung up select the virtual environment you just created click Settings to appearVirtualBox currently does not allow access to USB devices. You can add your users to the "Vboxusers" group ..., terminal inputsudo gpasswd vboxusers-a user name.  In the Settings window, click on the "Storage-without-disk virtual CD-ROM-and to the right there is a drop-down menu: Select a virtual disc to browse selection--and you want to install the XP ISO file---> Open---OK. 5. In the Setup window, you can also set the floppy disk, hard disk, optical drive, sound card, USB device and other hardware.  The general default may also be.  6. After setting up, click "Start" on the toolbar to start the installation.  7.windowsXP installation will not have to talk about who will be installed on the hard disk is the same. 8. About more than 10 minutes windowsxp is ready to install. The installation time is related to the size of your ISO file. I recommend using the streamlined XP after all just on the virtual machine.Installing the Enhancement pack(so you can share your computer's network, data, and Mount USB sticks),Click into XP you may find that the mouse between the host and XP can not easily move and need to press the right CRTL to switch out more inconvenient. In fact, only need to install the VirtualBox enhancement package on the line. After installation, VirtualBox can switch freely between the host and the virtual system like a normal application window. Open Virtual Machine Click menu "Devices" Install enhancements your windowsxp will pop up with an install screen that will call you to install VirtualBox Guest additions. If the click is not responding then select "Device", CD/DVD devices tick VirtualBox Guest additions and then click on the menu "Device", install the enhancements and then go down all the way next.  This allows your mouse to move freely between the host and the virtual machine. Set up shared folders1. Add the user to the Vboxusers user group. Vboxusers is a group that is automatically created when you install VBox. sudo adduser xxx vboxusers (xxx for your Ubuntu user name)2. Select the folder you want to share in the virtual machine's menu "devices" and "allocate data space". 3. In virtual XP, in the "My Computer"-"tools"-"Map Network drives"--"folder" Input: \\vboxsvr\xxx (XXX is the folder you want to share)--OK. This way, the new network drive will appear in XP, which is your XP and Ubuntu shared folder.

Installation of VirtualBox under Ubuntu

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.