Installing the Linux VMware Software Manager tool

I have been using the VMware Software Manager since the day it came out.  But, it often has something I can see that others cannot.  Or, I don’t see something that they do.  Plus it is often late at downloading things down for me, or making them available.

A friend of mine has created a Linux version of the VMware Software Manager tool.  And he has put a lot of work in it so that many of the little issues that might occur in the VMware version are handled nicely.  Of course, it is still a legit tool so you need to supply your My VMware credentials.

This article will help make it work for you.

Things to have ready

  • You will need a Redhat based distribution of Linux – for me it is Centos and I suggest you use it too if you can.
  • The readme for the script, and the script are easy to find but don’t download the script as it will be pulled down automatically later.  This way you will always get the latest copy – plus it makes upgrades easier.
  • You can use an NFS or SMB share to host the downloaded files.  NFS is likely easier, but SMB is much more useful. So have a SMB share mounted on your Linux box.  We will do that below so I have all the necessary info for you (and me) in one place.
  • Internet connection to download patches and other things – sort of obvious I guess – right?

Getting things ready

  • So deploy a Centos v7 VM.  BTW, I built my template using this article. I have done this with DHCP and static IP and both work fine.  Static meant a little more config but links in that article will help and doing all your network config in a custom specification works great and is easier for non-Linux people.
  • Next we need to update so – yum update. In my case there was a lot of updates (231 packages) but no reboot necessary. But I rebooted anyway to make sure things were good.
  • Make sure you have an account that is not root as that is what VSM will need to run as. The install of the software will be as root, but later after stuff is installed you will need to work as non-root.  Use the following commands as a reminder if you need help.
    • adduser new_user_name (this creates new account)
    • passwd new_user_name (this creates a password for it)
    • chown -R new_user_name.new_user_name /usr/local/bin (after the install as root you need to do this)
    • chown -R new_user_name.new_user_name /mnt/win (after the install as root you need to do this)
    • chown -R new_user_name.new_user_name /tmp/vsm (after the install as root you need to do this)

Configuring SMB on Centos

So we want our downloaded files to be stored on an SMB share so they are easier to consume. We need to work as root.

  • We need to install some files first:

yum install samba-client samba-common cifs-utils

  • Next, create a local mount point:

[root@host]# mkdir /mnt/win

  • Next, edit the /etc/fastab and add a line:

//server /mnt/win cifs credentials=/home/user/file,uid=1000,forceuid,gid=1000,forcegid,cruid=1000,rw 0 0

  • Replace server with your appliance and the folder you want to mount.  And in my home folder there is a credential store that has my account, password and domain. Actually it is only a file.  The UID=1000 is the default for the first created user which is true in my case – you should use what is correct for your account. Doing it this way makes it easier to protect the file that contains the password but the fstab doesn’t have the password in it. The important stuff here that seems to make a big difference is the forceuid.
  • You can use mount -a to mount without a reboot. Once you have it working though, make sure to reboot to confirm. It seemed to me that mount -a worked right away, but a reboot took a minute or two after it was completely started and this seemed to vary a bit.  BTW, when I did this, I pointed it at a destination that had no files or folders in it.  So it was working but blank – a little confusing at first.  I will try and learn more and find a better method. It looks like it is more tricky since Windows is not in use.  It is using the credentials from my QNAP and connecting to the QNAP.
  • Several better (and more complex) ways to do this are in this article.
  • Restart your server and make sure that it does restart, and that the link is there.

Configuring VSM

Now we work on the fun stuff – like configuring VSM to work and being able to download files.  BTW, I do the work below in my home folder.   The script will end up, after the VSM install, in /usr/local/bin.

  • First we need to load some re-req’s that vsm needs.

yum -y install wget

wget -O aac-base.install https://raw.githubusercontent.com/Texiwill/aac-lib/master/base/aac-base.install

chmod +x aac-base.install

./aac-base.install -u

./aac-base.install vsm – make sure on this one to select VSM when you have the chance (choice 8).

