www.zeroshell.org Forum Index www.zeroshell.org
Linux Distribution for server and embedded devices
 
 SearchSearch  RegisterRegister  UsergroupsUsergroups 
 ProfileProfile  Log inLog in  Log in to check your private messagesPrivate Message 

HowTo: vmware-tools in ZeroShell

 
Post new topic   Reply to topic    www.zeroshell.org Forum Index -> ZeroShell
View previous topic :: View next topic  
Author Message
xmas79



Joined: 12 Apr 2010
Posts: 2

PostPosted: Mon Apr 12, 2010 3:51 pm    Post subject: HowTo: vmware-tools in ZeroShell Reply with quote

Brief history: I was disappointed I couldn’t properly shutdown my ZeroShell VM during (occasional) main server maintenance. So I decided to dig into this adventure… Successfully! Maybe it’s not the cleanest way to do it, but it simply works…


Works on: VMware Server 2.0.0, ZeroShell-1.0.beta12-VMWARE.zip, others not tried.
Tools required: a brain.
Time required: about 15min. (if you know what you’re doing).
Hope: there's nothing wrong here.

ZeroShell for VMware essentially is a Live distro. It keeps Databases and configurations into a persistent device, but the system itself is set up on a ReadOnly filesystem. Unfortunately, vmware-tools installation needs to create some symbolic link and to copy files into this ReadOnly file system. That means we need to transform it in a ReadWrite one (and persistent! I remember you / is in RAM!). Let’s see what we can do...


Step 1: ReadWrite filesystem setup and vmware-tools installation files copy:
1. Shutdown your VM and install a supplementary CD device mounting vmware-tools disk image. The file is called “linux.iso” and can be found in the VMware installation directory.
2. Start ZeroShell and gain root access in the console (not SSH because vmware-tools installation will reset your network device)
3. Type “loadkeys it” to load Italian keyboard (if you’re Italian of course), because we need to type a lot!
4. Mount the secondary cd with the vmware-tools on a temporary directory
Code:

a. mkdir /mnt/hdd
b. mount -t auto /dev/hdd /mnt/hdd

5. Copy tar.gz installation file to the /Database directory and uncompress it
Code:
cp /mnt/hdd/VMxxxxxx.tar.gz /Database
cd /Database
tar -xvzf VMxxxxxx.tar.gz

