查看: 4897|回复: 0
收起左侧

[技巧] VMware中FreeBSD9.1安装VMTools

[复制链接]
书剑飘零
发表于 2013-4-27 09:01:55 | 显示全部楼层 |阅读模式
环境:VM9.02,Guest FB9.1-i386

参考: http://www.rhyous.com/2012/05/09 ... bsd-9-without-xorg/



Step 1 – Install FreeBSD as VMWare Guest


Step 2 – Update FreeBSD and Install ports


Step 3 – Install Prerequisites
   Step 3.1 – Install Perl
       From ports
        # cd /usr/ports/lang/perl5.12
        # make install
       From packages
        # pgk_add -r perl

   Step 3.2 – Install compat6x-amd64(compat6x-i386)    ###amd64---x64 && i386---x86
       From ports
        # cd /usr/ports/misc/compat6x/
        # make install
       From packages
        # pkg_add -r compat6x-amd64


Step 4 – Take a VMWare Snapshot    ###安全起见,有重大的更改之前和之后都保存一下
    Important! Take a snapshot here! Do not skip this step.


Step 5 – Mount the VMWare Tools ISO   
   In VMWare Workstation, choose VM | Install VMWare Tools.
   In FreeBSD as root, create a directory to mount the CD-Rom to.
      # mkdir /cdrom
   Mount the cd-rom.
      # mount -t cd9660 /dev/cd0 /cdrom
   Note: You may consider taking a snapshot here to save your current state.


Step 6 – Extract the vmware-freebsd-tools.tar.gz
   Now that the drive is mounted, it should be easy to get to the vwmare-tools file.
   Copy the vmware-freebsd-tools.tar.gz file to a local location.
      # cp /cdrom/vmware-freebsd-tools.tar.gz /root
   Extract the vmware-freebsd-tools.tar.gz file.
      # cd /root
      # tar -xzf vmware-freebsd-tools.tar.gz
   VMWare tools should now be extracted.


Step 7 – Recompile VMWare Tools Modules
      Before you install VMWare tools on FreeBSD 9, you need the modules to work with FreeBSD 9. VMWare is slow to update the vmware tools for the FreeBSD guest. So you are just going to have to update them yourself.
      Note: We are now at the point where we are going to do more and install more than you want to for your nice new clean server, but that is ok, because we have a snapshot and once we get the files compiled you can revert to the clean snapshot. Alternately if you have another FreeBSD system, you can do these steps on that system.
      If you install without recompiling as of May 10, 2012, you will get this result.

         Starting VMware Tools services in the virtual machine:
         Switching to guest configuration:                                   done
         Guest memory manager:                                              failed
         Blocking file system:                                              failed
         Guest operating system daemon:                                      done
         Unable to start services for VMware Tools
         Execution aborted.

   Step 7.1 – Get FreeBSD Source    ###系统安装时会有选项选择安装源码,若已安装则跳过此步骤
      Download the FreeBSD Source as described here.
        http://www.rhyous.com/2009/12/25 ... d-source-using-svn/

   Step 7.2 – Configure the /etc/make.conf    ###参考原文Guest为FB9.0,在9.1中此处更改会报错,跳过
      Right now there is a move toward compiling with clang over gcc. Because of changes due to this, you need to add the following line to your /etc/make.conf to compile with gcc. I have not tried to compile with clang yet.
      As root open the /etc/make.conf file with you favorite editor and add the following line:
         MK_CLANG_IS_CC=no
      Save and close the /etc/make.conf file.
      Your /etc/make.conf is now configured.
      Note 1: You may want to compile a custom kernel while you are at this. If so, check out this article: How to build and install a custom kernel on FreeBSD? If you do this, remember that you have to copy the new kernel to your clean system too.

    Step 7.3 – Compile the vmmemctl module
      Recompile vmmemctl using these steps.
      Go to the lib/modules/source directory under where you extracted vmware-freebsd-tools.tar.gz.
         # cd /root/vmware-tools-distrib/lib/modules/source/
      Extract vmmemctl.tar
         # tar -xf vmmemctl.tar
      Change to the vmmemctl-only directory.
         # cd vmmemctl-only
      Run make.
         # make
      Run make install.
         # make install
      You have now built and installed the vmmemctl module.

    Step 7.4 – Compile the vmblock module
      Go to the lib/modules/source directory under where you extracted vmware-freebsd-tools.tar.gz.
         # cd /root/vmware-tools-distrib/lib/modules/source/
      Extract vmblock.tar
         # tar -xf vmblock.tar
      Change to the vmblock-only directory.
         # cd vmblock-only
      Run make.
         # make
      Run make install.
         # make install
      You have now built and installed the vmblock module.


Step 8 – Install VMWare Tools
    You are now ready to install the VMWare Tools.
    Note: If you are trying to keep you server clean and pristine, then copy the /root/vmware-tools-distrib directory off the server somewhere. THen revert to the snapshot you took just before Step 4. Copy the directory back to your clean snapshot and continue.
    Move into the directory created by the extraction.
       # cd /root/vmware-tools-distrib/
    Run vmware-install.pl
       # ./vmware-install.pl
    Select all the defaults.

Your vmware tools installation should go smoothly.


评分

参与人数 1经验 +10 收起 理由
詩、未詺 + 10 感谢支持,欢迎常来: )

查看全部评分

您需要登录后才可以回帖 登录 | 快速注册

本版积分规则

手机版|杀毒软件|软件论坛| 卡饭论坛

Copyright © KaFan  KaFan.cn All Rights Reserved.

Powered by Discuz! X3.4( 沪ICP备2020031077号-2 ) GMT+8, 2024-12-24 21:53 , Processed in 0.132601 second(s), 17 queries .

卡饭网所发布的一切软件、样本、工具、文章等仅限用于学习和研究,不得将上述内容用于商业或者其他非法用途,否则产生的一切后果自负,本站信息来自网络,版权争议问题与本站无关,您必须在下载后的24小时之内从您的电脑中彻底删除上述信息,如有问题请通过邮件与我们联系。

快速回复 客服 返回顶部 返回列表