Category: Administration


There are two possible ways to install VMware tools on Linux servers. Either you install them through the VSphere client, either you can automate this task with Puppet. VMware has provided special repositories for all the Linux distribution flavors :  VMware Operating System Specific Packages (OSPs)

Here are the main steps to complete this installation :

->Download the public keys of the VMware OSPs repositories :

rpm –import http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-RSA-KEY.pub

rpm –import http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-DSA-KEY.pub

->Add a  new repo for YUM in /etc/yum.repos.d/ :

cat /etc/yum.repos.d/vmware-tools.repo
[vmware-tools]
name=VMware Tools
baseurl=http://packages.vmware.com/tools/esx/5.1/rhel6/x86_64
enabled=1
gpgcheck=1

->Fetch the metapackage vmware-tools-esx-nox and it will install all the required dependencies.

Here is now an example of a working Puppet manifest to deploy and install the VMware Tools on Linux servers running RHEL 6.4  :

cat vmwaretools.pp

class vmwaretools {
        exec { “Fetching RSA key”:
        command => “rpm –import http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-RSA-KEY.pub”,
        path => “/sbin:/bin”
        }

        exec { “Fetching DSA key”:
        command => “rpm –import http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-DSA-KEY.pub”,
        path => “/sbin:/bin”
        }

        exec { “Setting VMWare yum repo” :
        command => “echo -e \”[vmware-tools]\nname=VMware Tools\nbaseurl=http://packages.vmware.com/tools/esx/5.1/rhel6/x86_64\nenabled=1\ngpgcheck=1\” > /etc/yum.repos.d/vmware-tools.repo”,
        path => “/sbin:/bin”
        }

        package { “vmware-tools-esx-nox”:
          ensure => “installed”
        }
}

Do not forget to reload the puppetmaster on the server where it is located :

service puppetmaster reload

More information about VMware OSPs repositories : Read more

If you are running several namebased SSL VirtualHosts with mod_GnuTLS, you need to provide the adequate intermediate certificate to check that your SSL certificates chains are valid. With mod_GnuTLS, it is quite tricky to set it up. You do not have any options. The only way to make it work is to do as follow :

For a Debian-based distro :

root@localhost:~# cd /etc/ssl/certs

root@localhost:~#cat your_SSL_intermediate_certificate_provider.pem your_ssl_website_certificate.crt > your_new_ssl_certificate.crt

In the Apache config file for your SSL website, add the following line :

GnuTLSCertificateFile /etc/ssl/certs/your_new_ssl_certificat_site.crt

root@localhost:~#/etc/init.d/apache2 reload

More infos about GnuTLS

If you want the home directory of a user to be created at the first login, you probably use the PAM’s module pam_oddjob_mkhomedir to do that job. This operation is done for users not locally registered on the server.

You may have encounter this error after trying to log in for the first time. The authentication has worked well but the user does not have its own home directory.

org.freedesktop.DBus.Error.ServiceUnknown: The name com.redhat.oddjob_mkhomedir was not provided by any .service files
Could not chdir to home directory /home/CONCUR/$USER: No such file or directory

This is because a service called oddjobd,  is not started on your server.

root@localhost:~#service oddjobd start

Make sure that this service will be available at boot time.

root@localhost:~#chkconfig –level 2345 oddjobd on

Some web-based management tools use Java applets to perform configuration tasks. Within Debian Squeeze, you have two JRE available : openjdk-6-jre and sun-java6-jre. Concerning web browsers, two kinds of Java plug-ins can be installed : the official Oracle Java plug-in from the sun-java6-plugin package and the alternative Icedtea plug-in  from the icedtea6-plugin package.

The Oracle Java Plug-in is better suited for its integration within web browsers. To install it :

root@localhost:~#apt-get install sun-java6-plugin

To use one implementation of Java (either OpenJDK or Oracle java), make sure that your environment is properly configured. update-java-alternatives (utility from the java-common package) can be used for this purpose.

To list the existing Java environments :

root@localhost:~# update-java-alternatives -l
java-6-openjdk 1061 /usr/lib/jvm/java-6-openjdk
java-6-sun 63 /usr/lib/jvm/java-6-sun

To force the use of one given environment :

