Install VirtualBox in Archlinux and Archlinux in VirtualBox

Source: Internet
Author: User
Tags comparison table

In Archlinux, I have a license, and in VirtualBox, I have a license. Both can be used simultaneously, and AV can also be used.

Nowadays, the performance of machines is getting stronger and stronger, and the performance of virtual machines running on new machines will not be worse than that of computers five years ago. It would be a waste to just chat online and listen to music and watch movies. Therefore, I often try new systems and software. Since I had a virtual machine, it was like Sun Wukong's golden hoop. My waist was not sour and it didn't hurt. Now, like cloud computing, virtualization is becoming more fashionable. Just like Yang Mi in Cannes, what we see is virtual.

Wikipedia has a virtual machine software comparison table. I have used only bochs, qemu, virtualbox, and vmware. It is said that the kernel development bochs is better. I also want to learn about the kernel. When it is recorded in a special article, I will press it for the moment. In terms of open source and performance,VirtualboxIt is really essential medicine for killing people at home:

Install VirtualBox in Archlinux
sudo pacman -S virtualboxsudo gpasswd -a $USER vboxusers

After virtualbox is installed, there are multiple vboxusers user groups in the system. Only users in this group can use virtual machines.

/Etc/rc. conf

MODULES=(…… vboxdrv vboxnetflt)

/Etc/rc. local

# Dry-load vbox* modules and trigger a rebuild if modprobe failsmodprobe -nqs vbox{drv,pci,net{flt,adp}} >/dev/null 2>&1 || ( /usr/bin/vboxbuild && . /etc/rc.conf && modprobe -ab ${MODULES[*]} )

After the kernel is updated, you need to re-compile the module. The solution provided above first tries to load the module. If it fails, the module is automatically compiled.
On the official wiki, the recommended method is to use the mkinitcpio hook to automatically compile when the kernel is updated, and the related hook is in the aur.

Install Archlinux in VirtualBox

After archlinux is installed in virtualbox as usual, archlinux is still "available". To be "Easy to use", some special settings and adjustments are required.

sudo pacman -S virtualbox-archlinux-additionssudo groupadd vboxsfsudo gpasswd -a $USER vboxsf

To automatically load shared directories at startup, you must be a member of the vboxsf group. You need to manually create this user group.

/Etc/rc. conf

MODULES=(... vboxguest vboxsf vboxvideo)……DAEMONS=(... vbox-service ...)

By default, vbox-service enables many practical functions, such as synchronizing time with the host, loading shared directories at startup, etc. You can also manually control them using VBoxService commands.
. Xinitrc

VBoxClient-all &exec ck-launch-session startkde

The VBoxClient command provides advanced desktop functions such as clipboard sharing. VBoxClient-all is used to enable all these functions.

Create/etc/modprobe. d/blacklist. conf

blacklist i2c_piix4

The VM does not include the SMBus system bus. When the VM is started, udev will report an error and the i2c_piix4 module will be blacklisted.

Skills and others: Shared Folders will be mounted to the sf_sharedfolder directory under the/media directory in the client.

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.