Salt Project is a Python based open-source software for event driven IT automation, remote task execution and configuration management.
For more information on Salt, see Salt User Guide.
Salt requires a salt-minion to be deployed in the guest. Salt specific guest variables are set on the host side per VM basis and subsequently read by VMware Tools inside guest. VMware Tools then downloads the salt bundle and spins up a salt-minion instance inside the guest.
Procedure
- Host Side Configuration per VM (using guestVars)
Host admin manages all the guest variable settings on the host side for a particular VM using VIM API or vSphere/VC UI.
-
- Windows:
VMware Tools Salt Minion feature is installed by default and can be modified in custom installation.
For VMware Tools to create a salt-minion instance on a particular VM and connect the salt-minion with the salt-master, host admin must configure and set the guest variable for that VM.
In vSphere host UI, select a particular VM, right click and edit settings. In the VM Options tab, select and set
- guestinfo./vmware.components.salt_minion.desiredstate to present
- guestinfo./vmware.components.salt_minion.args to <custom arguments to VMware Tools salt-minion setup script>
For example:
guestinfo./vmware.components.salt_minion.desiredstate → present
guestinfo./vmware.components.salt_minion.args → master=1.2.3.4
- Linux:
Host admin must install open-vm-tools and open-vm-tools-salt-minion and then set the guest variable for a particular VM as:
- guestinfo./vmware.components.salt_minion.desiredstate to present
- guestinfo./vmware.components.salt_minion.args to <custom arguments to VMware Tools salt-minion setup script>
For example:
guestinfo./vmware.components.salt_minion.desiredstate → present
guestinfo./vmware.components.salt_minion.args → master=1.2.3.4 id=12345
- Removing salt-minion
In Windows or Linux, if the host admin sets the guest variable guestinfo./vmware.components.salt_minion.desiredstate to absent, then VMware Tools removes the salt-minion instance in the guest VM.
For example:
guestinfo./vmware.components.salt_minion.desiredstate → absent
- Checking the latest status of salt-minion inside the guest
To check the latest status of the salt-minion inside the guest in the vSphere UI, use the guest variable:
guestinfo.vmware.components.salt_minion.laststatus
- Guest Side Configuration (using tools.conf)
Guest admin configures the guest side settings in the
tools.conf configuration file located at:
Windows - C:\ProgramData\VMware\VMware Tools\tools.conf
Linux - /etc/vmware-tools/tools.conf
- Fetching Log Information
Guest admin can fetch log information related to salt-minion from the following path:
Windows
Log File |
Location |
Log file for checking salt-minion status |
C:\Windows\Temp\vmware-svtminion-status-{Timestamp}.log |
Log file for installing a salt-minion instance inside the guest |
C:\Windows\Temp\vmware-svtminion-install-{TimeStamp}.log |
Log file for removing a salt-minion instance inside the guest: |
C:\Windows\Temp\vmware-svtminion-remove-{TimeStamp}.log |
Log file for checking runtime information after installing or removing a salt-minion instance inside the guest |
C:\salt\var\log\minion log files |
Linux
Log File |
Location |
Log file for checking salt-minion status |
/var/log/vmware-svtminion.sh-status-{Timestamp}.log |
Log file for installing a salt-minion instance inside the guest |
/var/log/vmware-svtminion.sh-install-{TimeStamp}.log |
Log file for removing a salt-minion instance inside the guest: |
/var/log/vmware-svtminion.sh-remove-{TimeStamp}.log |
Log file for checking runtime information after installing or removing a salt-minion instance inside the guest |
/var/log/salt/minion |