VirtualBox安装ubuntu14.04和文件共享

因为机器的VMware使用很卡,占用更多的内存,所以我想,以取代VirtualBox。已安装ubuntu14.04使用与VMware在相同的。

VirtualBox下载链接:https://www.virtualbox.org/wiki/Downloads

依据宿主机的情况下载


安装后界面非常easy,仅仅有一个菜单条,以下是我已经安装了一个系统。


假设要创建一个虚拟系统点击“新建”


出现例如以下画面,依据实现情况选择版本号、类型


选择虚拟机内存的大小,当然机器分配的内存大点好,但总的内存是固定的。宿主机也要使用


创建虚拟硬盘,假设是第一次创建虚拟机都须要创建。

空间也要大点。


文件类型选择默认的



选择文件存放的位置和分配的大小


选择刚创建的虚拟机右键,选择“启动”


启动后第一次显示的界面,选择你要创建的映像文件


映像文件我选择“ubuntu-14.04-desktop-i386.iso”


点击“启动”就进入安装界面了。依据提示安装即可了

安装完启动之后的界面,跟在VMware上是一样的效果。


使用VirtualBox占用的内存的硬盘空间都比VMware要小。用起来还算稳定。

Android环境的搭建跟VMware也是一样的。

虚拟机安装好了,如今要设置下虚拟机与宿主机之间的文件共享

宿主机:Windows XP

虚拟机:ubuntu14.04

要实现文件共享首先要安装增强功能


但我的无法通过菜单安装。提演示样例如以下


通过命令安装

root@dzt-VirtualBox:/home/dzt# cd /media/dzt/VBOXADDITIONS_4.3.12_93733/

root@dzt-VirtualBox:/media/dzt/VBOXADDITIONS_4.3.12_93733# ./VBoxLinuxAdditions.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 4.3.12 Guest Additions for Linux............
VirtualBox Guest Additions installer
Removing installed version 4.3.12 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
Removing existing VirtualBox non-DKMS kernel modules ...done.
Building the VirtualBox Guest Additions kernel modules
The headers for the current running kernel were not found. If the following
module compilation fails then this could be the reason.

Building the main Guest Additions module ...done.
Building the shared folder support module ...done.
Building the OpenGL support module ...done.
Doing non-kernel setup of the Guest Additions ...done.
You should restart your guest to make sure the new modules are actually used

Installing the Window System drivers
Installing X.Org Server 1.15 modules ...done.
Setting up the Window System to use the Guest Additions ...done.
You may need to restart the hal service and the Window System (or just restart
the guest system) to enable the Guest Additions.

Installing graphics libraries and desktop services components ...done.
root@dzt-VirtualBox:/media/dzt/VBOXADDITIONS_4.3.12_93733# reboot

安装后须要重新启动
共享文件


选择加入


选择共享的目录


下图就是共享的目录。这个目录是在宿主机上创建的


创建一个挂载文件夹

root@dzt-VirtualBox:/mnt# mkdir shared


挂载文件夹:

root@dzt-VirtualBox:/mnt# mount -t vboxsf Android_share /mnt/shared/


在shared文件夹上能够看到宿主机上的文件。说明共享已经成功了


原文地址:https://www.cnblogs.com/zfyouxi/p/5038543.html