Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
wiki:open_vm_tools [2013/06/19 08:33] andyjwiki:open_vm_tools [2013/06/19 13:48] (current) andyj
Line 1: Line 1:
 ====== Open VM Tools Background and Assumptions ======  ====== Open VM Tools Background and Assumptions ====== 
- 
-This page is under construction. Proceed at your own peril. May be ready on 2013-06-19. 
  
 The procedure for making the proprietary VMWare Tools and Open VM Tools are very similar. As it turns out, the Open VM Tools package is incomplete, and so we must fill in the gaps based on what we know from VMWare Tools. In particular, two files in the ''/etc'' directory which are critical for the Open VM Tools to work are provided here because they do not get built during the make process. The procedure for making the proprietary VMWare Tools and Open VM Tools are very similar. As it turns out, the Open VM Tools package is incomplete, and so we must fill in the gaps based on what we know from VMWare Tools. In particular, two files in the ''/etc'' directory which are critical for the Open VM Tools to work are provided here because they do not get built during the make process.
Line 30: Line 28:
   - libdnet   - libdnet
   - fuse   - fuse
 +  - squashfs-tools-4.x
  
 ===== Abbreviated steps =====  ===== Abbreviated steps ===== 
Line 35: Line 34:
   - Compile Open VM Tools   - Compile Open VM Tools
   - Create Open VM Tools setuid links   - Create Open VM Tools setuid links
-  - Create Configuration Files and Scripts+  - Create Initialization Scripts
   - Create TCZ extension   - Create TCZ extension
 +  - Install TCZ extension
  
 ===== Compile Open VM Tools =====  ===== Compile Open VM Tools ===== 
Line 50: Line 50:
   - Update the MODULES_DIR path to ''/usr/local/lib/modules/3.0.21-tinycore/kernel/''. Use your target kernel version if it is different.   - Update the MODULES_DIR path to ''/usr/local/lib/modules/3.0.21-tinycore/kernel/''. Use your target kernel version if it is different.
   - Either: Add ''vmblock'' to the list of modules to be built on the line which begins with ''MODULES ='', Or: Add fuse.tgz to the list of dependencies for the extension.   - Either: Add ''vmblock'' to the list of modules to be built on the line which begins with ''MODULES ='', Or: Add fuse.tgz to the list of dependencies for the extension.
 +Run as root, if not already su'ed, for the rest of this procedure.
 Run make: Run make:
 <code> <code>
 make make
 mkdir TCZ mkdir TCZ
 +sudo sh
 TCZROOT=$(pwd)/TCZ TCZROOT=$(pwd)/TCZ
-sudo make DESTDIR=$TCZROOT install-strip+make DESTDIR=$TCZROOT install-strip
 </code> </code>
  
 ===== Create Open VM Tools setuid Links =====  ===== Create Open VM Tools setuid Links ===== 
  
-It's a feature of the setuid wrapper that the executables must be in specific place defined in the ''locations'' file in  +It's a feature of the setuid wrapper that the executables must be in specific place defined in ''locations'' file in  
-the ''/etc/vmware-tools'' directory, and that they be referenced through one and only one link. The extension process+the ''/etc/vmware-tools'' directory, and that they be referenced through one and only one link (see the source). The extension process
 will make everything links, but this isn't a problem because we know the links will be in the ''/tmp/tcloop/open-vm-tools/usr/local'' subdirectories. will make everything links, but this isn't a problem because we know the links will be in the ''/tmp/tcloop/open-vm-tools/usr/local'' subdirectories.
-Run as root, if not already su'ed, for the rest of this procedure.+''vmware-user-setuid-wrapper'' works by checking that the link in BINDIR or SBINDIR has LIBDIR in it's path 
 +Make the TinyCore extension specific vmware paths locations file in the ''TCZ/etc/vmware-tools'' directory: 
 +<code> 
 +answer BINDIR /tmp/tcloop/open-vm-tools/usr/local/bin 
 +answer INITDIR /etc/init.d 
 +answer INITSCRIPTSDIR /etc/init.d 
 +answer SBINDIR /tmp/tcloop/open-vm-tools/usr/local/sbin 
 +answer LIBDIR /tmp/tcloop/open-vm-tools/usr/local/lib/open-vm-tools 
 +</code> 
 +Create a link to the plugins directory in TCZ/etc/vmware-tools 
 +<code> 
 +ln -s /tmp/tcloop/open-vm-tools/usr/local/lib/open-vm-tools/plugins plugins 
 +</code> 
 +The Open VM Tools also wants to know what distribution and release it's running on: 
 +<code> 
 +sed -e 's/^/TinyCore /' /usr/share/doc/tc/release.txt > $TCZROOT/etc/release 
 +</code> 
 +Move the files to LIBDIR subdirectories and create links in the BINDIR and SBINDIR directories:
 <code> <code>
-sudo sh 
 cd $TCZROOT/usr/local/lib/open-vm-tools cd $TCZROOT/usr/local/lib/open-vm-tools
 mkdir bin sbin lib mkdir bin sbin lib
