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.
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.
- First we need to load some re-req’s that vsm needs.
yum -y install wget
chmod +x install.sh
./install.sh `timedatectl status | grep "zone" | sed -e 's/^[ ]*Time zone: \(.*\) (.*)$/\1/g'`
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. It is important since we did this all as root. Now 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!
- –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.
- –oauth this is a good one to always do as it will help deal with help with the My VMware login.
- –compress is a good one to use if you are short on space!
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, and from any folder:
./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 two 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?
- 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.
- 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/
- 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 ===