There are two ways to enable logging within the VM Access proxy.
- Enable Debug Logging through a Command Workflow within vCommander
- Enable Logging through VI or Nano, within the appliance
Enable Debug Logging through a Command Workflow within vCommander
- Log into vCommander and create a new "Command Workflow Configuration" by going to the Configuration tab > Command Workflow.
- Click Add to create a new Command Workflow.
- Name the Workflow "Enable Access Proxy Logs"
- Click Add > Guest OS > Run Program.
- Insert the following text into the "Command Line" window.
sudo chmod 777 /var/lib/tomcat/common/classes/log4j2.xml
- Click Add > Wait for Event. Change the Wait Time to 5 seconds. Click next
- Click Add > Guest OS > Create a file
- Click Add Credentials to add your Proxy Server's credentials.
Defaults:
username: vcommander
password: gRHrB211
Select the newly added credentials. - Copy and paste the following text into the "Contents" page:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender"> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%d [%t] [%-5p] %c{1} - %m%n"/> </layout> </appender> <appender name="F1" class="org.apache.log4j.RollingFileAppender"> <param name="File" value="/var/lib/tomcat8/logs/remoteAccess.log"/> <param name="MaxBackupIndex" value="10"/> <param name="MaxFileSize" value="10MB"/> <layout class="org.apache.log4j.PatternLayout "> <param name="ConversionPattern" value="%d [%t] %p - %m%n"/> </layout> </appender> <logger name="SSLConfig"> <level value="DEBUG"/> </logger> <root> <level value="ALL"/> <appender-ref ref="CONSOLE"/> <appender-ref ref="F1"/> </root> </log4j:configuration>
- Check off "Overwrite"
- Click Add > Guest OS > Run Program.
Select the vCommander credentials from the drop down, and insert the following text into the command line window:sudo service tomcat8 restart
- Click next until the workflow is complete.
Run the Command Workflow
- Go to the Operational view within vCommander (Views > Operational)
- Select the Proxy VM, right click, run workflow.
- Select the "Enable VM Access Proxy Log" workflow and click run.
Enable Logging through VI or Nano, within the appliance
- Login to the VM Access Proxy appliance:
Username - vcommander
Password - gRHrB211
2. Issue the command sudo service tomcat8 stop, enter the password when prompted.
3. Issue the command:
sudo nano /var/lib/tomcat8/common/classes/log4j2.xml
4. Locate the line <level value="info"/> 5th line from the bottom
5. Change the line so it reads: <level value="ALL"/>
6. Press theCTRL-x, followed by "y" to save, then press enter to confirm the file name.
7. Issue the command:
sudo service tomcat8 start