root@localhost:~#update-java-alternatives -s java-6-sun

To make sure that your installed applications only use the Oracle Java 6, check the output of update-alternatives -l . You should have the following output :

root@localhost:~#update-alternatives -l |grep java

update-alternatives –get-selections |grep java
appletviewer                   manual   /usr/lib/jvm/java-6-sun/bin/appletviewer
apt                            manual   /usr/lib/jvm/java-6-sun/bin/apt
ControlPanel                   manual   /usr/lib/jvm/java-6-sun/jre/bin/ControlPanel
extcheck                       manual   /usr/lib/jvm/java-6-sun/bin/extcheck
firefox-javaplugin.so          manual   /usr/lib/jvm/java-6-sun/jre/lib/amd64/libnpjp2.so
HtmlConverter                  manual   /usr/lib/jvm/java-6-sun/bin/HtmlConverter
iceape-javaplugin.so           manual   /usr/lib/jvm/java-6-sun/jre/lib/amd64/libnpjp2.so
iceweasel-javaplugin.so        manual   /usr/lib/jvm/java-6-sun/jre/lib/amd64/libnpjp2.so
idlj                           manual   /usr/lib/jvm/java-6-sun/bin/idlj
jar                            manual   /usr/lib/jvm/java-6-sun/bin/jar
jarsigner                      manual   /usr/lib/jvm/java-6-sun/bin/jarsigner
java                           manual   /usr/lib/jvm/java-6-sun/jre/bin/java
javac                          manual   /usr/lib/jvm/java-6-sun/bin/javac
javadoc                        manual   /usr/lib/jvm/java-6-sun/bin/javadoc
javah                          manual   /usr/lib/jvm/java-6-sun/bin/javah
javap                          manual   /usr/lib/jvm/java-6-sun/bin/javap
java_vm                        manual   /usr/lib/jvm/java-6-sun/jre/bin/java_vm
javaws                         manual   /usr/lib/jvm/java-6-sun/jre/bin/javaws
jconsole                       manual   /usr/lib/jvm/java-6-sun/bin/jconsole
jcontrol                       manual   /usr/lib/jvm/java-6-sun/jre/bin/jcontrol
jdb                            manual   /usr/lib/jvm/java-6-sun/bin/jdb
jexec                          manual   /usr/lib/jvm/java-6-sun/jre/lib/jexec
jhat                           manual   /usr/lib/jvm/java-6-sun/bin/jhat
jinfo                          manual   /usr/lib/jvm/java-6-sun/bin/jinfo
jmap                           manual   /usr/lib/jvm/java-6-sun/bin/jmap
jps                            manual   /usr/lib/jvm/java-6-sun/bin/jps
jrunscript                     manual   /usr/lib/jvm/java-6-sun/bin/jrunscript
jsadebugd                      manual   /usr/lib/jvm/java-6-sun/bin/jsadebugd
jstack                         manual   /usr/lib/jvm/java-6-sun/bin/jstack
jstat                          manual   /usr/lib/jvm/java-6-sun/bin/jstat
jstatd                         manual   /usr/lib/jvm/java-6-sun/bin/jstatd
keytool                        manual   /usr/lib/jvm/java-6-sun/jre/bin/keytool
midbrowser-javaplugin.so       manual   /usr/lib/jvm/java-6-sun/jre/lib/amd64/libnpjp2.so
mozilla-javaplugin.so          manual   /usr/lib/jvm/java-6-sun/jre/lib/amd64/libnpjp2.so
native2ascii                   manual   /usr/lib/jvm/java-6-sun/bin/native2ascii
orbd                           manual   /usr/lib/jvm/java-6-sun/jre/bin/orbd
pack200                        manual   /usr/lib/jvm/java-6-sun/jre/bin/pack200
pluginappletviewer             auto     /usr/lib/jvm/java-6-openjdk/jre/bin/pluginappletviewer
policytool                     manual   /usr/lib/jvm/java-6-sun/jre/bin/policytool
rmic                           manual   /usr/lib/jvm/java-6-sun/bin/rmic
rmid                           manual   /usr/lib/jvm/java-6-sun/jre/bin/rmid
rmiregistry                    manual   /usr/lib/jvm/java-6-sun/jre/bin/rmiregistry
schemagen                      manual   /usr/lib/jvm/java-6-sun/bin/schemagen
serialver                      manual   /usr/lib/jvm/java-6-sun/bin/serialver
servertool                     manual   /usr/lib/jvm/java-6-sun/jre/bin/servertool
tnameserv                      manual   /usr/lib/jvm/java-6-sun/jre/bin/tnameserv
unpack200                      manual   /usr/lib/jvm/java-6-sun/jre/bin/unpack200
wsgen                          manual   /usr/lib/jvm/java-6-sun/bin/wsgen
wsimport                       manual   /usr/lib/jvm/java-6-sun/bin/wsimport
xjc                            manual   /usr/lib/jvm/java-6-sun/bin/xjc
xulrunner-1.9-javaplugin.so    manual   /usr/lib/jvm/java-6-sun/jre/lib/amd64/libnpjp2.so
xulrunner-javaplugin.so        manual   /usr/lib/jvm/java-6-sun/jre/lib/amd64/libnpjp2.so

