Friday, August 10, 2012

How To Install VMWare Tools v4 on Ubuntu 12.04 LTS Server

SkyHi @ Friday, August 10, 2012

All the guides I found on the Internet, including VMWare’s website were outdated in some way, so I decided to write a guide of my own. I just went through these steps from start to finish on a fresh server and had no problems.
  1. Use Install VMWare Tools option in VMWare Client to attach media
  2. Update the server
  3. Create the mount point
  4. Mount the ISO

    You should see the message: mount: block device /dev/sr0 is write-protected, mounting read-only
  5. Change Directory
  6. Copy the tar file to your /tmp directory
  7. Install Build tools if necessary
  8. Change Directory
  9. Unmount the ISO
  10. Expand the tar
  11. Change Directory
  12. To prevent a potential error in the install script on Ubuntu 11.10, create a special directoryUnable to create symlink “/usr/lib64/” pointing to file ”/usr/lib/vmware-tools/lib64/”.
  13. Run the Install Script. The -d flag automatically answers the default to all questions. To customize it, just omit the -d.
  14. Reboot
Let me know if this worked for you!

15. Right click Client Setting-> Video Card and add more memory.


Connect Remotely to Your Linux Machine Graphically

SkyHi @ Friday, August 10, 2012

Free NX is a client/server application which allows you to login remotely from another PC into your Linux system. The client is available for both Linux and Windows, so you will be able to login from a Windows machine too.
NX client connected to a Debian KDE3 session, 1024x768

In order to set up Free NX, you only need to install three DEB packages, start a SSH server and you're ready to go. In Debian Lenny and Ubuntu, just follow the steps below:

First of all, install the SSH (secure shell) server:

apt-get install openssh-server

SSH listens by default on port 22. You can test your SSH server by trying to login to localhost:

ssh your_username@localhost

And use your user's password. If the login is successful, you can proceed to the next step. In order to logout, just type Ctrl+D.

Next, download the Free NX DEB packages from the NoMachine website, here. The files which you need to download are called:


Next, you will need to install all three of them, so type as root:

dpkg -i nxclient_3.3.0-6_i386.deb
dpkg -i nxnode_3.3.0-17_i386.deb
dpkg -i nxserver_3.3.0-22_i386.deb

What you need to do next is to start the NX server (if it isn't already started). To do that, type as root:

/etc/init.d/nxserver start

The output should be something like this:

# /etc/init.d/nxserver start
NX> 122 Service started.
NX> 999 Bye.
NX> 723 Cannot start NX statistics:
NX> 709 NX statistics are disabled for this server.
NX> 999 Bye.

Now, in order to test if what we've done is working, try to connect using the NX client to your own machine, so run as normal user:


Notice that the path to nxclient is non-standard, so nxclient will not be included in your path; you have to use the full path to it. See the screenshots below of NX client in action:

Enter your username and password from your Linux machine

Configure NX client - I used localhost host here, but from another machine you'll have to enter the IP of the remote machine

An alternative NX client is qtnx (apt-get install qtnx) but I had some stability issues with it when trying to connect to a machine which doesn't has NX server configured.

QtNX, another NX client

The good thing about Free NX is that clients are provided for both Linux and Windows, so you will be able to login into your Linux machine from Windows without any problems.


Tuesday, August 7, 2012

ESXi clone VM cli

SkyHi @ Tuesday, August 07, 2012
1. #mkdir W2K8R2; cd W2K8R2

2.# vmkfstools -i /vmfs/volumes/LocalDisk/w2k8_template/w2k8_template.vmdk -d thin /vmfs/volumes/LocalDisk/W2K8R2/W2K8R2.vmdk

Destination disk format: VMFS thin-provisioned
Cloning disk '/vmfs/volumes/LocalDisk/w2k8_template/w2k8_template.vmdk'...
Clone: 11% done.

3. create a normal VM
NOTE: the name must be same as "W2K8R2 "

4. use existing hard disk (browse to W2K8R2.vmdk)

5. done (all the related files should be under one folder).

Installing VMware Tools in a Linux virtual machine using a Compiler

SkyHi @ Tuesday, August 07, 2012

Note: If your Linux distribution is not RPM-based, has a custom kernel, or is unsupported, use the steps below to compile VMware Tools, otherwise, see Installing VMware Tools in a Linux virtual machine using RPM (1018392).
To install VMware Tools in a Linux guest operating system using Compiler:
  1. Ensure that your Linux virtual machine is powered on.
  2. If you are running a GUI interface, open a command shell.

    Note: Log in as a root user, or use the sudo command to complete each of these steps.
  3. Click VM in the virtual machine menu, then click Guest > Install/Upgrade VMware Tools and click OK.
  4. To create a mount point, run:
    mkdir /mnt/cdrom
  5. To mount the CDROM, run:
    mount /dev/cdrom /mnt/cdrom
  6. To copy the Compiler gzip tar file to a temporary local directory, run:
    cp /mnt/cdrom/VMwareTools-.tar.gz /tmp/
    Where  is the VMware Tools package version.
  7. To change to the tmp directory and extract the contents of the tar file into a new directory called vmware-tools-distrib, run:
    • cd /tmp
    • tar -zxvf VMwareTools-.tar.gz
  8. To change directory to vmware-tools-distrib and run the PERL script to install VMware Tools, run:
    • cd vmware-tools-distrib
    • ./
      • Follow the screen prompts to install the VMware Tools. Options in square brackets are default choices and can be selected by pressing Enter.
      • To compile VMware Tools successfully, you need gcc Compiler and Linux Kernel sources provided by your Linux distribution. Consult your Linux distribution documentation for details on how to install these packages.
      • It is normal for the console screen to go blank for a short time during the installation when the display size changes.
      • Some warnings or errors are normal, like when a files does not exist.
      • Depending on the Linux distribution, your network service might restart after installation. VMware recommends that you invoke this command from the console and not remotely.
  9. If you are running a GUI interface, restart your X Window session for any mouse or graphics changes to take effect.
  10. To start VMware Tools running in the background during an X Window session, run:
    /usr/bin/vmware-toolbox &
  11. Depending on your environment you may need to unmount the CDROM. To unmount the CDROM, run:
    umount /mnt/cdrom
  12. Depending on your environment, you may need to manually end the VMware Tools installation. To end the VMware Tools install, click VM in the virtual machine menu, then click Guest > End VMware Tools Install.
  13. To remove VMware Tools installation packages, run:
    • cd
    • rm /tmp/VMwareTools-.tar.gz
    • rm -rf /tmp/vmware-tools-distrib