环境: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.
|