Koozali.org: home of the SME Server

ESXi 5 / SME Server 8 howto: VMWare Tools Installation

Offline Michail Pappas

  • *
  • 351
  • +1/-0
ESXi 5 / SME Server 8 howto: VMWare Tools Installation
« on: July 13, 2012, 12:55:59 PM »
One should definitely share info, instead of only asking for it ;)
 
The following are some steps taken to install vmware tools corresponding to ESXi 5, on SME 8. The steps are similar to the  FAQ at http://wiki.contribs.org/VMware_Tools and can be found  here and here for manual selection of the proper vmware installation commands.

My approach is a mix of http://packages.vmware.com/tools/docs/manuals/osp-esxi-50-install-guide.pdf and http://wiki.contribs.org/VMware_Tools . That is, the reasoning is to cater for vmware tools updates, via "yum update" commands.

Install the relevant repository:
Code: [Select]
db yum_repositories set vmware-tools repository \
Name 'VMWare Tools' \
BaseURL 'http://packages.vmware.com/tools/esx/5.0/rhel5/$basearch' \
EnableGroups no \
GPGCheck yes \
GPGKey http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-DSA-KEY.pub \
Visible no \
status enabled

Make the relevant changes:
Code: [Select]
signal-event yum-modify

(At this point I could not immediately call "yum install ..." for some reason. Just wait a bit if this happens.

Import the VMWare RSA key (not sure if this could be done via the db mechanism):
Code: [Select]
rpm --import http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-RSA-KEY.pub

Install VMWare tools on ESXi 5:
Code: [Select]
yum update
yum install vmware-tools-esx-kmods vmware-tools-esx-nox

Link the start script to run level 7:
Code: [Select]
ln -s /etc/init.d/vmware-tools-services /etc/rc7.d/S90vmware-tools-services

Start the service:
Code: [Select]
/etc/init.d/vmware-tools-services start

Everything should be ok now, just restart the machine. If you by any chance wish to use the vmxnet2 adapter instead of the lance, then shutdown the VM, delete the "Flexible"/"Lance" network adapter and add "vmxnet2" in its place. Start the VM. If all goes ok, you'll now have the improved vmxnet NIC.

If useful, perhaps someone could add it to the FAQ at http://wiki.contribs.org/VMware_Tools
« Last Edit: July 28, 2012, 11:05:40 AM by chris burnat »

Offline ourmojo

  • 1
  • +0/-0
Re: ESXi 5 / SME Server 8 howto: VMWare Tools Installation
« Reply #1 on: July 24, 2012, 03:15:22 PM »
One should definitely share info, instead of only asking for it ;)

One should also say Thank You when they have been helped. :grin:

Thank You! Worked perfectly.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: ESXi 5 / SME Server 8 howto: VMWare Tools Installation
« Reply #2 on: July 24, 2012, 06:22:05 PM »
One should definitely share info, instead of only asking for it ;)

Yes, but please do so in the correct place. This forum's purpose is:

  Discussion of the use of *ONLY* the components and features included on the SME Server 8.x CD. Please help the developers by
  reporting any problems to the Bug Tracker first, not here.

The wiki is the correct place for you to post your information.

Quote
If useful, perhaps someone could add it to the FAQ at http://wiki.contribs.org/VMware_Tools

You can get access to do that.

http://wiki.contribs.org/SME_Server:Volunteering#Wiki_Team

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: ESXi 5 / SME Server 8 howto: VMWare Tools Installation
« Reply #3 on: July 24, 2012, 07:16:51 PM »

Install the relevant repository:
Code: [Select]
db yum_repositories set vmware-tools repository \
Name 'VMWare Tools' \
BaseURL 'http://packages.vmware.com/tools/esx/5.0/rhel5/$basearch' \
EnableGroups no \
GPGCheck yes \
GPGKey http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-DSA-KEY.pub \
Visible no \
status enabled

I would add to Charlie's post that (IMVHO) an external repository should not be enabled by default

Offline Michail Pappas

  • *
  • 351
  • +1/-0
Re: ESXi 5 / SME Server 8 howto: VMWare Tools Installation
« Reply #4 on: July 24, 2012, 10:15:05 PM »
Yes, but please do so in the correct place.

[...]

The wiki is the correct place for you to post your information.

You can get access to do that.

http://wiki.contribs.org/SME_Server:Volunteering#Wiki_Team
I understand that, but must respectfully add that my time is limited. Creating (yet another) account drains my limited time resource. So my reasoning is that I either (a) would post this in the forum, in the hope that google'ing for something like that would help someone or (b) not post it at all.