Select 9) to exit when VSM is done. Now you need to make sure the chown above is done.  It is important since we did this all as root.  Now owner needs to change to your working account.

You should now have everything ready to proceed. You can do now the chown type stuff from above.

 Now we make stuff happen!

We have done the previous work as root.  Now we need to be working as a user.  We now need to change to where vsm.sh is.

cd /usr/local/bin

The first run of the vsm.sh script will ask us some questions and record things to make it a little easier next time. It also assumes a default path so we need to deal with that.  Help is available via vsm.sh -h.

  • vsm.sh –repo /mnt/win –save  .  My path – or share – is /mnt/win and you can use what you want. You can add –progress to see more progress info.
  • It should show in the small menu that you are using your new path.

  • As part of this first connection you will be prompted for your My VMware credentials and you will have the opportunity to download stuff.
  • The second time you run you would just use ./vsm.sh and not need to do any of the other stuff. You can actually use vsm.sh in your home folder so in my case it is /home/mwhite and I am logged in as mwhite.

This will show you the new path, and a bunch of XML type stuff will be downloaded and then you can choose what files to download and they will be stored on the share. I chose Datacenter, Enterprise Plus, and 6.5 and then all.  And a lot is coming down, even some partner stuff. You can easily tweak what you download and you can always use the excellent help – vsm -h – to see what options are available.

Cool Stuff

  • You can mark a release as a favorite, and then use the following command to keep everything up to date:

vsm.sh -y -r -l –favorite

  • You can find the option to mark when you are inside of a product area.  See below where the option is when I am in the vRA area.

  • So doing updates is easy. When logged in as root, and from any folder:

./aac-base.install -u

./aac-base.install -i vsm

  • You will need to do the chmod +x vsm.sh since it is downloaded again (I did not have to do this with the last update).
  • Want a cron job line to keep the installers, scripts and repo favorites current? So if aac-base is in /home/mwhite:

/home/mwhite/aac-base.install -u; /home/mwhite/aac-base.install -i vsm; /usr/local/bin/vsm.sh -r -l -y –favorite

  • Want to check the version?

vsm.sh –version

  • If you have text that is Cyan colored, it means that it came from My VMware dynamically and not from the VSM static files.
  • If you have text that is black with cyan it means that it came from My VMware dynamically AND it doesn’t exist in your repository yet.
  • If you have black on white background it means that is missing based on VSM.

Links

Updates

  • 4/17/18 – added a bit more info around updates.
  • 3/12/18 – add more text around colors and a screenshot as an example.
  • 3/9/18 – added a link to another article that has info on making VSM work with NFS.  Very nicely done article.
  • 2/5/18 – updated for the new fstab line. That seems to make things very reliable.
  • 2/4/18 – updated to cover off how root cannot run VSM.  Gotten a little messy but it works. I have some issues on my QNAP appliance with not using root but it sort of works.  Would likely be easier using Windows.
  • 2/2/18 – more updates – see this article.
  • 1/12/18 – version 3.0 is now out with serious improvements. Update in this article should work, I have not tried it yet with 3.0.
  • 1/8/18 – here is a link to some ideas and a sample on fixing XHTML files that may be useful.
  • 11/22/17 – today or tomorrow there will be a 2.5 out.  Update in this article will work.  It has a lot of code optimization, and a -W that will download everything.
  • 11/12/17 – updated for 2.0.1 and make it a littler easier to read.
  • This was done with 1.6.9 and I will keep it updated as the versions change.

Summary

By the time we reach here, you should have a Linux VM with the VMware Software download capability running and maybe even it is writing out to a SMB / CIFS share.  And things should work good! I have tested this article quite carefully and it works.  But, I don’t like the CIFS share – it seems to work fine with mount -a but it takes longer to work after a reboot.  I will try and improve that connection and update this article as I learn more.

Questions and comments welcomed and encouraged!

Michael

=== END ===

 

One thought on “Installing the Linux VMware Software Manager tool

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.