美文网首页
vmware workstation 12 使用open-vm-

vmware workstation 12 使用open-vm-

作者: 夏天的雪花雨 | 来源:发表于2017-03-30 11:35 被阅读0次

    vmware 12下安装ubuntu 16.04后,按往常的惯例安装vmware-tools,安装时提示建议使用open-vm-tools,于是放弃vmware-tools的安装,尝试使用open-vm-tools

    首先安装open-vm-tools

     sudo apt-get install open-vm-tools
    

    安装时,apt提示建议安装open-vm-tools-desktop,一不做二不休,一起装了吧

     sudo apt-get install open-vm-tools-desktop
    

    之前在虚拟机上已经设置了共享文件夹,现在通过下面的命令就可以看到已经设置好的共享文件夹名

    vmware-hgfsclient
    

    然后根据wiki.archlinux.org上找到的教程配置共享文件夹

    进入/etc/systemd/system目录

    cd /etc/systemd/system
    

    创建一个文件,我这里命名为mnt.hgfs.service

    sudo gedit ./mnt.hgfs.service
    

    填入下面的内容,为了方便,就不单独配置各个共享文件夹了,直接将所有共享文件夹mount到一个目录下

    [Unit]
    
    Description=Load VMware shared folders
    
    Requires=vmware-vmblock-fuse.service
    
    After=vmware-vmblock-fuse.service
    
    ConditionPathExists=.host:/
    
    ConditionVirtualization=vmware
    
    
    
    [Service]
    
    Type=oneshot
    
    RemainAfterExit=yes
    
    ExecStart=
    
    ExecStart=/usr/bin/vmhgfs-fuse -o allow_other -o auto_unmount .host:/ /mnt/hgfs
    
    
    
    
    
    [Install]
    
    WantedBy=multi-user.target
    

    保存后,用systemctl命令使能这个service

    sudo systemctl enable mnt.hgfs.service
    

    如果没有创建/mnt/hgfs文件夹,需要创建

    sudo mkdir -p /mnt/hgfs
    

    重启后检查共享目录是否已经挂载到/mnt/hgfs目录下了

    © 著作权归作者所有https://my.oschina.net/u/1158620/blog/712253

    相关文章

      网友评论

          本文标题:vmware workstation 12 使用open-vm-

          本文链接:https://www.haomeiwen.com/subject/zfbuottx.html