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, Edward Haletky, 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 (and product codes).
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)
- Add your user to the Wheel group with usermode -a -G Wheel user_name. Necessary as it installs stuff.
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:
[[email protected]]# mkdir /mnt/win
- Next, edit the /etc/fstab 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 (filename file, with two lines username= and password=) that is my account, password and domain.
- 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.
Now we work on the fun stuff - like configuring LinuxVSM 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 LinuxVSM install, in /usr/local/bin. Do this work as your user. So the script ends up in /home/YourUser.
- First we need to load some re-req’s that vsm needs.
yum -y install wget
wget -O install.sh https://raw.githubusercontent.com/Texiwill/aac-lib/master/vsm/install.sh
chmod +x install.sh
wget -O install.sh https://raw.githubusercontent.com/Texiwill/aac-lib/master/vsm/tools
./install.sh `timedatectl status | grep "zone" | sed -e 's/^[ ]*Time zone: \(.*\) (.*)$/\1/g' | head-1 ` 2>&1 | tee t.out
The line above will help with dealing with the timezone. Copy and paste the whole thing to your command line.
Now you need to make sure the chown above is done - it is most likely already done. INow you need to change to your working account.
You should now have everything ready to proceed.
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.
Note: most of the dashes you see below when working with vsm.sh are double dashes. A recent upgrade of WordPress makes that less than obvious. You can always use the help to confirm.
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.
- I would suggest, the second time you run ./vsm.sh or vsm.sh that you have a few things on the command line:
- -fixsymlink (only once as it will convert the old style repo to a symlink system so you only have one of each thing stored).
- -symlink so that you are doing symlinked storage in the repo. Which means remove duplication! You use this option and it will be remembered. You may need to ignore errors related to this with some version of SMB.
- -check - I particularly love this option. It will do an SHA256 (or MD5), but it will pick the highest to do) compare to make sure what was downloaded is correct. When your batch of downloads is finished you will see in light purple the results if all good, and in red if there is an issue. You can also see on the command line for each download Check at the beginning and Check passed if it passed at the end. You use this once and it will be remembered.
- -oauth this is a good one to always do as it will help deal with help with the My VMware login. It is built in now so you do not have to specify it.
- -compress is a good one to use if you are short on space!
- -f (yes single dash) will force downloads of things you have already downloaded.
- - quiet will do less onscreen info.
- -progress will show you progress info.
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.
- 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, change to the folder that has install.sh file in it, which is the aac-base folder.
- 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 three updates).
- 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? I do this sort of things - basically all things vsm.sh as my user and not as root.
- If you have fat-fingered the password of your My VMware account and get Credential Error Getting messages in red, you can rm /tmp/vsm/.credstore (or rm -rf /tmp/vsm) and that will mean next run you will be prompted to enter your My VMware info again. It is worth knowing that this file is user specific.
- 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.
- There is a newish command of vsm.sh -clean that will clear all temporary storage and credential stores and forces a reset on the next run. That might be good to do on occasion.
- My command line normally looks like: ./vsm.sh -progresss -quiet. I used to use symlink but that just causes errors on my SMB storage and doesn’t do anything.
- Someone recently shared their command line with me: vsm -oem -dts -progress -q -mr -y -historical -compress -symlink -fixsymlink, and that means the next time the command line looks like vsm -mr -y -fixsymlink.
- Tips and Tricks for Windows Shares - https://wiki.centos.org/TipsAndTricks/WindowsShares
- Replacement for vMA - https://www.astroarch.com/2017/10/vsphere-upgrade-saga-vsphere-management-assistant-replacement/
- vsm - https://github.com/Texiwill/aac-lib/tree/master/vsm
- Making VSM work with NFS - https://ithinkvirtual.com/2018/03/07/vmware-software-manager-the-good-the-bad-the-alternative/
- 8/20/19 - updates for changes and a careful test of things. All good.
- 4/9/19 - update spelling, grammar, and commands. Also updated screenshots as necessary.
- 3/31/19 - some small changes and corrections.
- 3/16/19 - used this article with 5.3.0 of VSAM with no issues.
- 12/16/18 - updated for spelling. Also a reminder if you need to change network on Centos make sure to use Network Manager tool - nmtui. Otherwise changes you do - for example to resolv.conf will not persist through a power change. There was also a VSM update as part of this to 5.1.4.
- 11/9/18 - added the info on -clean.
- 10/16/18 - confirmed the upgrade above works good for 5.0.3 and it does. Add some reminders that most of the dashes - maybe all that VSM needs are double and WordPress doesn’t show that any longer.
- 9/28/18 - The script works on macOS and Debian which is pretty cool.
- 9/25/18 - confirmed update info works with 5.0, but also added some info on 5.0 features like check, symlink, and fixsymlink.
- 9/22/18 - confirmed update info above works with 4.9.
- 9/19/19 - updated for the new install script.
- 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.
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!
=== END ===
One thought on “Installing the Linux VMware Software Manager tool - LinuxVSM”