{"id":32,"date":"2016-11-29T18:18:18","date_gmt":"2016-11-29T17:18:18","guid":{"rendered":"http:\/\/www.marki-online.net\/myblog\/?p=32"},"modified":"2017-07-07T20:27:42","modified_gmt":"2017-07-07T18:27:42","slug":"how-to-install-vmware-tools-on-ipcop-virtual-machine","status":"publish","type":"post","link":"https:\/\/www.marki-online.net\/myblog\/how-to-install-vmware-tools-on-ipcop-virtual-machine\/","title":{"rendered":"How to install vmware tools on IPCop virtual machine"},"content":{"rendered":"<p><a href=\"http:\/\/www.ipcop.org\/\">IPCop<\/a> is a small linux distribution providing simple firewall \/ router \/ NAT solution. When running as a virtual machine, it is advisable to have VMware Tools installed (at least to allow graceful restart\/shutdown of the OS and reporting guest IPs in vSphere). However IPCop is a very limited distribution, lacking many needed tools like insmod \/ rmmod, PAM, init.d system (IPCop uses sysinit). Plus it is using kernel version 3.4, which is not supported by vmtools. See <a href=\"http:\/\/www.marki-online.net\/myblog\/enabling-nat-on-vmware-esx-with-help-of-ipcop\/\">Enabling NAT on VMware ESX with help of IPCop<\/a> for detailed insructions on how to install IPCop on ESX.<\/p>\n<p>But there is still an option to install vmtools under IPCop, although without any kernel modules &#8211; but the graceful shutdown still works.<\/p>\n<p>First initiate the vmtools installation from vSphere \/ vCenter via menu <em>Guest<\/em> &#8211;&gt; <em>Install\/Upgrade VMware Tools <\/em>(I am running under ESX 6.0 host in this example). Then mount the virtual CD and extract the package to a temp directory (we use <code>\/var\/log<\/code> filesystem because of how IPCop partitions its limited disk space). We remove all binary modules as none are for our kernel. IPCop itself needs less than 500 MB of disk space, so if you allocated only so much to the VM, take care you have at least 120 MB free in root filesystem (and about 250 MB in <code>\/var\/log<\/code> during the install process).<\/p>\n<pre><span style=\"color: #999999;\">root@ipcop:~ #<\/span> mount \/dev\/sr0 \/mnt\/ -o ro\r\n<span style=\"color: #999999;\">root@ipcop:~ #<\/span> mkdir \/var\/log\/VM-tools\r\n<span style=\"color: #999999;\">root@ipcop:~ #<\/span> ll \/mnt\/\r\ntotal 71888\r\n-r-xr-xr-x 1 root root\u00a0\u00a0\u00a0\u00a0 2012 Feb 17\u00a0 2016 manifest.txt\r\n-r-xr-xr-x 1 root root\u00a0\u00a0\u00a0\u00a0 1850 Feb 17\u00a0 2016 run_upgrader.sh\r\n-r--r--r-- 1 root root 72162730 Feb 17\u00a0 2016 VMwareTools-10.0.6-3560309.tar.gz\r\n-r-xr-xr-x 1 root root\u00a0\u00a0 687524 Feb 17\u00a0 2016 vmware-tools-upgrader-32\r\n-r-xr-xr-x 1 root root\u00a0\u00a0 757944 Feb 17\u00a0 2016 vmware-tools-upgrader-64\r\n<span style=\"color: #999999;\">root@ipcop:~ #<\/span> cd \/var\/log\/VM-tools\r\n<span style=\"color: #999999;\">root@ipcop:\/var\/log\/VM-tools #<\/span> tar xzf \/mnt\/VMwareTools-10.0.6-3560309.tar.gz\r\n<span style=\"color: #999999;\">root@ipcop:\/var\/log\/VM-tools #<\/span> du -ks\r\n222276\u00a0 .\r\n<span style=\"color: #999999;\">root@ipcop:\/var\/log\/VM-tools #<\/span> cd vmware-tools-distrib\/\r\n<span style=\"color: #999999;\">root@ipcop:\/var\/log\/VM-tools\/vmware-tools-distrib #<\/span> ll\r\ntotal 524\r\ndrwxr-xr-x\u00a0 2 root root\u00a0\u00a0 4096 Feb 17\u00a0 2016 bin\r\ndrwxr-xr-x\u00a0 5 root root\u00a0\u00a0 4096 Feb 17\u00a0 2016 caf\r\ndrwxr-xr-x\u00a0 2 root root\u00a0\u00a0 4096 Feb 17\u00a0 2016 doc\r\ndrwxr-xr-x\u00a0 5 root root\u00a0\u00a0 4096 Feb 17\u00a0 2016 etc\r\n-rw-r--r--\u00a0 1 root root 282475 Feb 17\u00a0 2016 FILES\r\n-rw-r--r--\u00a0 1 root root\u00a0\u00a0 2538 Feb 17\u00a0 2016 INSTALL\r\ndrwxr-xr-x\u00a0 2 root root\u00a0\u00a0 4096 Feb 17\u00a0 2016 installer\r\ndrwxr-xr-x 14 root root\u00a0\u00a0 4096 Feb 17\u00a0 2016 lib\r\ndrwxr-xr-x\u00a0 3 root root\u00a0\u00a0 4096 Feb 17\u00a0 2016 vgauth\r\n-rwxr-xr-x\u00a0 1 root root\u00a0\u00a0\u00a0 243 Feb 17\u00a0 2016 vmware-install.pl\r\n-rwxr-xr-x\u00a0 1 root root 205571 Feb 17\u00a0 2016 vmware-install.real.pl\r\n<span style=\"color: #999999;\">root@ipcop:\/var\/log\/VM-tools\/vmware-tools-distrib #<\/span> rm -r lib\/modules\/binary\/*\r\n<span style=\"color: #999999;\">root@ipcop:\/var\/log\/VM-tools\/vmware-tools-distrib #<\/span> du -ks\r\n110328\u00a0 .<\/pre>\n<p>Then we need to create some dirs, which vmtools installation expects, but are not part of IPCop&#8217;s system.<\/p>\n<pre><span style=\"color: #999999;\">root@ipcop:\/var\/log\/VM-tools\/vmware-tools-distrib #<\/span> for i in 0 1 2 3 4 5 6; do mkdir -p \/usr\/local\/rc.d\/rc$i.d; done\r\n<span style=\"color: #999999;\">root@ipcop:\/var\/log\/VM-tools\/vmware-tools-distrib #<\/span> mkdir \/etc\/pam.d<\/pre>\n<p>Now we can start the installation script. It will complain about some tools not found, just reply with <code>\/bin\/true<\/code> for all of them. Also reply with our created directories when asked.<\/p>\n<pre><span style=\"color: #999999;\">root@ipcop:\/var\/log\/VM-tools\/vmware-tools-distrib #<\/span> .\/vmware-install.pl\r\nSetup is unable to find the \"rmmod\" program on your machine. Please make sure\r\nit is installed. Do you want to specify the location of this program by hand?\r\n[yes]\r\n\r\nWhat is the location of the \"rmmod\" program on your\r\nmachine? <span style=\"color: #0000ff;\">\/bin\/true<\/span>\r\n\r\nCreating a new VMware Tools installer database using the tar4 format.\r\n\r\nInstalling VMware Tools.\r\n\r\nIn which directory do you want to install the binary files?\r\n[\/usr\/bin] <span style=\"color: #0000ff;\">\/usr\/local\/bin<\/span>\r\n\r\nWhat is the directory that contains the init directories (rc0.d\/ to\r\nrc6.d\/)? <span style=\"color: #0000ff;\">\/usr\/local\/rc.d<\/span>\r\n\r\nWhat is the directory that contains the init scripts?\r\n[\/usr\/local\/rc.d]\r\n\r\nIn which directory do you want to install the daemon files?\r\n[\/usr\/local\/sbin]\r\n\r\nIn which directory do you want to install the library files?\r\n[\/usr\/local\/lib\/vmware-tools]\r\n\r\nThe path \"\/usr\/local\/lib\/vmware-tools\" does not exist currently. This program\r\nis going to create it, including needed parent directories. Is this what you\r\nwant? [yes]\r\n\r\nIn which directory do you want to install the common agent library files?\r\n[\/usr\/local\/lib]\r\n\r\nIn which directory do you want to install the common agent transient files?\r\n[\/var\/lib]\r\n\r\nIn which directory do you want to install the documentation files?\r\n[\/usr\/local\/doc\/vmware-tools]\r\n\r\nThe path \"\/usr\/local\/doc\/vmware-tools\" does not exist currently. This program\r\nis going to create it, including needed parent directories. Is this what you\r\nwant? [yes]\r\n\r\nThe installation of VMware Tools 10.0.6 build-3560309 for Linux completed\r\nsuccessfully. You can decide to remove this software from your system at any\r\ntime by invoking the following command:\r\n\"\/usr\/local\/bin\/vmware-uninstall-tools.pl\".\r\n\r\nBefore running VMware Tools for the first time, you need to configure it by\r\ninvoking the following command: \"\/usr\/local\/bin\/<strong>vmware-config-tools.pl<\/strong>\". Do you\r\nwant this program to invoke the command for you now? [yes]\r\n\r\nSetup is unable to find the \"ldd\" program on your machine.\u00a0 Please make sure it\r\nis installed.\u00a0 Do you want to specify the location of this program by hand?\r\n[yes]\r\n\r\nWhat is the location of the \"ldd\" program on your machine? <span style=\"color: #0000ff;\">\/bin\/true<\/span>\r\n\r\nSetup is unable to find the \"insmod\" program on your machine.\u00a0 Please make sure\r\nit is installed.\u00a0 Do you want to specify the location of this program by hand?\r\n[yes]\r\n\r\nWhat is the location of the \"insmod\" program on your\r\nmachine? <span style=\"color: #0000ff;\">\/bin\/true<\/span>\r\n\r\nSetup is unable to find the \"rmmod\" program on your machine.\u00a0 Please make sure\r\nit is installed.\u00a0 Do you want to specify the location of this program by hand?\r\n[yes]\r\n\r\nWhat is the location of the \"rmmod\" program on your\r\nmachine? <span style=\"color: #0000ff;\">\/bin\/true<\/span>\r\n\r\nSearching for GCC...\r\nThe path \"\" is not valid path to the gcc binary.\r\nWould you like to change it? [yes] <span style=\"color: #0000ff;\">no<\/span>\r\n\r\nSearching for a valid kernel header path...\r\nThe path \"\" is not a valid path to the 3.4-3 kernel headers.\r\nWould you like to change it? [yes] <span style=\"color: #0000ff;\">no<\/span>\r\n\r\n\r\nWARNING: This program cannot compile any modules for the following reason(s)...\r\n\r\nThe communication service is used in addition to the standard communication\r\nbetween the guest and the host.\u00a0 The rest of the software provided by VMware\r\nTools is designed to work independently of this feature.\r\nIf you wish to have the VMCI feature, you can install the driver by running\r\nvmware-config-tools.pl again after making sure that gcc, binutils, make and the\r\nkernel sources for your running kernel are installed on your machine. These\r\npackages are available on your distribution's installation CD.\r\n[ Press Enter key to continue ]\r\n\r\n<em>{the same for other kernel modules...}<\/em>\r\n\r\nWarning: This script could not find mkinitrd or update-initramfs and cannot\r\nremake the initrd file!\r\n\r\nGenerating the key and certificate files.\r\nSuccessfully generated the key and certificate files.\r\n\u00a0\u00a0 Checking acpi hot plug\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 done\r\nStarting VMware Tools services in the virtual machine:\r\n\u00a0\u00a0 Switching to guest configuration:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 done\r\n\u00a0\u00a0 Guest operating system daemon:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 done\r\nThe configuration of VMware Tools 10.0.6 build-3560309 for Linux for this\r\nrunning kernel completed successfully.\r\n\r\n<span style=\"color: #999999;\">root@ipcop:\/var\/log\/VM-tools\/vmware-tools-distrib #<\/span> ps -ef|grep vm\r\nroot\u00a0\u00a0\u00a0\u00a0 29659\u00a0\u00a0\u00a0\u00a0 1\u00a0 0 21:48 ?\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 00:00:00 \/usr\/local\/sbin\/vmtoolsd\r\n<span style=\"color: #999999;\">root@ipcop:\/var\/log\/VM-tools\/vmware-tools-distrib #<\/span> cd\r\n<span style=\"color: #999999;\">root@ipcop:~ #<\/span> rm -r \/var\/log\/VM-tools\r\n<span style=\"color: #999999;\">root@ipcop:~ #<\/span> du -ks \/usr\/local\/\r\n110404\u00a0 \/usr\/local\/\r\n\r\n<\/pre>\n<p>The configuration will output message about each kernel module not being able to compile, just acknowledge it with Enter. At the end, you should have the vmtoolsd daemon running, but we still need to adjust the IPCop startup sysinit script to run vmtools start script at boot.<\/p>\n<pre><span style=\"color: #999999;\">root@ipcop:~ #<\/span> cat &gt;&gt;\/etc\/rc.d\/rc.event.local\r\nEVENT=${1}\r\nVALUE=${2}\r\nif [ \"$EVENT\" = \"system\" -a \"$VALUE\" = \"up\" ]; then\r\n\u00a0 \/usr\/bin\/logger -t ipcop \"Starting vmware tools\"\r\n\u00a0 rm -f \/var\/lock\/subsys\/vmware-tools\r\n\u00a0 \/usr\/local\/rc.d\/vmware-tools start\r\nfi<\/pre>\n<p>File <code>rc.event.local<\/code> is run from <code>rc.event<\/code>, which is run at the end of <code>rc.sysinit<\/code> with parameters <code>system<\/code> and <code>up<\/code>. We need to remove the stale lock file first as we are not properly stopping the vmtools during shutdown. Now you can reboot IPCop to check if vmtools will be started during boot.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>IPCop is a small linux distribution providing simple firewall \/ router \/ NAT solution. When running as a virtual machine, it is advisable to have VMware Tools installed (at least to allow graceful restart\/shutdown of the OS and reporting guest &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"https:\/\/www.marki-online.net\/myblog\/how-to-install-vmware-tools-on-ipcop-virtual-machine\/\"> <span class=\"screen-reader-text\">How to install vmware tools on IPCop virtual machine<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[20,17,18,16,15],"class_list":["post-32","post","type-post","status-publish","format-standard","hentry","category-sysadmin","tag-esx","tag-ipcop","tag-router","tag-vmtools","tag-vmware"],"_links":{"self":[{"href":"https:\/\/www.marki-online.net\/myblog\/wp-json\/wp\/v2\/posts\/32"}],"collection":[{"href":"https:\/\/www.marki-online.net\/myblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.marki-online.net\/myblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.marki-online.net\/myblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.marki-online.net\/myblog\/wp-json\/wp\/v2\/comments?post=32"}],"version-history":[{"count":18,"href":"https:\/\/www.marki-online.net\/myblog\/wp-json\/wp\/v2\/posts\/32\/revisions"}],"predecessor-version":[{"id":87,"href":"https:\/\/www.marki-online.net\/myblog\/wp-json\/wp\/v2\/posts\/32\/revisions\/87"}],"wp:attachment":[{"href":"https:\/\/www.marki-online.net\/myblog\/wp-json\/wp\/v2\/media?parent=32"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.marki-online.net\/myblog\/wp-json\/wp\/v2\/categories?post=32"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.marki-online.net\/myblog\/wp-json\/wp\/v2\/tags?post=32"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}