iThinkVirtual™

VMware Software Manager: The Good…The Bad…The Alternative!

In this post, I am going to discuss a little, “not-so-well-known” utility, called VMware Software Manager.  This little “beast” was first released as v1.0 back on 2015-03-12, and its most current release, v1.5, came out on 2016-08-25.  So as you can see, it’s been quite a while since this tool has seen a new update release.  The problem now is that this utility seems to have been forgotten and/or neglected by VMware, but I will get into more of that a little later.  Let’s start off with the positive stuff.

The Good:

The VMware Software Manager allowed valid VMware-account holders the ability to download various software, such as ESXi or vCenter server, quickly and easily.  The installation was a breeze, the interface was clean and downloading software was effortless.  It basically just worked flawlessly!  The new software was readily available for download shortly after it was announced/released since this utility would read configuration files to see what software is available from the VMware repository and then provided that software for download.

So, having said that, what could possibly be wrong with this thing?  Let’s continue…

The Bad:

My main gripe with this utility was that support was only community-based, so if you had issues, you could forget about raising an official SR with support.  You had to rely patiently on the VMTN community and hope that users were knowledgeable enough and willing to help out.  Not saying anything bad about the community though, it’s a great forum full of some really smart people and it provides a wealth of information.

As I mentioned earlier, when this thing worked…it just plain WORKED!  Then, vSphere 6.0U3A was released with some bad/corrupt or missing files and upon launching the utility, it would simply hang at login or error out due to the missing files not being available! (Shhhh!..someone never updated the configuration files… ¯\_(ツ)_/¯  )  There is a thread over on the VMTN community that myself and others have contributed to and another describing this issue and a workaround method to ultimately get you to log in again.  This involved looking at log files to find which missing file was causing the error, then editing the configuration file to remove the missing files, and it was a major pain!

Lastly, it’s become extremely out of date and it seems as if VMware has completed forgotten about and/or decided to neglect and give up on it as there has not been any new software available for download in at least 6 months.  It’s also possible that the original responsible for this thing disbanded or moved onto other roles…who really knows?  Luckily, a friend and fellow community/vExpert member has provided a solution!

The Alternative:

Fellow vExpert, Edward Haletky aka Texiwill, has created a Linux-based port of the utility, titled “VSM“, which he updates almost daily to add new software and simply improve the appliance and it runs on an RHEL type distro like CentOS.  You can hit the ground running with this appliance in about 30 mins or less.  I have been fortunate enough to serve as a beta tester for him and have been doing so since he released v0.95, just shortly after the initial public launch.  At the time of this writing, the most recent release was v3.7.7 but has now been updated to the newest 4.5.3.  Screenshots may reflect previous versions.

Well…How do you get it?

In this post, I am going to cover how to install this bad-boy on a CentOS 7 minimal installation on ESXi using NFS, and on VMware Workstation leveraging the “Shared Folders” feature using VMHGFS.  Another vExpert, Michael White, has a similar post on setting up this appliance and using SMB/CIFS for storing the downloaded software.  Let’s get to it, shall we!

Prerequisites:

  • CentOS 7 x64 (Minimal) w/ open-vm-tools installed
  • a non-root user account
  • NFS storage or Local Storage (if running this on VMware Workstation/Fusion)

I will assume that you already have a basic installation of CentOS 7 running, or know how to set up a minimal installation, so that process is out of scope for this post.  

If you plan on running this on VMware Workstation/Fusion, run the following command to install the prerequisites needed for installing VMware Tools to get the vmhgfs driver for Shared Folders support.

sudo yum install -y perl gcc binutils make fuse kernel-headers kernel-devel net-tools policycoreutils-python

Otherwise, if you plan on using NFS to store the software, run the following command to install the NFS utilities.

sudo yum install -y nfs-utils

VMware Tools Installation:

Note: Enables vmhgfs driver support for Shared Folders on VMware Workstation or VMware Fusion

I will be installing the latest version of VMware Tools, version 10.2.0.  This can be obtained here.  Extract the .zip and attach the linux.iso to your CentOS VM in Workstation or Fusion.  Once connected, do the following.

Make a directory to mount the cdrom to.

sudo mkdir /mnt/cdrom

Mount the cdrom to this new directory.

sudo mount /dev/cdrom /mnt/cdrom

With the cdrom now mounted, let take a look at whats on the .iso

sudo ls /mnt/cdrom

We can see the compressed file that we will need to extract

Extract/Uncompress this file by running the following.  This is going to extract the file to my current working directory, $HOME

sudo tar zxpf /mnt/cdrom/VMwareTools-10.2.0-7253323.tar.gz

When that completes, we can see what was extracted by running

ls

At this point, we are done with the .iso and can unmount it by running.

sudo umount /dev/cdrom

Now, let’s navigate to the extracted folder and see what we’ve got.

cd vmware-tools-distrib/
ls

The Perl script is what we’re looking for here to install VMware Tools.  This will uninstall “open-vm-tools” if that is already installed on this machine.  Let’s go ahead and run it. 