I understand this is a volunteer project, and I'm helping to the extent I can. And with that said, please do not take my explanation above as a sign of an apology on my part; rather an explanation. :)

@Stefano: thanks, did not know that, will fix it.

EDIT: Can't fix it Stefano, can't edit the initial post, perhaps a moderator?
« Last Edit: July 24, 2012, 10:28:34 PM by reqman »

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: ESXi 5 / SME Server 8 howto: VMWare Tools Installation
« Reply #5 on: July 24, 2012, 11:36:11 PM »
I understand that, but must respectfully add that my time is limited.

Can you name one person's whose time is not limited? :-)

Offline chris burnat

  • *****
  • 1,135
  • +2/-0
    • http://www.burnat.com
Re: ESXi 5 / SME Server 8 howto: VMWare Tools Installation
« Reply #6 on: July 25, 2012, 02:45:14 AM »
I understand that, but must respectfully add that my time is limited. Creating (yet another) account drains my limited time resource. So my reasoning is that I either (a) would post this in the forum, in the hope that google'ing for something like that would help someone or (b) not post it at all.

I understand this is a volunteer project, and I'm helping to the extent I can. And with that said, please do not take my explanation above as a sign of an apology on my part; rather an explanation. :)

@Stefano: thanks, did not know that, will fix it.

EDIT: Can't fix it Stefano, can't edit the initial post, perhaps a moderator?

Hello Michael,
Fair enough.  I will go and fix, i.e. edit your original post and later on put your Howto in the Wikis and fix repos - need to check the lot to ensure that correct commands is given once we set the repo to "disabled".  This being said, you do not have to create another account for access to the Wikis, just open a bug in Bugzilla here:
Code: [Select]
http://bugs.contribs.org/enter_bug.cgi?product=SME%20Web%20site-select mediawikis for component
-provide your username for the Forums
Takes around 1 minute, someone will approve, you done, and can use Wikis next time.  I think you will find this a more efficient way of passing info than all of this coming and going in this thread.... (LOL)
Cheers.

