关于在windows10中的vmware9.0里面安装的ubuntukylin15.04和windows共享目录的一些反思
关于在windows10中的vmware9.0里面安装的ubuntukylin15.04和windows共享目录的一些反思
一、遇到的问题
如题目所说,在windows的虚拟机中和windows共享目录,其中虚拟机中安装的系统是ubuntukylin15.04,可以在网上找到如下做法,
1.1、首先是在vmware中设置共享虚拟目录,这一点非常简单,只需要在vmware中设置就可以了,把权限设置为共享可读写。
1.2、之后打开linux系统,并且在vmware中的vm菜单项中有一个install vmware tools或者是reinstall vmware tools,如果是后者说明我们已经安装了,或者安装的不成功也会出现,不管怎么样我们在linux打开的情况下,使用该操作,系统会提示我们是否同意通过光驱的方式让vmware tools的安装包嵌入进我们的linux文件系统中,我们点击同意,之后我们可以在文件系统中找到vmware tools这个目录项,之后,我们打开该目录项,可以看到有两个文件,一个是manifest.txt,另一个就是我们的vmwaretool的安装包。
在这里我们要非常注意,我们这种方式使用的是虚拟光驱来查看的文件,我们不能再光驱上对文件进行修改或者解压,这一点非常重要,那怎么办呢,我们要解压并安装该文件,那就只能使用命令将这个文件拷到我们自己的文件系统中,这样就可以解压缩了,或者直接解压缩到文件系统的某一目录中,使用的命令为:tar -zxf VMwareTools-9.2.0-799703.tar.gz -C /media/VMware,这样我们就可以在/media/VMware中得到想要的解压文件了,这个VMware文件夹也是我们自己创建的,很简单。可以看到解压后的文件夹,然我们打开看一下。其中的一个目录下的vmhgfs.tar我们以后会非常的感兴趣!
1.3,然后我们安装这个软件,只需运行vmware-install.pl即可。
root@zyr-virtual-machine:/media/VMware# cd ./vmware-tools-distrib/
root@zyr-virtual-machine:/media/VMware/vmware-tools-distrib# dir
bin doc etc FILES INSTALL installer lib vmware-install.pl
root@zyr-virtual-machine:/media/VMware/vmware-tools-distrib# ./vmware-install.pl
下面是安装过程:
root@zyr-virtual-machine:/media/VMware/vmware-tools-distrib# ./vmware-install.pl
The installer found the following conflicting packages installed on the system and will now remove them: open-vm-tools (正在读取数据库 ... 系统当前共安装有 159148 个文件和目录。)
正在卸载 open-vm-tools (2:9.4.6-1770165-8ubuntu1) ...
正在处理用于 man-db (2.7.0.2-5) 的触发器 ...
正在处理用于 libc-bin (2.21-0ubuntu4) 的触发器 ...
Creating a new VMware Tools installer database using the tar4 format. Installing VMware Tools. The file /etc/vmware-tools/suspend-vm-default that this program was about to
install already exists. Overwrite? [yes] y The file /etc/vmware-tools/poweroff-vm-default that this program was about to
install already exists. Overwrite? [yes] yes The file /etc/vmware-tools/scripts/vmware/network that this program was about
to install already exists. Overwrite? [yes] yes The file /etc/vmware-tools/poweron-vm-default that this program was about to
install already exists. Overwrite? [yes] The file /etc/vmware-tools/statechange.subr that this program was about to
install already exists. Overwrite? [yes] The file /etc/vmware-tools/resume-vm-default that this program was about to
install already exists. Overwrite? [yes] In which directory do you want to install the binary files?
[/usr/bin] What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
[/etc] What is the directory that contains the init scripts?
[/etc/init.d] In which directory do you want to install the daemon files?
[/usr/sbin] In which directory do you want to install the library files?
[/usr/lib/vmware-tools] The path "/usr/lib/vmware-tools" does not exist currently. This program is
going to create it, including needed parent directories. Is this what you want?
[yes] yes In which directory do you want to install the documentation files?
[/usr/share/doc/vmware-tools]
The path "/usr/share/doc/vmware-tools" does not exist currently. This program
is going to create it, including needed parent directories. Is this what you
want? [yes]
The installation of VMware Tools 9.2.0 build-799703 for Linux completed
successfully. You can decide to remove this software from your system at any
time by invoking the following command: "/usr/bin/vmware-uninstall-tools.pl". Before running VMware Tools for the first time, you need to configure it by
invoking the following command: "/usr/bin/vmware-config-tools.pl". Do you want
this program to invoke the command for you now? [yes]
The file /etc/pam.d/vmtoolsd that this program was about to install already
exists. Overwrite? [yes]
Initializing... Making sure services for VMware Tools are stopped. Stopping VMware Tools services in the virtual machine:
Guest operating system daemon: done
Unmounting HGFS shares: done
Guest filesystem driver: done
Stopping Thinprint services in the virtual machine:
Stopping Virtual Printing daemon: done update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
The VMware FileSystem Sync Driver (vmsync) allows external third-party backup
software that is integrated with vSphere to create backups of the virtual
machine. Do you wish to enable this feature? [no]
The module vmci has already been installed on this system by another installer
or package and will not be modified by this installer. Use the flag
--clobber-kernel-modules=vmci to override. The module vsock has already been installed on this system by another installer
or package and will not be modified by this installer. Use the flag
--clobber-kernel-modules=vsock to override. The module vmxnet3 has already been installed on this system by another
installer or package and will not be modified by this installer. Use the flag
--clobber-kernel-modules=vmxnet3 to override. The module pvscsi has already been installed on this system by another
installer or package and will not be modified by this installer. Use the flag
--clobber-kernel-modules=pvscsi to override. The module vmmemctl has already been installed on this system by another
installer or package and will not be modified by this installer. Use the flag
--clobber-kernel-modules=vmmemctl to override. The VMware Host-Guest Filesystem allows for shared folders between the host OS
and the guest OS in a Fusion or Workstation virtual environment. Do you wish
to enable this feature? [yes]
The module vmhgfs has already been installed on this system by another
installer or package and will not be modified by this installer. Use the flag
--clobber-kernel-modules=vmhgfs to override. The module vmxnet has already been installed on this system by another
installer or package and will not be modified by this installer. Use the flag
--clobber-kernel-modules=vmxnet to override. The vmblock enables dragging or copying files between host and guest in a
Fusion or Workstation virtual environment. Do you wish to enable this feature?
[yes] !!! [EXPERIMENTAL] !!!
VMware automatic kernel modules enables automatic building and installation of
VMware kernel modules at boot that are not already present. By selecting yes,
you will be enabling this experimental feature. You can always disable this
feature by re-running vmware-config-tools.pl. Would you like to enable VMware automatic kernel modules?
[no] Thinprint provides driver-free printing. Do you wish to enable this feature?
[yes] Disabling timer-based audio scheduling in pulseaudio. Detected X server version 1.17.1 Distribution provided drivers for Xorg X server are used. Skipping X configuration because X drivers are not included. Creating a new initrd boot image for the kernel.
update-initramfs: Generating /boot/initrd.img-3.19.0-15-generic
Checking acpi hot plug done
Starting VMware Tools services in the virtual machine:
Switching to guest configuration: done
Blocking file system: done
Guest operating system daemon: done
Starting Virtual Printing daemon: done
The configuration of VMware Tools 9.2.0 build-799703 for Linux for this running
kernel completed successfully. You must restart your X session before any mouse or graphics changes take
effect. You can now run VMware Tools by invoking "/usr/bin/vmware-toolbox-cmd" from the
command line. To enable advanced X features (e.g., guest resolution fit, drag and drop, and
file and text copy/paste), you will need to do one (or more) of the following:
1. Manually start /usr/bin/vmware-user
2. Log out and log back into your desktop session; and,
3. Restart your X session. Enjoy, --the VMware team Found VMware Tools CDROM mounted at /media/zyr/VMware Tools. Ejecting device
/dev/sr0 ...
umount: /media/zyr/VMware Tools: target is busy
(In some cases useful info about processes that
use the device is found by lsof(8) or fuser(1).)
/usr/bin/eject:卸载 `/media/zyr/VMware Tools'失败
Eject Failed: If possible manually eject the Tools installer from the guest
cdrom mounted at /media/zyr/VMware Tools before canceling tools install on the
host.
vmwaretools安装过程
1.4、安装完成之后,我们按理说就可以用了,但是比我们想象的复杂,首先我们需要使用mount将我们的Windows上面的共享文件夹目录挂载到Linux中的某一个文件夹下面,这样我们才能找到并使用,使用命令 mount -t vmhgfs .host:/ /mnt/hgfs,可是是是往往不如人意,想必大家还知道我刚才说的vmhgfs.tar,在这里我们运行这条命令,结果为Error: cannot canonicalize mount point: No such file or directory。这是因为我们还没创建hgfs,我们创建mkdir /mnt/hgfs,然后再运行 mount -t vmhgfs .host:/ /mnt/hgfs命令,结果为Error: cannot mount filesystem: No such device,这一下可怎么办,刚刚的是小问题,可是现在的却是大问题呀,没有vmhgfs这样的文件系统,很多人都放弃了试了好多次,网上有人说使用mount -t vmhgfs-fuse .host:/ /mnt/hgfs,或者先安装sudo apt-get install open-vm-dkms,然后再使用上一条命令,可是我的网上库里面根本没有open-vm-dkms文件,有一个open-vm-tools-dkms文件,我使用之后提示下面信息,说明已经存在了并且安装了,所以这些措施根本就没有用,我又在网上看到了什么版本冲突了,什么漏洞了,需要打补丁之类的,搞得我很郁闷,难不成还要重装系统不成?!后来我又尝试了很久还是不行,基本上也没办法了,就把虚拟机关闭又重启了一次,然后打开,还是什么都没有,我又尝试着使用了一遍mount -t vmhgfs .host:/ /mnt/hgfs命令,看到出错的信息变了,变成了下面的提示Could not add entry to mtab, continuing,然后我又查了一些资料,还是无解,并且运行了vmware-hgfsclient,也能正常显示我的共享目录,如下图所示。不甘心之下我在被mount的目录看了一下,没想到竟然成功了,我看到了共享的文件。
root@zyr-virtual-machine:/# sudo apt-get install open-vm-tools-dkms
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
open-vm-tools-dkms 已经是最新的版本。
下列软件包是自动安装的并且现在不需要了:
libdumbnet1 zerofree
使用'apt-get autoremove'来卸载它(它们)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 343 个软件包未被升级。
到了这里我都要感激涕零了,总算功夫不负有心人,搞了一下午的时间,还是让我误打误撞的解决了问题,实在是这个功能对我太重要了呀,我的作业要在上面完成,并且取出来呢,哈哈~~~心情大好之下,我知道这种机制是不长久的,因为每次开虚拟机的时候都要使用一下mount命令,最好的办法是在系统的启动文件中加入这一语句,这样我们就可以高枕无忧了!!!!!!使用sudo gedit /etc/init.d/rc.local,在其中加入,保存并退出。
可是在我的电脑上这样做了之后,系统也出现了异常,打开之后发现并没有什么改变,还是没有加载进文件系统中,所以我又使用了在/etc/init.d/open-vm-tools末尾增加一行: sudo mount -t vmhgfs .host:/ /mnt/hgfs ,保存并重启系统还是不行,所以最好不要这样做。最好的办法就是在关闭虚拟机上面的该Linux系统的时候,将关闭命令使用suspend,这样虚拟机自动保存上次状态,即使关闭虚拟机状态也不会变,这样我们就不需要重复设置了!
二、总结
其实对于这种问题,我想两个操作系统应该将操作简化才对,不过考虑到两者的商业因素等原因,我们也只能多花一点时间去解决这些不兼容的问题了~~~
关于在windows10中的vmware9.0里面安装的ubuntukylin15.04和windows共享目录的一些反思的更多相关文章
- MySQL 8.0.20 安装教程图文详解(windows 64位)
MySQL 8.0.20 安装教程图文详解(windows 64位) 更新时间:2020年05月09日 15:09:04 转载 作者:瘦肉粥不加糖 这篇文章主要介绍了MySQL 8.0. ...
- Windows10中的IIS10.0安装php manager和IIS URL 重写2.0组件的方法
Windows10中自带的Server:Microsoft-IIS/10.0,然后这个10却让原本支持组件无法安装了,php manager组件安装时提示“必须安装IIS7以上才可以安装”.那是不是真 ...
- Windows10下mysql 8.0.19 安装配置方法图文教程
第一步 下载安装包: 官网 毕竟是甲骨文公司的产品,去官网下真的慢! 这里有两个供选择的,我建议选第一个(因为我先下了第二个,结果失败了,不知道为什么总是出错.) 下载完自行选择路径解压就可以了. 第 ...
- VirtualBox中的Linux读取Windows共享目录
1.安装VirtualBox的增强功能.菜单 -> 设备 -> 安装增强功能此时在Linux中会载入安装包,用管理员权限运行安装即可. 2.在VirtualBox设置共享目录.设置 -&g ...
- Ubuntu中Qt5.7.0的安装及opencv2.4.13配置
去官网下载qt-opensource-linux-x64-5.7.0.run,到"下载"目录 Ctrl+Alt+T打开终端 cd /home/jv/下载sudo mv qt-ope ...
- [转]Windows10中Virtualbox没办法选择和安装64位的Linux系统
本文转自:https://blog.csdn.net/strivenoend/article/details/78290325 明明在公司的WIN7系统中使用Virtualbox就可以安装64位的Ub ...
- Linux 中 java 访问 windows共享目录
有两个方案: 1.将windows共享目录,挂载到linux系统下,通过使用本地目录访问windows共享目录 2.通过samba的java实现包,不过需要开个windows共享目录的账户 http ...
- VMware10中的CentOS6.5命令行安装VMwaretools工具启用windows与虚拟机中Linux系统的共享目录
VMware10中的CentOS6.5命令行安装VMwaretools工具启用windows与虚拟机中Linux系统的共享目录 一.描述 系统描述:win7旗舰版64位系统+VMware Workst ...
- Windows10中的IIS10安装php manager和IIS URL Rewrite 2.0组件的方法
Windows10中自带的Server:Microsoft-IIS/10.0,然后这个10却让原本支持组件无法安装了,php manager组件安装时提示“必须安装IIS7以上才可以安装”.那是不是真 ...
随机推荐
- TemplateMethod-模板模式
什么是Template Method模式 在父类中定义处理流程的框架,在子类中实现具体处理的模式就称为Template Mehtod模式.模板模式的关键是:子类可以置换掉父类的可变部分,但是子类却不可 ...
- vm虚拟机中linux无法连接外网?
问题出现的环境? vm虚拟机中安装了linux系统,vm设置了NAT方式共享主机ip,但还是没法访问外网?在linux系统中查询ip地址,没有ipv4地址,就是配置了自动获取,但是还是没有获取? 问题 ...
- 重温MFC
1. Button控件 2. 旋转和高级编辑控件 3. 标签控件和属性页 4. 列表控件 5. 树控件 6. 进度条控件和滑动条控件 7. 滚动条 8.工具栏和状态栏
- Servlet--ServletInputStream类,ServletOutputStream类
ServletInputStream类 定义 public abstract class ServletInputStream extends InputStream 这个类定义了一个用来读取客户端的 ...
- 【javaweb学习笔记】WEB01_HTML
案例一:网站信息显示页面1.什么是HTML?(Hyper Text Markup Language:超文本标记语言) 超文本:功能比普通文本更加强大 标记语言:使用一组标签对内容进行描述的一门语言(它 ...
- C++ 指针大小
32 位机: 指针大小 sizeof(void*)4字节,32位.例如:0x12345678 64位机: 指针大小: sizeof(void*)8字节,64位.一般只用48位,指针形如:0x12345 ...
- 【Java SE】如何用Java实现插入排序
摘要:前面三期分别写了三篇简单排序的算法,今天来讲一点稍微难一点的排序算法-----插入排序. 基本思想: 设n个数据已经按照顺序排列好(假定从小排到大). 输入一个数据x,将其放在恰当的位置,使其顺 ...
- html页面不显示中文
问题:HTML编辑中文后无法在网页上显示中文 原因:是适用的 Cufon字体包不支持中文造成的. 简单粗暴的解决方法:如果你本来打算是去掉Cufon,可以看一看<如何禁用Cufon功能>. ...
- 如何使用 highlight.js 高亮代码
highlight 是一款简单易用的 web 代码高亮插件,可以自动检测编程语言并高亮,兼容各种框架,可以说是十分强大了.下面就简单介绍一下如何使用这款插件. 两种使用方式: 1. 手动选择主题,官网 ...
- VUE 框架
一.什么是vue 它是一个构建用户界面的JAVASCRITPO框架 二.怎么使用VUE (1).引入vue.js 如:<script src='vue.js'>&l ...