sudo ./vmware-install.pl

Proceed to answer all the questions asked and select all of the defaults until the installation completes.

(Optional:) If you’d prefer to bypass the questions and force-install with all defaults run the following instead

sudo ./vmware-install.pl --force-install --default

This completes the VMware Tools installation and not the vmhgfs driver is installed.  Onto the good stuff!

VSM Installation:

Texiwill has provided an installation script on his GitHub page which will take care of the installation and its prerequisites. This is the preferred installation method so I’d advise that you download this script, and run it.  You’ll first have to make the script “executable” by running

chmod +x install.sh

For those who prefer the manual approach, you’ll first need to install “wget“, then run the following commands to install the utility.

Note: please change timezone location to your respective location

sudo yum install -y wget
mkdir aac-base
cd aac-base
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 America/New_York
sudo ./aac-base.install -i vsm America/New_York

Congrats!  You’ve successfully installed the utility.  Now to configure it for use.

By default, the VSM script will save the config file (.vsmrc) to “$HOME“.  It will also save the index.html and credstore files in “/tmp/vsm“.  I highly recommend you create an alternate directory to store these files in if you are using a system that has multiple users or change it to save them in the users $HOME directory.  Again, this is optional and can be skipped, but if you’d like to do so, run the following

mkdir /tmp/my_vsm

VSM Initial Configuration:

The last step before you can use the VSM script utility is to configure it.  To list the all available parameters, execute the script with the help parameter.

vsm.sh -h

Based on the help info, the required parameters to set are:

  • -v | –vsmdir VSMDirectory (this will be the “my_vsm” directory we created earlier)
  • –repo repopath (this will be the path to the directory we’ll create to save our download)

When first executing the script utility, you will be required to enter valid MyVMware credentials which will be saved to the configuration file.

Let’s go ahead and create our repo directories first.  Feel free to use my examples or anything else you’d like.  We will also use the same steps mentioned about to take ownership of these directories and then mount our physical storage to the newly created mount point directory. 

Note: Be sure to enable “Shared Folders” on Workstation or Fusion and select the shared folder to mount it to the VM.  Commands may be different from screenshots as I’ve updated some commands.

For VMHGFS:

sudo mkdir -pvm 755 /mnt/vmhgfs/depot/content
sudo chown -R <non-root_username>.<non-root_username> /mnt/vmhgfs

For NFS:

sudo mkdir -pvm 755 /mnt/nfs/depot/content
sudo chown -R <non-root_username>.<non-root_username> /mnt/nfs

With our directories ready, let’s go ahead and mount our storage to them!

For VMHGFS:

Note: I have mounted the following shared folder to the VM to use for this command.

sudo mount -t fuse.vmhgfs-fuse .host:/content /mnt/vmhgfs/depot/content -o allow_other

For NFS:

sudo mount -t nfs <IP_address>:/<volume#>/<path_to_share> /mnt/nfs/depot/content

For NFS 4.1 (optional):

sudo mount -t nfs4 -o vers=4,minorversion=1 <IP_address>:/<volume#>/<path_to_share> /mnt/nfs/depot/content

Now, with our storage mounted we can run the VSM script and configure for use.

Note: You will be prompted to enter your VMware credentials unless you supply the “-u” and “-p” parameters

For VMHGFS:

vsm.sh -y -v /tmp/my_vsm --repo /mnt/vmhgfs/depot/content --save

For NFS:

vsm.sh -y -v /tmp/my_vsm --repo /mnt/nfs/depot/content --save

That about does it!  The appliance is ready to use and you can navigate through the menus to find your desired software. 

Extras:

To make your mount points persistent through reboots, edit the “fstab” file with your editor of choice.  I prefer to use vi or vim, but many may choose to use nano instead.

sudo vi /etc/fstab

Then, add the following line and save the file.

For VMHGFS:

.host:/content /mnt/vmhgfs/depot/content    fuse.vmhgfs-fuse        allow_other     0 0

For NFS:

<IP_address>:/<volume#>/<path_to_share> /mnt/nfs/depot/content    nfs      soft,bg,rsize=8192,wsize=8192       0 0

For NFS 4.1 (optional):

<IP_address>:/<volume#>/<path_to_share> /mnt/nfs/depot/content    nfs      nfsvers=4.1,soft,bg,rsize=8192,wsize=8192       0 0

Updates are released quite frequently.  To update VSM to the latest version, you can run the following commands manually or add them to a shell script within “/etc/cron.daily” which will run around 3 AM.

Note: please change timezone location to your respective location

cd /home/<user_name>/aac-base; ./aac-base.install -u; ./aac-base.install -i vsm America/New_York

Additionally, if you’d like to keep your favorite download repository up-to-date, edit crontab

Note:  This requires that you first “mark” a repository by using that menu option

crontab -e

Then add the following line to it and save.  This will run daily at 6 AM.

0 6 * * * /usr/local/bin/vsm.sh -y -mr -c --favorite

