Loading

×Sorry to interrupt
CSS Error

Refresh

Cookie Preference Center

General Information on cookies

When you visit our website, we use cookies to ensure that we give you the best experience. This information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies by clicking on the different category headings to find out more and change your settings. However, blocking some types of cookies may impact your experience on the site and the services we are able to offer. Further information can be found in our

Cookie Policy.

Strictly Necessary

Strictly Necessary

Always Active

Strictly Necessary

Strictly necessary cookies are always enabled since they are essential for our website to function. They enable core functionality such as security, network management, and website accessibility. You can set your browser to block or alert you about these cookies, but this may affect how the website functions. For more information please visit www.aboutcookies.org or www.allaboutcookies.org.

Cookie Details‎

Performance

Performance

Performance

Performance cookies are used to analyze the user experience to improve our website by collecting and reporting information on how you use it. They allow us to know which pages are the most and least popular, see how visitors move around the site, optimize our website and make it easier to navigate.

Cookie Details‎

Please confirm your settings by refreshing the page.

Functional

Functional

Functional

Functional cookies help us keep track of your past browsing choices so we can improve usability and customize your experience. These cookies enable the website to remember your preferred settings, language preferences, location and other customizable elements such as font or text size. If you do not allow these cookies, then some or all of these services may not function properly.

Cookie Details‎

Advertising

Advertising

Advertising

Advertising cookies are used to send you relevant advertising and promotional information. They may be set through our site by third parties to build a profile of your interests and show you relevant advertisements on other sites. These cookies do not directly store personal information, but their function is based on uniquely identifying your browser and internet device.

Cookie Details‎

Advertising Cookies

Consent Leg.Interest

Select All Vendors

Select All Vendors

Select All Hosts

Select All

Clear Filters

Information storage and access

Apply

Confirm My Choices Reject All Allow All

My Subscriptions

Loading

Knowledge Base

Patch installation and log collection on ESXi 4.1 Update 1 fails when /tmp/scratch is missing (1037190)

Last Updated: 3/20/2024Categories: TroubleshootingTotal Views: 34215Language:
English

Subscribe to get an email
newsletter with new updates

Please provide article feedback:

Symptoms

Processes using temporary scratch disk space on ESXi 4.1 Update 1 hosts fail:

Scanning or remediating an ESXi 4.1 Update 1 host with VMware Update Manager fails.

Update Manager reports the error:

The host returns esxupdate error codes: 10. Check the Update Manager log files and esxupdate log files for more details

In the esxupdate.log file located at /var/log/vmware , you see an error similar to:

FileIOError: ('/var/tmp/cache/metadata-1539263447', "Cannot create dir /var/tmp/cache/metadata-1539263447: [Errno 17] File exists: '/var/tmp'")

Installing third-party drivers or packages on an ESXi 4.1 Update 1 host using the vihostupdate command-line utility fails.

The vihostupdate command-line utility reports the error:

Error encountered:
Description - I/O Error (17) on file /var/tmp: [Errno 17] File exists: '/var/tmp'
Message - Unable to create, write or read a file as expected.I/O Error (17) on file /var/tmp: [Errno 17]
File exists: '/var/tmp'

Generating a Diagnostic Data log bundle from an ESXi 4.1 Update 1 host using the vSphere Client fails.

The vSphere Client reports the error:

Log Bundle has not been generated

Generating a Diagnostic Data log bundle from an ESXi 4.1 Update 1 host using the vm-support command-line utility fails.

The vm-support command-line utility reports the error:

/sbin/vm-support: cd: line 2448: can't cd to /var/tmp
Could not set working directory to '/var/tmp'.

Performing a backup of an ESXi 4.1 Update 1 host using the vicfg-cfgbackup command-line utility fails.

The vicfg-cfgbackup command-line utility reports the error:

Saving firmware configuration to ...
GET https://hostname/downloads/configBundle-hostname.tgz unsuccessful : 404 Not Found

Performing a vMotion fails at 82%.

The Console tab fails with the error:

Unable to connect to the MKS: There is no VMware process running for the config file /vmfs/volumes/DatastoreName/DirectoryName/VirtualMachineName.vmx

Resetting the virtual machine fails at 95%.

The host reports the error:

Unable to apply DRS resource settings on the host. The operation is not allowed in the current state.. This can significantly reduce the effectiveness of DRS.

Attempting to manually inspect or utilize the /var/tmp directory fails:

Open a console to the ESXi host. For more information, see Using Tech Support Mode in ESXi 4.1 (1017910).

Attempt to change to the /var/tmp directory using the command:

cd /var/tmp