For Iceweasel,you can check that your Java plug-in is configured by typing about:plugins in the address bar.

After installing RHEL6.3 on a server, the next step is to register your server as a new asset in your local inventory (in Satellite for instance) or at https://access.redhat.com

Registering and giving the right subscriptions to your server can be done with subscription-manager command line utility. If you want to do the both steps in one time, just type :

root@localhost:~#subscription-manager register –autosubscribe

If you want to know the registration and subscription state of your server :

root@localhost:~# subscription-manager list

You may have the following output :

+——————————————-+
Installed Product Status
+——————————————-+
Product Name:             Red Hat Enterprise Linux Server
Product ID:               69
Version:                  6.3
Arch:                     x86_64
Status:                   Not Subscribed           
Starts:
Expires:  

In the web console, you may have the following message looking at your server’s page :

Status  : “System is not properly subscribed”

For the moment, the only workaround found to change this state and make your server properly subscribed is to look at the pool id of one of your subscriptions for an already declared server. (Both servers must be similar in terms of subscriptions).

root@localhost:~#subscription-manager list –available |grep -A3 -w ‘Red Hat Enterprise Linux Server’
Product Name:             Red Hat Enterprise Linux Server, Standard (1-2 sockets) (Up
                        to 1 guest) with Smart Management
Product Id:               RH0184831                
Pool Id:                  8a85f984356102f801356202921d190b

Product Name:             Red Hat Enterprise Linux Server, Standard (1-2 sockets) (Up
                        to 1 guest) with Smart Management
Product Id:               RH0184831RN              
Pool Id:                  8a85f984356102f80135620294061945

Product Name:             Red Hat Enterprise Linux Server, Standard (1-2 sockets) (Up
                        to 1 guest) with Smart Management
Product Id:               RH0184831RN              
Pool Id:                  8a85f984356102f801356202a51b1952

And now, for the server in error, just manually add a subscription to it :

root@localhost:~#subscription-manager subscribe –pool=your_chosen_pool_id

To check after this fresh modification :

root@localhost:~#subscription-manager list
+——————————————-+
Installed Product Status
+——————————————-+
Product Name:             Red Hat Enterprise Linux Server
Product ID:               69
Version:                  6.3
Arch:                     x86_64                   
Status:                   Subscribed               
Starts:                   12/15/11
Expires:                  07/27/13 

 

 

 

If you have to join a Linux server to a Windows domain managed by Active Directory and add this server into a defined OU, here is what you have to type : (Supposing your Samba version is later than 3.0.23)

root@your_server:#  net ads join -U admin_account@YOUR_COMPANY.ORG createcomputer=”/Computers/Servers/Your_office”

following this  : “OU=Your_office,OU=Servers,OU=Computers,DC=YOUR_COMPANY,DC=ORG”

where admin_account is the login name of a Windows administrator part of the “YOUR_COMPANY.ORG” domain with enough privileges. Pay attention to createcomputer option and its syntax.

If your host OS is Windows with a Linux flavor as a guest OS, here is a quick reminder of the steps to proceed to install or update the current VirtualBox guest additions.

The VirtualBox guest additions are located in the VBoxGuestAdditions ISO image which can be found in C:\Program Files\Oracle\VirtualBox

