VmWare/VmWare Tools

From r00tedvw.com wiki
(Difference between revisions)
Jump to: navigation, search
(Oracle Linux)
 
Line 16: Line 16:
 
=Installing on RPM based systems=
 
=Installing on RPM based systems=
 
==Oracle Linux==
 
==Oracle Linux==
 +
===Open Source===
 +
<nowiki>~$ sudo yum install open-vm-tools -y</nowiki>
 +
 +
===VMWare===
 +
 
Reference: [https://kb.vmware.com/selfservice/search.do?cmd=displayKC&docType=kc&docTypeID=DT_KB_1_1&externalId=1018392 https://kb.vmware.com/selfservice/search.do?cmd=displayKC&docType=kc&docTypeID=DT_KB_1_1&externalId=1018392]
 
Reference: [https://kb.vmware.com/selfservice/search.do?cmd=displayKC&docType=kc&docTypeID=DT_KB_1_1&externalId=1018392 https://kb.vmware.com/selfservice/search.do?cmd=displayKC&docType=kc&docTypeID=DT_KB_1_1&externalId=1018392]
  
Line 143: Line 148:
  
 
Found VMware Tools CDROM mounted at /mnt/cdrom. Ejecting device /dev/sr0 ..</nowiki>
 
Found VMware Tools CDROM mounted at /mnt/cdrom. Ejecting device /dev/sr0 ..</nowiki>
 
  
 
=Setup VMWare Tools on Ubuntu 16.04=
 
=Setup VMWare Tools on Ubuntu 16.04=

Latest revision as of 17:09, 29 May 2020

Contents

[edit] Open-Source version

You should be able to get open-vm-tools from the default repos on both redhat/ubuntu.

~$ sudo yum search open-vm-tools
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: packages.oit.ncsu.edu
 * extras: packages.oit.ncsu.edu
 * updates: packages.oit.ncsu.edu
=========================================== N/S matched: open-vm-tools ===========================================
open-vm-tools.x86_64 : Open Virtual Machine Tools for virtual machines hosted on VMware
open-vm-tools-desktop.x86_64 : User experience components for Open Virtual Machine Tools
open-vm-tools-devel.x86_64 : Development libraries for Open Virtual Machine Tools
open-vm-tools-test.x86_64 : Test utilities for Open Virtual Machine Tools

  Name and summary matches only, use "search all" for everything.

[edit] Installing on RPM based systems

[edit] Oracle Linux

[edit] Open Source

~$ sudo yum install open-vm-tools -y

[edit] VMWare

Reference: https://kb.vmware.com/selfservice/search.do?cmd=displayKC&docType=kc&docTypeID=DT_KB_1_1&externalId=1018392

To install VMware Tools in a Linux guest operating system using RPM:
1. Ensure that your Linux virtual machine is powered on.
2. If you are running a GUI interface, open a command shell.
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:

~$ sudo mkdir /mnt/cdrom

5. To mount the CDROM, run:

~$ sudo mount /dev/cdrom/ /mnt/cdrom/

6. Decompress the tar:

~$ sudo tar -C /tmp/ -zxf /mnt/cdrom/VMwareTools-9.4.5-1598834.tar.gz 

7. Run the installer"

~$ cd /tmp/vmware-tools-distrib/
sudo ./vmware-install.pl 

8. Hit Enter on all the prompts if the default values listed within brackets are acceptable

Creating a new VMware Tools installer database using the tar4 format.

Installing VMware Tools.

In which directory do you want to install the binary files? 
[/usr/bin] 

What is the directory that contains the init directories (rc0.d/ to rc6.d/)? 
[/etc/rc.d] 

What is the directory that contains the init scripts? 
[/etc/rc.d/init.d] 

In which directory do you want to install the daemon files? 
[/usr/sbin] 

In which directory do you want to install the library files? 
[/usr/lib/vmware-tools] 

The path "/usr/lib/vmware-tools" does not exist currently. This program is 
going to create it, including needed parent directories. Is this what you want?
[yes] 

In which directory do you want to install the documentation files? 
[/usr/share/doc/vmware-tools] 

The path "/usr/share/doc/vmware-tools" does not exist currently. This program 
is going to create it, including needed parent directories. Is this what you 
want? [yes] 

The installation of VMware Tools 9.4.5 build-1598834 for Linux completed 
successfully. You can decide to remove this software from your system at any 
time by invoking the following command: "/usr/bin/vmware-uninstall-tools.pl".

Before running VMware Tools for the first time, you need to configure it by 
invoking the following command: "/usr/bin/vmware-config-tools.pl". Do you want 
this program to invoke the command for you now? [yes]

9. run the configuration tools script (/usr/bin/vmware-config-tools/pl)

~$ Initializing...


Making sure services for VMware Tools are stopped.

Stopping VMware Tools services in the virtual machine:
   Guest operating system daemon:                          [  OK  ]
   Unmounting HGFS shares:                                 [  OK  ]
   Guest filesystem driver:                                [  OK  ]


The module vmci has already been installed on this system by another installer 
or package and will not be modified by this installer.

The module vsock has already been installed on this system by another installer
or package and will not be modified by this installer.

The module vmxnet3 has already been installed on this system by another 
installer or package and will not be modified by this installer.

The module pvscsi has already been installed on this system by another 
installer or package and will not be modified by this installer.

The module vmmemctl has already been installed on this system by another 
installer or package and will not be modified by this installer.

The VMware Host-Guest Filesystem allows for shared folders between the host OS 
and the guest OS in a Fusion or Workstation virtual environment.  Do you wish 
to enable this feature? [no] 

The vmxnet driver is no longer supported on kernels 3.3 and greater. Please 
upgrade to a newer virtual NIC. (e.g., vmxnet3 or e1000e)

The vmblock enables dragging or copying files between host and guest in a 
Fusion or Workstation virtual environment.  Do you wish to enable this feature?
[no] 

VMware automatic kernel modules enables automatic building and installation of
VMware kernel modules at boot that are not already present. This feature can be

enabled/disabled by re-running vmware-config-tools.pl.

Would you like to enable VMware automatic kernel modules?
[no] 

No X install found.

Creating a new initrd boot image for the kernel.
   Checking acpi hot plug                                  [  OK  ]
Starting VMware Tools services in the virtual machine:
   Switching to guest configuration:                       [  OK  ]
   Guest operating system daemon:                          [  OK  ]
The configuration of VMware Tools 9.4.5 build-1598834 for Linux for this 
running kernel completed successfully.

You must restart your X session before any mouse or graphics changes take 
effect.

You can now run VMware Tools by invoking "/usr/bin/vmware-toolbox-cmd" from the
command line.

To enable advanced X features (e.g., guest resolution fit, drag and drop, and 
file and text copy/paste), you will need to do one (or more) of the following:
1. Manually start /usr/bin/vmware-user
2. Log out and log back into your desktop session; and,
3. Restart your X session.

Enjoy,

--the VMware team

Found VMware Tools CDROM mounted at /mnt/cdrom. Ejecting device /dev/sr0 ..

[edit] Setup VMWare Tools on Ubuntu 16.04

[edit] Installing from Download

At the time of this writing, the latest version of vmware tools was 10.1.15.
Download the latest version with your vmware account (required) and then transfer it to your linux vm or data storage location.

~$ scp VMware-Tools-10.1.15-core-6677369.tar.gz 10.0.1.38:"/home/user/" 

Untar the file

~$ tar -xzf VMware-Tools-10.1.15-core-6677369.tar.gz

Now within the folder you extracted vmtools into, you should see a new file linux.iso. We need to mount this file.

~$ sudo mount -o loop /home/user/VMware-Tools-10.1.15-core-6677369/vmtools/linux.iso /media/cdrom

Extract the tools from the tar on the iso and launch the installer

~$ tar -xzvf /media/cdrom/VMwareTools-10.1.15-6677369.tar.gz -C /tmp/
~$ sudo /tmp/vmware-tools-distrib/vmware-install.pl

Answer all the questions it asks based on your preferences. It will ask you if you want to overwrite the open-vm-tools package if it is already installed. I did.
now lets clean up.

~$ sudo rm -rf /tmp/vmware*
~$ sudo rm -rf /home/user/VMware-Tools-10.1.15-core-6677369/
~$ sudo umount /media/cdrom

[edit] If Install VMware Tools is greyed out

I rebuilt a virtual machine that already had vmware tools installed on it, so esxi would not let me mount the vmware tools iso on it to reinstall. I opted to install vmware tools directly from the deb file located in their repo: https://packages.vmware.com/tools/esx/index.html
Make sure you download the right one. The newest one they had was for 12.04 LTS.

I'm currently writing a script to automatically download all the deb files and install them. What I have so far is below, working on finding a way to resolve the dependencies locally.

#!/bin/bash

url=('https://packages.vmware.com/tools/esx/6.0u2/ubuntu/dists/precise/main/binary-amd64/index.html?S=A')
FILENAMES=$(curl "$url" | grep -o "<A HREF=[\"A-Za-z0-9\.\_\-]*.deb" | cut -d '"' -f2)
read -r -a filenamesarray <<<$FILENAMES
URLCNT=$(printf "$url" | sed 's/[^/]//g' | wc -c)
URLCUT=$(printf "$url" | cut -f1-"$URLCNT" -d"/")

#printf  "$url""\n"
#printf "$FILENAMES""\n"
#printf "${filenamesarray[0]}""\n"
#printf "$URLCUT"

for ((i=0;i<=(${#filenamesarray[@]}-1);i++))
do
        wget "$URLCUT""/""${filenamesarray[i]}"
done

[edit] Check if VMware tools is installed

Should be located under /usr/bin/vmtoolsd

~$ ps -ef | grep vmtoolsd

Check the version

~$ vmtoolsd -v
Personal tools
Namespaces

Variants
Actions
Navigation
Mediawiki
Confluence
DevOps Tools
Open Source Products
Ubuntu
Ubuntu 22
Mac OSX
Oracle Linux
AWS
Windows
OpenVPN
Grafana
InfluxDB2
TrueNas
MagicMirror
OwnCloud
Pivotal
osTicket
OTRS
phpBB
WordPress
VmWare ESXI 5.1
Crypto currencies
HTML
CSS
Python
Java Script
PHP
Raspberry Pi
Canvas LMS
Kaltura Media Server
Plex Media Server
MetaSploit
Zoneminder
ShinobiCE
Photoshop CS2
Fortinet
Uploaded
Certifications
General Info
Games
Meal Plans
NC Statutes
2020 Election
Volkswagen
Covid
NCDMV
Toolbox