If this command fails with "-ash: cd: can't cd to /var/tmp", the system is potentially affected.

Purpose

This article describes a specific issue specific to ESXi 4.1 Update 1, in which the /sbin/tmpwatch.sh cleanup script may remove temporary directories relating to the scratch location. If you experience one of the above symptoms and manually inspecting the temporary scratch directory fails, consult the sections below. If any of the above work succeeds, then your issue is not related to this article. Search for your symptoms further or Open a Support Request.

Resolution

This issue occurs when the temporary directory /var/tmp is unavailable. It may have been deleted by the /sbin/tmpwatch.sh cleanup script due to an issue which affects ESXi 4.1 Update 1 hosts which have a non-persistent, ramdisk-backed scratch location.

Operations such as installing patches and collecting log bundles rely on temporarily writing data to a scratch location on the ESXi host. These temporary files are placed in the /var/tmp directory, which points to the /scratch directory, which may be backed by a a ramdisk or persistent storage location. If the /var/tmp and /scratch directories are not available, these operations will fail.

Possible scratch locations include:

A VMFS Datastore's .locker directory. For example: /vmfs/volumes/UUID/.locker/

A FAT16 volume on the boot or other local media. For example: /vmfs/volumes/UUID/

A Ramdisk. For example: /tmp/scratch/

ESXi 4.x periodically deletes temporary files contained in the /tmp directory that are older than 10 days. Under some circumstances, the /sbin/tmpwatch.sh cleanup script may remove the /tmp/scratch directory and its contents, leaving the /var/tmp and /scratch symlinks with no target. In this situation, operations attempting to place new temporary files in these directories will fail.

For more information on ESXi and the Scratch location, see the About the Scratch Partition section of the ESXi Installable and vCenter Server Setup Guide 4.1, the VMware ESXi Chronicles blog entry Ops changes part 5 - Scratch partition and Creating a persistent scratch location for ESXi (1033696).

Solution

This issue is resolved in the patch release for ESXi. For more information, see VMware ESXi 4.1, Patch Release ESXi410-201104001 (1035111).

Workaround

To workaround this issue, when you do not want to apply the patch, try one of these two options:

This issue does not affect hosts which have persistent scratch space configured. To workaround this issue, configure the ESXi 4.1 Update 1 hosts with persistent storage. To implement this workaround, see Creating a persistent scratch location for ESXi (1033696).

Recreate the missing scratch directory on the ramdisk. To prevent it from being deleted again, create a symbolic link within the scratch directory.

Note: The target of the symlink does not have to exist. The symlink itself will not be deleted by the /sbin/tmpwatch.sh cleanup script, nor the directory containing it.

To implement this workaround:

Open a console to the ESXi host. For more information, see Using Tech Support Mode in ESXi 4.1 (1017910).

Create the missing directories using the command:

/sbin/configLocker

Create a symbolic link within the scratch directory to prevent it from being deleted by the /sbin/tmpwatch.sh script:

ln -fs /scratch/kb1037190 /scratch/.keep

Open the file /etc/rc.local in a text editor. For more information, see Editing configuration files in VMware ESX (1017022).

Add the same command from Step 3 to the end of the file on its own line:

ln -fs /scratch/kb1037190 /scratch/.keep

Save the file.

Back up the configuration change to the bootbank so it persists across reboots using the command:

auto-backup.sh

Note: In ESXi Embedded, this issue may also may occur when the temporary directory /var/tmp is pointing to a location which is unexpected by the process that you are attempting to run, such as collecting logs and installing patches. The correct location should be /tmp/scratch/var/tmp . To create this directory, run this command from the ESXi host:

# mkdir -p /tmp/scratch/var/tmp

Related Information

To be alerted when this document is updated, click the Subscribe to Article link in the Actions box
Error when running vm-support if insufficient disk space

Detectable by VMware SkylineTM

Actions

Copy

link to clipboard
copied!

Print

Language:
English

Attachments

Additional Resources

KB
•
End Of General Availability of the Free vSphere Hypervisor (ESXi 7.x and 8.x) (2107518)

KB
•
手动安装和卸载 Lab Manager 的 Internet Explorer MKS 插件 (1021554)

KB
•
Update Manager が不明なエラーでホストのスキャンに失敗する (1017377)

KB
•
Download and Install VMware Fusion (2014097)

Results 1-4 of 4

Ask The Community

Get answers quickly from VMware experts in the community

Post Subject

CONTINUE IN COMMUNITIES

Related Products:

VMware vSphere ESXi

Related Versions:

VMware ESXi 4.1.x Installable

VMware ESXi 4.1.x Embedded

Take Our Survey

Support Assistant