Installing a virtual machine using VBox on a Linux server

Source: Internet
Author: User
Tags pack oracle vm virtualbox vm virtualbox

Go to the official website (www.virtualbox.org) to download the corresponding VBox version of the Linux system.

I'm using the Oracle Linux 7 system (KDE installation)

Installing VirtualBox with RPM

Find the error, follow the prompts to install the required package yum install libsdl*

Re-execution of the installation still error.

Follow the prompts to enter the log file to see the specific cause of the error

It means we didn't find our system. Install GCC on the current kernel

Yum Install GCC

Reinstall once the execution is complete • It will be installed successfully this time

Then we can go to the graphical interface to open the VBox installed virtual machine, relatively simple here is not explained, now the main point is to install the virtual machine under the command line.

1. Install the expansion pack to remotely install the operating system using RDP protocol 3389

http://download.virtualbox.org/virtualbox/

wget Http://download.virtualbox.org/virtualbox/5.1.30/Oracle_VM_VirtualBox_Extension_Pack-5.1.30-118389.vbox-extpack

Install the expansion pack

Vboxmanage Extpack Install Oracle_vm_virtualbox_extension_pack-5.1.30-118389.vbox-extpack

Note: Be sure to download the extension package that matches the VBox version, which is the first time I install it because of this problem, the installation fails, and the removal method is attached.

View all expansion packs Vboxmanage list Extpacks

Uninstalling the expansion pack vboxmanage extpack Uninstall "Oracle VM VirtualBox Extension Pack"

Clear the extension pack vboxmanage extpack cleanup

2. Create a virtual machine

Create an operating system virtual machine with the oracle_64 kernel named CENTOS6, the file storage path of the virtual machine in/opt/virtualbox/

Errors found follow the error prompts to execute Sudo/sbin/vboxconfig

The problem is that our VBox program kernel is unable to load on the current system kernel. We need to recompile the system kernel components to meet the VBox installation requirements.

Yum install kernel-devel-$ (uname-r) installs some packages and then reboot restarts on the line.

Delete and re-execute the virtual machine file you created earlier

3. Create a Virtual disk

Create a virtual disk that is 20G (size according to your needs)

Vboxmanage Createvdi--filename/opt/virtualbox/centos7.vdi--size 20000

4. Create a virtual machine's hard disk controller

Vboxmanage storagectl centos7--name storage_controller_1--add IDE

5. Mount virtual hard disk and virtual optical drive

First create the folder where the ISO file is stored and upload it to the folder.

mkdir–p/opt/setup/

Vboxmanage Storageattach centos7--storagectl storage_controller_1--type HDD--port 0--device 0--medium/opt/virtualbo X/centos7.vdi

Vboxmanage Storageattach centos7--storagectl storage_controller_1--type dvddrive--port 1--device 0--medium/opt/setup /oraclelinux-r7-u2-server-x86_64-dvd.iso

6. Set the boot order

Set the optical drive to the first boot order in order to install the operating system.

Vboxmanage MODIFYVM centos7--boot1 DVD

Vboxmanage MODIFYVM centos7--boot2 Disk

7. Create a bridged network

Need to find the network card name of the current host, if you do not know can use the ifconfig command to view, my side is ENP0S25

Vboxmanage MODIFYVM centos7--nic1 bridged--cableconnected1 on--nictype1 82540EM--bridgeadapter1 enp0s25--intnet1 Brig H1--macaddress1 Auto

8. Start the Vrde module

The Vrde module is used to start the RDP protocol and can be connected using Microsoft's 3389 client

Vboxmanage MODIFYVM Centos7--vrde on

This screen output can be turned off when we have finished installing the operating system

Vboxmanage MODIFYVM Centos7--vrde off

9, adjust the system parameters (such as memory, CPU, etc.)

Vboxmanage MODIFYVM CENTOS7--memory 2048

Vboxmanage MODIFYVM Centos7--cpus 2

10. Start the virtual machine

VBOXHEADLESS-STARTVM Centos7

11, 3389 remote Connection installation operating system

Run the MSTSC connection directly on the Windows computer

Installing a virtual machine using VBox on a Linux server

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.