Note: Moving to General Discussions.
« Last Edit: July 25, 2012, 02:49:50 AM by chris burnat »
- chris
If it does not work out of the box, please fill in a Bug Report @ Bugzilla (http://bugs.contribs.org)  - check: http://wiki.contribs.org/Bugzilla_Help .  Thanks.

Offline chris burnat

  • *****
  • 1,135
  • +2/-0
    • http://www.burnat.com
Re: ESXi 5 / SME Server 8 howto: VMWare Tools Installation
« Reply #7 on: July 25, 2012, 05:42:15 AM »
Here is the edited version of the howto taking into accounts Stefano comments about external repos not being enabled.  I checked and it installs alright. However, vmtoolsd will not start....  Any clues?

Install the relevant repository:
Code: [Select]
db yum_repositories set vmware-tools repository \
Name 'VMWare Tools' \
BaseURL 'http://packages.vmware.com/tools/esx/5.0/rhel5/$basearch' \
EnableGroups no \
GPGCheck yes \
GPGKey http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-DSA-KEY.pub \
Visible no \
status disabled

Make the relevant changes stick:
Code: [Select]
signal-event yum-modify

[Note: At this point I could not immediately call "yum install ..." for some reason. Just wait a bit if this happens.]

Import the VMWare RSA key (not sure if this could be done via the db mechanism):
Code: [Select]
rpm --import http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-RSA-KEY.pub

Update server to latest packages:
Code: [Select]
yum update

Install VMWare tools on ESXi 5:
Code: [Select]
yum --enablerepo=vmware-tools install vmware-tools-esx-kmods vmware-tools-esx-nox

Link the start script to run level 7:
Code: [Select]
ln -s /etc/init.d/vmware-tools-services /etc/rc7.d/S90vmware-tools-services

Start the service:
Code: [Select]
/etc/init.d/vmware-tools-services start

Everything should be ok now, just restart the machine. If you by any chance wish to use the vmxnet2 adapter instead of the lance, then shutdown the VM, delete the "Flexible"/"Lance" network adapter and add "vmxnet2" in its place. Start the VM. If all goes ok, you'll now have the improved vmxnet NIC.

###Note1 : not starting for me:
Code: [Select]
[root@sme80 /]# service vmware-tools-services start
[root@sme80 /]#
[root@sme80 ~]# pgrep -fl vmtoolsd
[root@sme80 ~]#
[root@sme80 ~]# service vmware-tools-services status
vmtoolsd is not running
vmmemctl kernel module not loaded.

###Note 2:
Code: [Select]
yum --enablerepo=vmware-tools install vmware-tools-esx-kmods vmware-tools-esx-nox
My understanding is that  this command assumes that we are dealing with a standard kernel, what about if kernel is PAE?


- chris
If it does not work out of the box, please fill in a Bug Report @ Bugzilla (http://bugs.contribs.org)  - check: http://wiki.contribs.org/Bugzilla_Help .  Thanks.

Offline Michail Pappas

  • *
  • 351
  • +1/-0
Re: ESXi 5 / SME Server 8 howto: VMWare Tools Installation
« Reply #8 on: July 25, 2012, 07:56:26 AM »
Hello Michael,
Fair enough.  I will go and fix, i.e. edit your original post and later on put your Howto in the Wikis and fix repos - need to check the lot to ensure that correct commands is given once we set the repo to "disabled".  This being said, you do not have to create another account for access to the Wikis, just open a bug in Bugzilla here:
Code: [Select]
http://bugs.contribs.org/enter_bug.cgi?product=SME%20Web%20site-select mediawikis for component
-provide your username for the Forums
Takes around 1 minute, someone will approve, you done, and can use Wikis next time.
Hahaha, ok I'll do that :)
Quote
I think you will find this a more efficient way of passing info than all of this coming and going in this thread.... (LOL)
Well, I must agree. :D

Quote
###Note 2:
Code: [Select]
yum --enablerepo=vmware-tools install vmware-tools-esx-kmods vmware-tools-esx-nox
My understanding is that  this command assumes that we are dealing with a standard kernel, what about if kernel is PAE?
... and there goes my first bug :D

In this case the line above should be (prolly) modified to:
Code: [Select]
yum --enablerepo=vmware-tools install vmware-tools-esx-kmods-PAE vmware-tools-esx-nox
Can you please provide me with the output of "uname -r" ? Perhaps I can do this with some scripting, in order to have a single yum install command for both PAE/non-PAE.

Offline chris burnat

  • *****
  • 1,135
  • +2/-0
    • http://www.burnat.com
Re: ESXi 5 / SME Server 8 howto: VMWare Tools Installation
« Reply #9 on: July 25, 2012, 08:09:17 AM »
........[snip]
In this case the line above should be (prolly) modified to:
Code: [Select]
yum --enablerepo=vmware-tools install vmware-tools-esx-kmods-PAE vmware-tools-esx-nox
Can you please provide me with the output of "uname -r" ? Perhaps I can do this with some scripting, in order to have a single yum install command for both PAE/non-PAE.

1) On the server I tested your howto, it turns out it is a standard kernel, so command you had should work fine one would think, but it does not, or at least I cannot start  vmware-tools-services as shown in previous post:
Code: [Select]
[root@sme80 ~]# uname -r
2.6.18-308.8.2.el5
Life is full of mysteries...  I can test some more for you, server is still loaded.

2) My production server returns:
Code: [Select]
[root@gateway0 ~]# uname -r
2.6.18-308.11.1.el5PAE
And whilst I did not tested your howto on this box, you may need to cater for this eventuality...

Cheers.
- chris
If it does not work out of the box, please fill in a Bug Report @ Bugzilla (http://bugs.contribs.org)  - check: http://wiki.contribs.org/Bugzilla_Help .  Thanks.

Offline chris burnat

  • *****
  • 1,135
  • +2/-0
    • http://www.burnat.com
Re: ESXi 5 / SME Server 8 howto: VMWare Tools Installation
« Reply #10 on: July 25, 2012, 08:26:37 AM »
Oooops. I made an error, you need to follow the link given by Charlie to get access to the Wikis, or just paste this one:
Quote
http://forums.contribs.org/index.php?action=admin;area=regcenter;sa=register
and enter your  password.
- chris
If it does not work out of the box, please fill in a Bug Report @ Bugzilla (http://bugs.contribs.org)  - check: http://wiki.contribs.org/Bugzilla_Help .  Thanks.

Offline Michail Pappas

  • *
  • 351
  • +1/-0
Re: ESXi 5 / SME Server 8 howto: VMWare Tools Installation
« Reply #11 on: July 25, 2012, 11:02:09 AM »
1) On the server I tested your howto, it turns out it is a standard kernel, so command you had should work fine one would think, but it does not, or at least I cannot start  vmware-tools-services as shown in previous post:
Code: [Select]
[root@sme80 ~]# uname -r
2.6.18-308.8.2.el5
Life is full of mysteries...  I can test some more for you, server is still loaded.
Just to be on the safe side, you are running ESXi 5, correct? The guest is a 32-bit SME obviously? How did you configure your VM on ESXi, as Red Hat 5 32-bit, CentOS 4/5/6 32-bit, other?

I have tested this on the following systems:
* my production server (SME 8, under ESXi 5), server-only setup, with a 2.6.18-308.11.1.el5 kernel and
* a test server specifically made to test this issue (also SME 8, under ESXi 5), specs same as above

In the latter case I followed the instructions as edited by you and everything worked fine here.

EDIT: I'd try to run the contents of /etc/init.d/vmware-tools-services one line at a time and check what breaks where...

Quote
2) My production server returns:
Code: [Select]
[root@gateway0 ~]# uname -r
2.6.18-308.11.1.el5PAE
And whilst I did not tested your howto on this box, you may need to cater for this eventuality...