Line 79: Line 97:
 for a in ../lib/open-vm-tools/sbin/*; do ln -s /tmp/tcloop/open-vm-tools/usr/local/lib/open-vm-tools/sbin/$(basename $a); done for a in ../lib/open-vm-tools/sbin/*; do ln -s /tmp/tcloop/open-vm-tools/usr/local/lib/open-vm-tools/sbin/$(basename $a); done
 cd $TCZROOT/usr/local/lib/open-vm-tools/lib cd $TCZROOT/usr/local/lib/open-vm-tools/lib
-mv $TCZROOT/usr/local/lib/* . +mv $TCZROOT/usr/local/lib/lib* . 
-# we don't need links for the libraries +cd $TCZROOT/usr/local/lib 
-</code> +for a in ../lib/open-vm-tools/lib/lib*; do ln -/tmp/tcloop/open-vm-tools/usr/local/lib/open-vm-tools/lib/$(basename $a); done
-Clean up files we don't need: +
-<code> +
-rm -rf $TCZROOT/usr/local/etc +
-rm -rf $TCZROOT/usr/local/share +
-rm -rf $TCZROOT/usr/local/include +
-rm -rf $TCZROOT/usr/local/lib/pkgconfig +
-rm -rf $TCZROOT/sbin+
 </code> </code>
  
-===== Create Configuration Files and Scripts ===== +===== Create Initialization Scripts ===== 
  
-Make the TinyCore extension specific vmware paths locations file:+Make the Tinycore extension initialization script in the ''TCZ/usr/local/tce.installed'' directory:
 <code> <code>
-cd $TCZROOT/etc/vmware-tools +mkdir -p $TCZROOT/usr/local/tce.installed
-cat > locations <<EOF +
-answer BINDIR /tmp/tcloop/open-vm-tools/usr/local/bin +
-answer INITDIR /etc/init.+
-answer INITSCRIPTSDIR /etc/init.d +
-answer SBINDIR /tmp/tcloop/open-vm-tools/usr/local/sbin +
-answer LIBDIR /tmp/tcloop/open-vm-tools/usr/local/lib/open-vm-tools +
-EOF+
 </code> </code>
-Make the Tinycore extension initialization script+Make sure that the script name matches the extension name if not using ''open-vm-tools'':
 <code> <code>
-mkdir -p $TCZROOT/usr/local/tce.installed 
-cd $TCZROOT/usr/local/tce.installed 
-cat > open-vm-tools <<EOF 
 #!/bin/sh #!/bin/sh
 # #
 /etc/init.d/open-vm-tools start /etc/init.d/open-vm-tools start
-EOF+</code> 
 +Make the script executable: 
 +<code>
 chmod a+x open-vm-tools chmod a+x open-vm-tools
 </code> </code>
-Make the open-vm-tools startup script+Make the TCZ/etc/init.d directory:
 <code> <code>
 mkdir -p $TCZROOT/etc/init.d mkdir -p $TCZROOT/etc/init.d
-cd $TCZROOT/etc/init.d +</code> 
-cat > open-vm-tools <<EOF+Make the open-vm-tools startup script in the TCZ/etc/init.d directory: 
 +<code>
 #!/bin/sh #!/bin/sh
 # Start, stop, and restart vmtoolsd # Start, stop, and restart vmtoolsd
Line 191: Line 195:
 /usr/local/bin/vmtoolsd --background=/var/run/vmtoolsd.pid /usr/local/bin/vmtoolsd --background=/var/run/vmtoolsd.pid
 fi fi
 +# Start vmware-user in user's .xsession
  
 # Use ethtool to optimize vmxnet # Use ethtool to optimize vmxnet
Line 225: Line 230:
 ;; ;;
 esac esac
-EOF+</code> 
 +Make the script executable: 
 +<code>
 chmod a+x open-vm-tools chmod a+x open-vm-tools
 +</code>
 +
 +Clean up files we don't need:
 +<code>
 +rm -rf $TCZROOT/usr/local/etc
 +rm -rf $TCZROOT/usr/local/share
 +rm -rf $TCZROOT/usr/local/include
 +rm -rf $TCZROOT/usr/local/lib/pkgconfig
 +rm -rf $TCZROOT/sbin
 </code> </code>
  
Line 246: Line 262:
 procps.tcz procps.tcz
 gtkmm.tcz gtkmm.tcz
 +libdnet.tcz
 EOF EOF
 </code> </code>
 +
 +===== Install TCZ Extension ===== 
 +
 These extensions and their dependencies should be copied to the system that will be using the open-vm-tools extension before it's loaded. These extensions and their dependencies should be copied to the system that will be using the open-vm-tools extension before it's loaded.
 Then add ''blacklist=pcnet32'' to the APPEND line of the boot configuration file. Then add ''blacklist=pcnet32'' to the APPEND line of the boot configuration file.
 There is a conflict between the vmxnet and pcnet32 modules, so networking will not work unless the extension is loaded. There is a conflict between the vmxnet and pcnet32 modules, so networking will not work unless the extension is loaded.
 Copy the open-vm-tools.tcz and open-vm-tools.tcz.dep files to the tce/optional directory of the virtual machine, and update onboot.lst by adding open-vm-tools.tcz. Copy the open-vm-tools.tcz and open-vm-tools.tcz.dep files to the tce/optional directory of the virtual machine, and update onboot.lst by adding open-vm-tools.tcz.
- +Add the following line to your .xsession file after mouse initialization: 
-not done: programs to add to .profile / .xsession+<code> 
 +[ $(which vmware-checkvm) ] && [ vmware-checkvm ] && vmware-user & 
 +</code> 
 +Reboot and enjoy.
Print/export
QR Code
QR Code wiki:open_vm_tools (generated for current page)