How to download logs from the SDDC Manager VM or Cloud Foundation Builder VM in VMware Cloud Foundation 3.0
search cancel

How to download logs from the SDDC Manager VM or Cloud Foundation Builder VM in VMware Cloud Foundation 3.0

book

Article ID: 316895

calendar_today

Updated On:

Products

VMware Cloud Foundation

Issue/Introduction

This article provides instructions to all the transfer of log files from the SDDC Manager VM or the Cloud Foundation Builder VM to a remote system.

Symptoms:
When attempting to download logs from the SDDC Manager Controller VM or the Cloud Foundation Builder VM with a file transfer utility, you will see a Permission Denied error message when accessing any files or folders under /var/log/vmware/vcf or any sub-folders under this location. Additionally, if the --log-dir option is used with the /opt/vmware/sddc-support/sos command to redirect the logs to an alternate location, accessing the alternate location remotely will suffer the same issue.

Environment

VMware Cloud Foundation 3.0.x

Cause

The log files under the /var/log/vmware/vcf folder and sub-folders, as well as any logs generated by the /opt/vmware/sddc-support/sos command are only readable by the root user but the root user does not have remote access to the SDDC Manager VM or the Cloud Foundation Builder VM.

Resolution

Collecting diagnostic information for VMware Cloud Foundation

Workaround:
There are two methods that can be used to workaround this issue:

Change the permissions on the log files to be copied:

  1. Log in to the SDDC Manager VM as the vcf user or the Cloud Foundation Builder VM as the admin user.
  2. Switch to the root user by issuing the su - command.
  3. Issue a command similar to the following to change the permissions on the log files/folders to be copied:
chmod -R 755 /var/log/vmware/vcf/<file/folder name>
  1. Initiate the file transfer from the remote system.

Initiate the file transfer from the SDDC Manager VM or the Cloud Foundation Builder VM to the remote system:

  1. Log in to the SDDC Manager VM as the vcf user or the Cloud Foundation Builder VM as the admin user.
  2. Switch to the root user by issuing the su - command.
  3. Issue a command similar to the following to initiate the file transfer to the remote system:
scp -r /var/log/vmware/vcf/<file/folder name> <user>@<remote IP>:<path>

Notes:
  • This process assumes that an SCP/SFTP/SSH server is running on the remote system. Linux systems provide this functionality by default but a third-party utility may need to be installed on a Windows system.
  • Replace <user> with a username that has privileges to SCP to the remote system and write to the <path> noted.
  • Replace <remote IP> with the IP address of the system to which the logs will be transferred.
  • Replace <path> with the full path to the location on the remote system where the logs will be transferred.


Additional Information

To be alerted when this article is updated, click the Subscribe to Article link in the Actions box.