My Preference:

I tend to use the following command when running VSM to get missing suites and packages from MyVMware.  If you do not use the “-m” parameter, it will only pull the same software available in the original VMware Software Manager tool from VMware.  The “-mr” parameter resets the “MyVMware” software info and implies “-m” hence why this is also used in the crontab line above.  The “-c” tells VSM to generate sha256sum checks against each downloaded file.

vsm.sh -y -mr -c

Note: Depending on what you downloaded, there may be certain .txt files that will fail the checksum.  This is expected and can be safely ignored.

Well, I hope you’ve found this post useful and I thank you for reading!  Special thanks again to Texiwill for making this awesome utility, as well as Mike White for posting his similar article using SMB/CIFS.

-virtualex-

Pingbacks:

Updates:

  • 03.23.18 – Updated to reflect changes in manual install commands for VSM v4.0.2, and cron.daily entry since cron runs as root so no need to use sudo
  • 04.12.18 – Added TZ (Time Zone) setting to manual install commands and modified /etc/fstab command for NFS mounts
  • 04.15.18 – Added “-c” parameter reference
  • 01.17.19 – Added some command syntaxes for NFS 4.1

vSphere…Synology…NFS v4.1

| 31/12/2017 | Tags: , , , ,

Welcome, and thanks for visiting my blog!

In this post, I am going to cover how to enable NFS v4.1 on a Synology device and then mount and NFS v4.1 datastore in VMware vSphere 6.5.  By default, Synology devices support NFS v4 natively, and although they can also support NFS v4.1, it is not enabled.  Well, not to worry because I am going to show you just how to enable the feature on your device.

NFS v4 and v4.1 have been around for quite a few years but it has not taken off then way NFS v3 did way back when.  There were some major flaws pointed out with NFSv4 so NFSv4.1 was created to rectify those flaws, and VMware was one of the first major companies to adopt and support the new Network File System.  But unless your storage device supported the newer NFS versions, you would be stuck mounting NFSv3 volumes by default.

In this demo, I will be using my new replacement Synology DiskStation DS415+ and my homelab “datacenter” running the latest version vSphere 6.5.  So let’s jump right in!

Using a terminal application like PuTTY, connect to your Synology device via SSH using an admin user account.  This can be the default “admin” account and any new user account with Administrator privileges.  Once connected enter the following command to change the directory:

cd /usr/syno/etc/rc.sysv

Once in this directory, run the following command (enter the account password if prompted):

sudo cat /proc/fs/nfsd/versions

This will show us the current NFS version currently enabled and supported by the Synology device. 

We can see that all versions prior to 4.1 have a “+” sign next to them and 4.1 has a “-” sign next to it.  Let’s change that!

In order to change this, we will need to edit a shell (S83nfsd.sh) file using “vi”.  Run the following command to open the file with VI Editor:

sudo vi S83nfsd.sh

This will open the shell file and will place the cursor at Line 1, Character 1 as depicted in the following screenshot.  

Navigate down to line 90 using the down arrow and you will see the following line of text.

This is where the magic happens!  To edit the file now, press the “I” key on your keyboard to initiate an “Insert” then add the following to the end of the text so the line looks like the following screenshot.

-V 4.1

To commit and save this change, first press the Esc key.  Next type the following command and hit “Enter” to write and then quit vi editor.

:wq

 

 

Next, we need to restart the NFS service.  To do so enter the following command:

sudo ./S83nfsd.sh restart

 

If we again run the following command, we will see that there is now a “+” sign next to 4.1.  Hooray!

sudo cat /proc/fs/nfsd/versions

 

Now that we have enabled NFSv4.1 functionality on your storage device, let’s go ahead and mount an NFS volume to our hosts in vSphere.

I have enabled NFS and NFS v4 support then created the following shares with assigned permissions on my device, and am going to mount the ISOs share first in this example by issuing a command via PowerCLI.  We can also see that I do not have any NFS mounts currently in my environment

I’ve launched PowerCLI and connected to my vCenter Server using the Connect-VIServer cmdlet then issued the following command:

Get-VMHost | New-Datastore -Nfs -FileSystemVersion '4.1' -Name SYN-NFS04-ISOs -Path "/volume3/NFS04-ISOs" -NfsHost DS415 -ReadOnly

*Note:* an important argument here in the “-FileSystemVersion”.  If I do not specify the version, it will assume version 3.0 by default.

If I go back and look at my datastores via the Web Client, I can see that my new NFS 4.1 datastore has been mounted to each one of my ESXi hosts. Nice!

*Bonus:* If I’d like to easily remove this datastore from all of my hosts, I can issue the following command via PowerCLI.

Get-VMHost | Remove-Datastore -Datastore SYN-NFS04-ISOs -Confirm:$false

Now I can see that the host has been removed successfully!

Well, that about wraps this one up.  I hope that this has been useful and informative for you and I’d like to thank you for reading!  Until next time!

-virtualex-