This is a bit of a quick and dirty hax, but I've changed the install command to the following, which should work for both PAE/non-PAE kernels as well as the 64-bit ones (will need some feedback).
Code: [Select]
yum --enablerepo=vmware-tools install \
    vmware-tools-esx-kmods`uname -r | sed 's/2.*el5//g' | sed 's/PAE/-PAE/'` \
    vmware-tools-esx-nox
« Last Edit: July 25, 2012, 11:05:41 AM by reqman »

Offline Michail Pappas

  • *
  • 351
  • +1/-0
Re: ESXi 5 / SME Server 8 howto: VMWare Tools Installation
« Reply #12 on: July 25, 2012, 11:18:02 AM »
Being nub enough, please don't laugh with my suggestion. On the problematic machine:
Code: [Select]
cp /etc/init.d/vmware-tools-services ~
vi ~/vmware-tools-services
At line 11 which is initially empty, insert the following command:
Code: [Select]
set -x

Save the file and then from the shell, run the following (note the ambersand):
Code: [Select]
~/vmware-tools-services start

Paste the command output here.

Offline chris burnat

  • *****
  • 1,135
  • +2/-0
    • http://www.burnat.com
Re: ESXi 5 / SME Server 8 howto: VMWare Tools Installation
« Reply #13 on: July 25, 2012, 12:30:34 PM »
OK, all is fine now.  I am a bit new to virtual environment (an understatement...) and I stuffed up.  Hope I did not waste too much of your time.  Where now? Are you happy with the hack you done for kernel (PAE)?  Problem is, there may be other kernels around, not sure...  It may perhaps be safer to have the user doing uname -r and then adding correct kernel type to the installation command, this way no possibility of mistakes..
- chris
If it does not work out of the box, please fill in a Bug Report @ Bugzilla (http://bugs.contribs.org)  - check: http://wiki.contribs.org/Bugzilla_Help .  Thanks.

Offline Michail Pappas

  • *
  • 351
  • +1/-0
Re: ESXi 5 / SME Server 8 howto: VMWare Tools Installation
« Reply #14 on: July 25, 2012, 01:10:11 PM »
OK, all is fine now.  I am a bit new to virtual environment (an understatement...) and I stuffed up.  Hope I did not waste too much of your time.
No worries there.

Quote
Where now? Are you happy with the hack you done for kernel (PAE)?  Problem is, there may be other kernels around, not sure...  It may perhaps be safer to have the user doing uname -r and then adding correct kernel type to the installation command, this way no possibility of mistakes..
I've already added a wiki for having 8.0 guests under either Esxi 5.0 or 5.0u1. If there are lots of kernels then I guess the proper thing to do is provide extra instructions for them. I have tested in a non-PAE kernel; it works fine. I've also made some tests so that the installation will go alright in a PAE-enabled kernel case. OTOH, perhaps play it safe and make the selection manually.

What do the other readers here think?

Offline chris burnat

  • *****
  • 1,135
  • +2/-0
    • http://www.burnat.com
Re: ESXi 5 / SME Server 8 howto: VMWare Tools Installation
« Reply #15 on: July 28, 2012, 03:04:10 AM »
OTOH, perhaps play it safe and make the selection manually.
What do the other readers here think?

Playing it safe is probably best.
Thanks for your patience.
- chris
If it does not work out of the box, please fill in a Bug Report @ Bugzilla (http://bugs.contribs.org)  - check: http://wiki.contribs.org/Bugzilla_Help .  Thanks.

Offline Michail Pappas

  • *
  • 351
  • +1/-0
Re: ESXi 5 / SME Server 8 howto: VMWare Tools Installation
« Reply #16 on: July 28, 2012, 10:19:34 AM »
Modified the wiki article here and here for manual selection of the proper vmware installation commands.

If possible, please modify the first post here to include a link directly to these articles.
[Note: done.]
« Last Edit: July 28, 2012, 11:07:37 AM by chris burnat »