I was testing out the new VSA in my lab and ran into a situation where I needed to remove the VSA so that I could run through the installation process again. After a little bit of searching I found this VMware KB explaining the process.
Ensure you Storage vMotion any virtual machines off of the VSA datastores prior to removing the VSA cluster
Here is the basic procedure:
- Log onto the server where the VSA is installed
- Open up a command prompt and move to the following directory(this may vary depending on the directory location you chose during VSA setup):
- c:\program files\vmware\infrastructure\tomcat/wepapps\vsamanager\web-inf\test\tool
- Example: cleanup.bat administrator vmware
The first time I ran this I received an error which basically said that it couldn’t find the specified file. The file it is referring to is java.exe, which is used as part of the VSA cluster removal operation. The cleanup.bat file is using a Windows environment variable to locate the installation path for Java, which is represented as %JAVA_HOME%. This particular environment variable does not exist on my machine and therefore removal operation failed.
I modified the cleanup.bat file to point to a location where Java.exe existed (line 10)
- Old: “%JAVA_HOME%\bin\java”
- New: “C:\Program Files\VMware\Infrastructure\jre\bin\java”
Once I made this modification I re-ran cleanup.bat <username> <password> and was successful at deleting the VSA cluster