VirtualBox安装ubuntu14.04和文件共享

来源:互联网 发布:物流网络存在的问题 编辑:程序博客网 时间:2024/06/01 08:33

由于机器的原因VMware使用起来很卡,占用的内存多,所以想换成VirtualBox,安装了ubuntu14.04的使用跟在VMware上是一样的。

VirtualBox下载地址:https://www.virtualbox.org/wiki/Downloads

根据宿主机的情况下载


安装后界面很简单,只有一个菜单栏,下面是我已经安装了一个系统。


如果要创建一个虚拟系统点击“新建”


出现如下画面,根据实现情况选择版本、类型


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


创建虚拟硬盘,如果是第一次创建虚拟机都需要创建。空间也要大点。


文件类型选择默认的



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


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


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


映像文件我选择“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目录上可以看到宿主机上的文件,说明共享已经成功了


0 0
原创粉丝点击