The second CD/DVD has done all his job. We can safely delete this hardware on next reboot.
Now you should have a directory called “vmware-tools-distrib” which contains installation files. What we need now is a ReadWrite copy of the /sbin and /usr:
Code:
cd /Database
mkdir rootfs
cd rootfs
mkdir sbin && mkdir usr
cp -a /sbin/* /Database/rootfs/sbin
cp -a /usr/* /Database/rootfs/usr

We also need a copy of the current modules directory that is inside /lib:
Code:
mkdir modules
cp -a /lib/modules/* /Database/rootfs/modules

Now we are ready to switch to a RW filesystem:
Code:
mount -o remount,rw /
unlink /sbin && ln -s /Database/rootfs/sbin /sbin
unlink /lib/modules && ln -s /Database/rootfs/modules /lib/modules
unlink /usr && /cdrom/usr/bin/ln -s /Database/rootfs/usr /usr


Now RW filesystem is ready.

Step 2: Prepararing for vmware-tools installation:
Code:
mkdir /Database/vmware-tools
cd /Database/vmware-tools
mkdir etc
cd etc
mkdir init.d
mkdir rc.d
cd rc.d
mkdir rc0.d
mkdir rc1.d
...
mkdir rc6.d


Step 3: vmware-tools installation:
Code:
cd /Database/vmware-tools-distrib
./vmware-install.pl


At this point, vmware installation should ask where we want to install and which folder contains rc0.d, rc1.d etc. folders. Of course you will answer:
Code:
/Database/vmware-tools/TheFolderItAsksFor/


So if it asks you “/usr/bin” you’ll answer “/Database/vmware-tools/usr/bin/” and so on… (note the trailing / at the end of the path). It will complaint about non-existing folders. Just accept to create them. Everything that goes to /Database/vmware-tools/xxx is OK.

The installation will terminate properly. Now you only need to “configure” vmware tools:
Code:
cd /Database/vmware-tools/usr/bin
./vmware-config-tools.pl
It should complaint that some modules have not been properly configured for your system and asks you to compile. Just tell “NO” to all questions and… Voilŕ! “vmware-guestd” process should be now running and perfectly working.

Step 4: Post installation.
Vmware-tools sadly creates a “vmware-tools” folder inside /etc… Which is in in RAM!!!! That means if we do not backup this folder, on the next reboot we’ll lose our configuration.
Code:
cd /Database/vmware-tools
mkdir startup
mkdir startup/etc
mkdir startup/etc/vmware-tools
cp -a /etc/vmware-tools/* /Database/vmware-tools/startup/etc/vmware-tools


Now we only need to restore that folder (and links to vmware files) on every startup. Save the following script “run.sh” in “/Database/vmware-tools/startup”:

Code:
#!/bin/bash
mount -o remount,rw /

unlink /usr && /cdrom/usr/bin/ln -s /Database/rootfs/usr /usr
unlink /sbin && ln -s /Database/rootfs/sbin /sbin

cp -a /Database/vmware-tools/scripts/etc/* /etc

/Database/vmware-tools/etc/init.d/vmware-tools start



Now WebLogin into ZeroShell. Go to the panel “Startup/Cron”, select “post boot”, enable status, and add the following line:
/Database/vmware-tools/startup/run.sh
Save and reboot and enjoy your vmware-tools!

Credits go to Fulvio for this excellent product!
Natale Galioto.

Disclaimer: This information is provided "as is". The author of this information disclaim any loss or liability, either directly or indirectly as a consequence of applying the information presented herein, or in regard to the use and application of said information. No guarantee is given, either expressed or implied, in regard to the merchantability, accuracy, or acceptability of the information.
Back to top
View user's profile Send private message
divide



Joined: 17 Jun 2008
Posts: 8

PostPosted: Mon Apr 12, 2010 4:56 pm    Post subject: Reply with quote

Thanks for the great guide! VMware-tools integration is very important element for zeroshell.

Your guide definetly gives a step closer to fully vmware supported appliance. VMware-tools utilisation scripts are of course important elements, but I think that also the vmxnet module for network is the key element when using zeroshell in vmware virtualization. Making this work, may need to compile the driver in config procedure. So I am wondering is this also possible?
Back to top
View user's profile Send private message
xmas79



Joined: 12 Apr 2010
Posts: 2

PostPosted: Wed Apr 14, 2010 9:54 am    Post subject: Reply with quote

Sorry for late response... I think it should be possible... In the download page there are links to all what we need to make gcc working properly for this purpose. We only need to configure the environment correctly... But the only thing we really don't have is... time... Sorry.

Best regards,
Natale.
Back to top
View user's profile Send private message
fulvio
Site Admin


Joined: 01 Nov 2006
Posts: 1072

PostPosted: Wed Apr 14, 2010 7:43 pm    Post subject: Reply with quote

Thanks for this How-To. I have just linked it in the documentation page.

Regards
Fulvio
Back to top
View user's profile Send private message Send e-mail
marcb



Joined: 27 Apr 2010
Posts: 1

PostPosted: Tue Apr 27, 2010 9:04 am    Post subject: Reply with quote

Xmas thanks for this its a very comprehensive guide and even an idiot like me should be able to follow it! Very Happy
Back to top
View user's profile Send private message
ptaylor



Joined: 07 Feb 2007
Posts: 50

PostPosted: Sun May 16, 2010 5:46 am    Post subject: Reply with quote

In my case, I'm using VMWare Workstation 7 and it's version of VMware tools.. It's not quite working...

First, inside the script that kicks of vmware-tools, that's in rc.d on mine, not init.d.

Next, after a reboot, it isn't running. When I manually execute run.sh, I get this:

cp: cannot stat '/Database/vmware-tools/scripts/etc/*': No such file or directory
Warning: Unable to find VMware Tools's main database /etc/vmware-tools/locations
Back to top
View user's profile Send private message
ptaylor



Joined: 07 Feb 2007
Posts: 50

PostPosted: Sun May 16, 2010 6:01 am    Post subject: Reply with quote

Ahh - Looks like a typo in the original instructions - there is no scripts directory..

Instead of the copy statement:
cp -a /Database/vmware-tools/scripts/etc/* /etc

It should be:
cp -a /Database/vmware-tools/startup/etc/* /etc

Mine is working now, though I did have to change the line that starts vmware tools from:
/Database/vmware-tools/etc/init.d/vmware-tools start

To:
/Database/vmware-tools/etc/rc.d/vmware-tools start
Back to top
View user's profile Send private message
jbo5112



Joined: 31 Jul 2010
Posts: 14

PostPosted: Wed Aug 11, 2010 9:43 am    Post subject: Reply with quote

Thank you very much for this help. Adding the vmware modules isn't very difficult if you know how to compile a kernel (you don't even have to configure it). You'll just have to find a full Linux distribution with a compatible GCC. I'm running 1.0.beta13, which uses GCC 4.3.2 and kernel 2.6.25.20. It requires another i386 (32-bit x86) linux distribution with GCC 4.3.x. The last number indicates a bug fix and is almost always binary compatible. Once you have a distribution with a compatible GCC, you compile/install the same kernel that zeroshell uses, reboot, install vmware-tools, and copy the modules to zeroshell. I apologize if this guide is a little incoherent, it's getting quite late.

Creating Build Environment
I created a virtual machine with a minimal Ubuntu 9.04 server with the packages GCC and make installed and as many virtual CPU's as I have real CPU cores. Next I downloaded the specific zeroshell kernel source from kernel.org (2.6.25.20) to the folder /usr/src on the Ubuntu server, by finding the specific, local url with a web browser then using that as an argument to 'wget' (e.g. "wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.25.20.tar.bz2").


Compiling the Kernel
(note: <kernel_version> should be replaced with the kernel version used e.g.: 2.6.25.20)
Unpack this by running the command "tar jxf linux-<kernel_version>.tar.bz2 && ln -sf linux-<kernel_version> linux", and then run "cd linux" to change to the new folder. We now need the kernel configuration from zeroshell. Copy the file /proc/config.gz on the zeroshell machine to the newly created folder on your module build machine using whatever method you want. I copied it to and from network storage on a 3rd machine using sftp.

On the module build machine (in the /usr/src/linux folder, which now contains config.gz), run "gunzip config.gz && mv config .config && make -j4 bzImage && cp arch/i386/boot/bzImage /boot/vmlinuz-<kernel_version> && make -j4 modules && make -j4 modules_install". This will take several minutes on a fast machine, and the '4' in -j4 should be the number of CPU's in your build machine.

Set up boot entry
Now you need to create a new initram image, which I was able to do with "update-initram -c -k <kernel_version>". Finally, unless you're running grub2, you'll need to edit "/boot/grub/menu.lst". It needs an entry for your new kernel. The easiest way is to duplicate the first entry (which begins with the keyword "title") and edit your new first entry. The vmlinuz and initrd file names need to be updated to reflect the names of your newly created files, which are both in the /boot directory. If you don't know an editor, you can probably use mcedit, nano, pico, or joe. Here is my entry:
Code:
title           Ubuntu 9.04, kernel 2.6.25.20
uuid            77b2642d-59df-47dd-86c8-62590146519d
kernel          /boot/vmlinuz-2.6.25.20 root=UUID=77b2642d-59df-47dd-86c8-62590146519d ro quiet splash
initrd          /boot/initrd.img-2.6.25.20
quiet


Build vmware modules
Once you save the file and quit the editor, you're ready to reboot (the command is "reboot") and install the vmware-tools package. The new entry is probably now your default, but you may need to select it from the boot list. Install the vmware-tools normally. The new kernel modules will be located in /lib/modules/<kernel_version>/misc and need to be copied to your modules folder on zeroshell (/Database/rootfs/modules). Run the command "cd /lib/modules/<kernel_version> && tar jcf misc.tar.bz2 misc". This will generate a file misc.tar.bz2, which needs to be copied to the same kernel module folder on zeroshell (/Database/rootfs/modules/<kernel_version>/) and extracted ("tar jxf misc.tar.bz2").

Installing vmware-tools also modified some of the files in /lib/modules/2.6.25.20, which I didn't copy over to zeroshell. However, I'm not sure if it's safe to copy them over to zeroshell. I didn't check to see if the files on Ubuntu matched what is on Zeroshell before I installed vmware-tools, and I'm too tired to do this again. Without these changes, the modules aren't properly installed, but they're still perfectly usable. If the forum lets me edit this, I'll check into copying the other files over and update this.

The modules will need to be loaded as part of the boot script. Here's my updated script to actually load the modules:
Code:
!/bin/bash
mount -o remount,rw /

unlink /usr && /cdrom/usr/bin/ln -s /Database/rootfs/usr /usr
unlink /sbin && ln -s /Database/rootfs/sbin /sbin
unlink /lib/modules && ln -s /Database/rootfs/modules /lib/modules

cp -a /Database/vmware-tools/scripts/etc/* /etc

for f in /lib/modules/2.6*/misc/*.o; do
    insmod "$f"
done

/Database/vmware-tools/etc/init.d/vmware-tools start
/etc/init.d/netconfig restart


Are there any plans to merge this into the vmware download, so it's all pre-installed? At some point, I can clean up the installation and submit a tar of the necessary files to go on the virtual disk (assuming that is legal and there is somewhere to submit them). It would help if I understood the zeroshell boot process better. I don't know that I'll be available for much maintenance, but I try to do things well enough that no one gets that job.

Is there any reason that you put the vmware-tools in a separate folder from everything in rootfs?
Back to top
View user's profile Send private message
jbo5112



Joined: 31 Jul 2010
Posts: 14

PostPosted: Thu Aug 12, 2010 10:56 am    Post subject: Reply with quote

I checked the files /lib/modules/2.6.25.20/modules.* aren't the same between zeroshell and the linux system where I installed that kernel with the same configuration. What's worse is that when vmware tools is installed, it scrambles the order of the lines in some of the files. If you want the modules properly installed, you'll have to compare sorted versions of the files from before and after vmware tools is installed. If someone is interested, I can provide details of what changes I made for zeroshell 1.0.beta13 and the vmware tools in ESXi 4.1. All the modules install without these changes, but I've only tried running a vmxnet3 NIC with the changes in place.

I previously left something out for for my vmxnet3 under ESXi. The boot script needs to run "/etc/init.d/netconfig restart" to initialize the device, and I've updated the script in my previous post.
Back to top
View user's profile Send private message
Sam13



Joined: 13 Aug 2010
Posts: 1

PostPosted: Fri Aug 13, 2010 2:18 am    Post subject: Reply with quote

Thanks for the great guide! VMware-tools integration is very important element for zeroshell.
Your guide definetly gives a step closer to fully vmware supported appliance. VMware-tools utilisation scripts are of course important elements, but I think that also the vmxnet module for network is the key element when using zeroshell in vmware virtualization. Making this work, may need to compile the driver in config procedure. So I am wondering is this also possible..
Regards...
Back to top
View user's profile Send private message
jbo5112



Joined: 31 Jul 2010
Posts: 14

PostPosted: Mon Aug 16, 2010 9:03 am    Post subject: Reply with quote

The modules cannot be compiled on zeroshell. They can be compiled on another system and copied onto the zeroshell system. On the current release of zeroshell, this requires a system with GCC 4.3.X and kernel 2.6.25.20 configured and installed. The configuration is store in /proc/config.gz on zeroshell and it needs to be gunzipped and placed in /usr/src/linux/.config on the machine with GCC.

I think vmware-tools might be specific to the version of VMware that you're running. With the proper version of the kernel installed, including sources, and a back up copy of /lib/modules/2.6.25.20/modules.* (.bin files not required) you can now install vmware-tools on the machine with GCC to build the kernel modules. The modules will end up in "/lib/modules/2.6.25.20/misc/". To find the updates to the backed up files, you'll have to compare sorted versions of the files, so you can add the new entries to the same files on zeroshell. When I installed the same kernel on Ubuntu 9.04 server, my files in /lib/modules/2.6.25.20/modules.* weren't the same as the files on zeroshell. It might have helped if I had downloaded the kernel from zeroshell instead of a kernel.org mirror. However, the command insmod appeared to work without changing the modules.* files on zeroshell, but I did not check to see if the modules actually worked.

I'm currently running Zeroshell on ESXi with a working vmxnet3 NIC. I don't know how to check if anything else works, except all the modules load and vmmemctl and vmtoolsd show up in my process list. I did run into a problem with vmware creating .old.? files for me that BROKE THEIR PROGRAMS. Delete these if you ever find them. My vmware init doesn't appear to load the modules automatically, but I have all the additional entries in my modules.* files for your modding pleasure.

file: modules.alias
Code:
alias pci:v00001022d00002000sv*sd*bc*sc*i* vmxnet
alias pci:v000015ADd00000720sv*sd*bc*sc*i* vmxnet
alias pci:v000015ADd00000740sv*sd*bc*sc*i* vmci
alias pci:v000015ADd000007B0sv*sd*bc*sc*i* vmxnet3
alias pci:v000015ADd000007C0sv*sd*bc*sc*i* pvscsi

file: modules.dep
Code:
/lib/modules/2.6.25.20/misc/pvscsi.ko:
/lib/modules/2.6.25.20/misc/vmblock.ko:
/lib/modules/2.6.25.20/misc/vmci.ko:
/lib/modules/2.6.25.20/misc/vmhgfs.ko:
/lib/modules/2.6.25.20/misc/vmmemctl.ko:
/lib/modules/2.6.25.20/misc/vmxnet.ko:
/lib/modules/2.6.25.20/misc/vmxnet3.ko:
/lib/modules/2.6.25.20/misc/vsock.ko: /lib/modules/2.6.25.20/misc/vmci.ko

file: modules.pcimap
Code:
pvscsi               0x000015ad 0x000007c0 0xffffffff 0xffffffff 0x00000000 0x00000000 0x0
vmci                 0x000015ad 0x00000740 0xffffffff 0xffffffff 0x00000000 0x00000000 0x0
vmxnet               0x00001022 0x00002000 0xffffffff 0xffffffff 0x00000000 0x00000000 0x0
vmxnet               0x000015ad 0x00000720 0xffffffff 0xffffffff 0x00000000 0x00000000 0x0
vmxnet3              0x000015ad 0x000007b0 0xffffffff 0xffffffff 0x00000000 0x00000000 0x0

file: modules.symbols
Code:
alias symbol:VMCIContext_GetPrivFlags vmci
alias symbol:VMCIDatagram_CreateHnd vmci
alias symbol:VMCIDatagram_CreateHndPriv vmci
alias symbol:VMCIDatagram_DestroyHnd vmci
alias symbol:VMCIDatagram_Send vmci
alias symbol:VMCIDs_Lookup vmci
alias symbol:VMCIEvent_Subscribe vmci
alias symbol:VMCIEvent_Unsubscribe vmci
alias symbol:VMCIMemcpyFromQueue vmci
alias symbol:VMCIMemcpyFromQueueV vmci
alias symbol:VMCIMemcpyToQueue vmci
alias symbol:VMCIMemcpyToQueueV vmci
alias symbol:VMCIQueuePair_Alloc vmci
alias symbol:VMCIQueuePair_AllocPriv vmci
alias symbol:VMCIQueuePair_Detach vmci
alias symbol:VMCISock_GetAFValue vsock
alias symbol:VMCISock_GetLocalCID vsock
alias symbol:VMCISock_KernelDeregister vsock
alias symbol:VMCISock_KernelRegister vsock
alias symbol:VMCI_DeviceGet vmci
alias symbol:VMCI_DeviceRelease vmci
alias symbol:VMCI_GetContextID vmci
alias symbol:VMCI_Version vmci


I also moved my installation to of everything for vmware-tools /DB instead of /Database so it is installed on zeroshell instead of just the current Database. However, the boot script needs to be modified for each database. Also my vmware tools install creates the file /etc/udev/rules.d/99-vmware-scsi-udev.rules and the symbolic a link /etc/pam.d/vmtoolsd, which I backed up and have my script restore.
Back to top
View user's profile Send private message
Jiellen29



Joined: 20 Oct 2010
Posts: 5

PostPosted: Wed Oct 20, 2010 2:24 am    Post subject: Reply with quote

Thanks for the help,i really appreciate it...
God bless!!
Back to top
View user's profile Send private message Yahoo Messenger
pazzer



Joined: 25 Jan 2011
Posts: 2

PostPosted: Thu Jan 27, 2011 4:15 am    Post subject: Reply with quote

Hi Xmas/all

Thank you for this fantastic documentation of how it's done!

For any of those out there who may benefit, I thought I'd comment on my experience on installing VMtools into ZS;

- My ZS(s) runs off VMware VMDK disks on ESX 4.1

- Initial ZS install was just extracting the USB/SATA img to a 2Gb disk with DD (this was the quickest / cleanest method I came across for a VM)

- I've partitioned the spare 1Gb (left over from the imaging process) and formatted as ext3

- During the process documented above, I found that upon installing modules into the target directory (/Database) that the script would halt with a 'no space remaining warning' - I cleaned up the filesystem as best I could, still no joy. The image on disk occupies close to 700/800Mb I think. Anyway, moving on...

- I mounted the spare 1Gb partition and used that to copy/build upon

- The 'run.sh' script mentioned needed to be placed elsewhere, so I chose the /Database dir, gave it some 'chmod +x'

- Added the mkdir and mount commands for the 1gb partition to run.sh, so that the partition with the vmtools on was accessible, before the daemon is started

Success!
I'll come back for this one, and get the vmxnet3 nailed. Not sure that I need to memory-balloon my ZS router/NAT/VPN/DNS though!!
Thanks for the info Xmas, and thank you ZS!
Back to top
View user's profile Send private message
DELETED
Guest





PostPosted: Mon Feb 14, 2011 6:20 am    Post subject: Reply with quote

DELETED
Back to top
gordonf



Joined: 26 Feb 2012
Posts: 89

PostPosted: Sun Feb 26, 2012 8:17 pm    Post subject: Got VMWare Tools running on ZS on ESXi 5.0 Reply with quote

After following xmas79's instructions to the letter, I had to apply the fixes ptaylor described. I also had to grant Execute access to the run.sh script (chmod 722 /Database/vmware-tools/startup/run.sh) before the script would launch on startup.

I got release 1.0 beta 16 running on VM hardware version 8, on ESXi 5.0 with Intel E1000 virtual NICs. I also had to use VMware Converter to convert the VM download to something that would work on ESXi; the "Sparse" disk format isn't supported there.

It's my hope I can replace my physical router (Snapgear SG300) and wireless AP (some Netgear box) with this virtual machine and some USB wireless adapter.
Back to top
View user's profile Send private message
divide



Joined: 17 Jun 2008
Posts: 8

PostPosted: Tue Jul 31, 2012 10:57 pm    Post subject: Reply with quote

I tried to reinstall vmware-tools with newest release 2.0RC1, but it's seems to lack of many depencies (like tar, lsmod etc.). So this is one "feature request" for the future version, with ability to compile also the kernel modules.

Also I tried compiling the kernel modules with previous version and installed modules in ZS. After testing I noticed downgraded upload speeds, so something went maybe wrong.

Now I am eagerly waiting for help and support for vmware-tools and modules for this ZS 2.x tree.
Back to top
View user's profile Send private message
donsaulio



Joined: 19 Apr 2012
Posts: 2

PostPosted: Fri May 17, 2013 5:46 pm    Post subject: Re: HowTo: vmware-tools in ZeroShell Reply with quote

Any success on Version 2 RC2 ? -- I can't get /lib/modules to unlink since is a read only file system, if I copy /lib to /Database/rootfs/lib after removing /lib I can link the new /lib to /Database/rootfs/lib anymore since /lib is missing.

Thanks,

xmas79 wrote:
Brief history: I was disappointed I couldn’t properly shutdown my ZeroShell VM during (occasional) main server maintenance. So I decided to dig into this adventure… Successfully! Maybe it’s not the cleanest way to do it, but it simply works…


Works on: VMware Server 2.0.0, ZeroShell-1.0.beta12-VMWARE.zip, others not tried.
Tools required: a brain.
Time required: about 15min. (if you know what you’re doing).
Hope: there's nothing wrong here.

ZeroShell for VMware essentially is a Live distro. It keeps Databases and configurations into a persistent device, but the system itself is set up on a ReadOnly filesystem. Unfortunately, vmware-tools installation needs to create some symbolic link and to copy files into this ReadOnly file system. That means we need to transform it in a ReadWrite one (and persistent! I remember you / is in RAM!). Let’s see what we can do...


Step 1: ReadWrite filesystem setup and vmware-tools installation files copy:
1. Shutdown your VM and install a supplementary CD device mounting vmware-tools disk image. The file is called “linux.iso” and can be found in the VMware installation directory.
2. Start ZeroShell and gain root access in the console (not SSH because vmware-tools installation will reset your network device)
3. Type “loadkeys it” to load Italian keyboard (if you’re Italian of course), because we need to type a lot!
4. Mount the secondary cd with the vmware-tools on a temporary directory
Code:

a. mkdir /mnt/hdd
b. mount -t auto /dev/hdd /mnt/hdd

5. Copy tar.gz installation file to the /Database directory and uncompress it
Code:
cp /mnt/hdd/VMxxxxxx.tar.gz /Database
cd /Database
tar -xvzf VMxxxxxx.tar.gz

The second CD/DVD has done all his job. We can safely delete this hardware on next reboot.
Now you should have a directory called “vmware-tools-distrib” which contains installation files. What we need now is a ReadWrite copy of the /sbin and /usr:
Code:
cd /Database
mkdir rootfs
cd rootfs
mkdir sbin && mkdir usr
cp -a /sbin/* /Database/rootfs/sbin
cp -a /usr/* /Database/rootfs/usr

We also need a copy of the current modules directory that is inside /lib:
Code:
mkdir modules
cp -a /lib/modules/* /Database/rootfs/modules

Now we are ready to switch to a RW filesystem:
Code:
mount -o remount,rw /
unlink /sbin && ln -s /Database/rootfs/sbin /sbin
unlink /lib/modules && ln -s /Database/rootfs/modules /lib/modules
unlink /usr && /cdrom/usr/bin/ln -s /Database/rootfs/usr /usr


Now RW filesystem is ready.

Step 2: Prepararing for vmware-tools installation:
Code:
mkdir /Database/vmware-tools
cd /Database/vmware-tools
mkdir etc
cd etc
mkdir init.d
mkdir rc.d
cd rc.d
mkdir rc0.d
mkdir rc1.d
...
mkdir rc6.d


Step 3: vmware-tools installation:
Code:
cd /Database/vmware-tools-distrib
./vmware-install.pl


At this point, vmware installation should ask where we want to install and which folder contains rc0.d, rc1.d etc. folders. Of course you will answer:
Code:
/Database/vmware-tools/TheFolderItAsksFor/


So if it asks you “/usr/bin” you’ll answer “/Database/vmware-tools/usr/bin/” and so on… (note the trailing / at the end of the path). It will complaint about non-existing folders. Just accept to create them. Everything that goes to /Database/vmware-tools/xxx is OK.

The installation will terminate properly. Now you only need to “configure” vmware tools:
Code:
cd /Database/vmware-tools/usr/bin
./vmware-config-tools.pl
It should complaint that some modules have not been properly configured for your system and asks you to compile. Just tell “NO” to all questions and… Voilŕ! “vmware-guestd” process should be now running and perfectly working.

Step 4: Post installation.
Vmware-tools sadly creates a “vmware-tools” folder inside /etc… Which is in in RAM!!!! That means if we do not backup this folder, on the next reboot we’ll lose our configuration.
Code:
cd /Database/vmware-tools
mkdir startup
mkdir startup/etc
mkdir startup/etc/vmware-tools
cp -a /etc/vmware-tools/* /Database/vmware-tools/startup/etc/vmware-tools


Now we only need to restore that folder (and links to vmware files) on every startup. Save the following script “run.sh” in “/Database/vmware-tools/startup”:

Code:
#!/bin/bash
mount -o remount,rw /

unlink /usr && /cdrom/usr/bin/ln -s /Database/rootfs/usr /usr
unlink /sbin && ln -s /Database/rootfs/sbin /sbin

cp -a /Database/vmware-tools/scripts/etc/* /etc

/Database/vmware-tools/etc/init.d/vmware-tools start



Now WebLogin into ZeroShell. Go to the panel “Startup/Cron”, select “post boot”, enable status, and add the following line:
/Database/vmware-tools/startup/run.sh
Save and reboot and enjoy your vmware-tools!

Credits go to Fulvio for this excellent product!
Natale Galioto.

Disclaimer: This information is provided "as is". The author of this information disclaim any loss or liability, either directly or indirectly as a consequence of applying the information presented herein, or in regard to the use and application of said information. No guarantee is given, either expressed or implied, in regard to the merchantability, accuracy, or acceptability of the information.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    www.zeroshell.org Forum Index -> ZeroShell All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group