To install  them, load this ISO image into your virtual CD/DVD drive and your OS guest should make it available through a mount point. Make a local copy of its content into a folder and launch the following command as root :

root@localhost:~#./VBoxLinuxAdditions.run

Verifying archive integrity… All good.
Uncompressing VirtualBox 4.1.22 Guest Additions for Linux………
VirtualBox Guest Additions installer
Removing installed version 4.1.16 of VirtualBox Guest Additions…
Removing existing VirtualBox DKMS kernel modules …done.
Removing existing VirtualBox non-DKMS kernel modules …done.
Building the VirtualBox Guest Additions kernel modules …done.
Doing non-kernel setup of the Guest Additions …done.
You should restart your guest to make sure the new modules are actually used

Installing the Window System drivers
Installing X.Org Server 1.7 modules …done.
Setting up the Window System to use the Guest Additions …done.
You may need to restart the hal service and the Window System (or just restart
the guest system) to enable the Guest Additions.

Installing graphics libraries and desktop services components …done.

Three services should be present in /etc/init.d :

/etc/init.d/vboxadd
/etc/init.d/vboxadd-x11
/etc/init.d/vboxadd-service

After the install/upgrade of VirtualBox guest additions, reboot your guest OS to make the upgrade take effect.

For more information : Installing VirtualBox guest additions

Oracle has released the latest maintenance version of VirtualBox Please find below the details of the changelog :

This is a maintenance release. The following items were fixed and/or added:

  • VMM: fixed a potential host crash triggered by shutting down a VM when another VM was running (only affected 32-bit hosts and 64-bit OS X hosts, 4.1 regression, bug #9897)
  • VMM: fixed a potential host crash under a high guest memory pressure (seen with Windows 8 guests)
  • VMM: respect RAM preallocation while restoring saved state.
  • VMM: fixed handling of task gates if VT-x/AMD-V is disabled
  • Storage: fixed audio CD passthrough for certain media players
  • USB: don’t crash if a USB device is plugged or unplugged when saving or loading the VM state (SMP guests only)
  • RTC: fixed a potential corruption of CMOS bank 1
  • Mac OS X hosts: installer fixes for Leopard (4.1.20 regression)
  • Windows Additions: fixed memory leak in VBoxTray (bug #10808)

 

Oracle has released the latest maintenance version of VirtualBox Please find below the details of the changelog :

This is a maintenance release. The following items were fixed and/or added:

  • VMM: fixed a crash under rare circumstances for VMs running without hardware virtualization
  • VMM: fixed a code analysis bug for certain displacement instructions for VMs running without hardware virtualization
  • VMM: fixed an interpretion bug for TPR read instructions under rare conditions (AMD-V only)
  • Snapshots: fixed a crash when restoring an old snapshot when powering off a VM (bugs #9604, #10491)
  • VBoxSVC: be more tolerant against environment variables with strange encodings (bug #8780)
  • VGA: fixed wrong access check which might cause a crash under certain conditions
  • NAT: final fix for crashes under rare conditions (bug #10513)
  • Virtio-net: fixed the problem with receiving of GSO packets in Windows XP guests causing packet loss in host-to-VM transfers
  • HPET: several fixes (bugs #10170, #10306)
  • Clipboard: disable the clipboard by default for new VMs
  • BIOS: the PCI BIOS was not properly detected with the chipset type set to ICH9 (bugs #9301, #10327)
  • Mac OS X hosts: adaptions to Mountain Lion
  • Linux Installer: fixes for Gentoo Linux (bug #10642)
  • Linux guests: fixed mouse integration on Fedora 17 guests (bug #2306)
  • Linux Additions: compile fixes for RHEL/CentOS 6.3 (bug #10756)
  • Linux Additions: compile fixes for Linux 3.5-rc1 and Linux 3.6-rc1 (bug #10709)
  • Solaris host: fixed a guru meditation while allocating large pages (bug #10600)
  • Solaris host: fixed possible kernel panics while freeing memory
  • Solaris Installer: fixed missing icon for menu and desktop shortcuts

To install it on Linux, whatever your distro:

VirtualBox on Linux

Follow

Get every new post delivered to your Inbox.