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

Editing configuration files in VMware ESXi and ESX (1017022)

Last Updated: 3/20/2024Categories: Best PracticesTotal Views: 35196Language:
Chinese (Simplified)Portuguese (European)JapaneseSpanishEnglish

10 like this article

Subscribe to get an email
newsletter with new updates

10 people found this helpful Please provide article feedback:

Learn how VMware Skyline Advisor and Skyline Health Diagnostics work together to provide proactive intelligence and self-service log analysis.

Use Skyline Advisor to avoid issues before they occur across VCF, vSphere, vSAN, NSX, vROps & Horizon. Skyline Findings are based on top KBs, VMSAs/CVEs and design best practices.

Use Skyline Health Diagnostics to root cause vSphere & vSAN logs when an issue occurs. Skyline Health Diagnostic Findings are based on top KBs and VMSA/CVEs. You can use the Skyline Health Diagnostics tool in online or offline mode.

If you require additional help from technical support, please use Skyline Advisor to initiate a Log Assist to reduce time to upload logs. TSEs can also initiate logs to reduce effort.

Purpose

This article provides steps to edit files in VMware ESX and VMware ESXi only when required while troubleshooting or when you want to create a backup of file.

Resolution

Datastore Browser

This section is applicable to all versions of VMware ESX and ESXi.

To download, edit and upload files to a datastore using the Datastore Browser:

Open the vSphere Client and connect to the vCenter, ESX or ESXi machine using appropriate administrator-level credentials.

Select an ESXi or ESX host that can access the datastore containing the files you want to edit.

Click the Configuration tab > Storage.

Right-click on the datastore and click Browse Datastore.

In the left pane, navigate to the directory that contains the files.

In the right pane, right-click on the file and click Download.

Download the file and make note of its location.

Open a preferred text editor. For more information about preferred editors, see Preferred Editors in this article.

Open the downloaded file, edit it, and save the file.

Return to the vSphere Client.

Right-click on the original file and click Rename.

Add a .bak extension to the file name. This step is optional but ensures that any changes can be reverted easily.

Identify the folder in the left pane where you want to upload the modified file.

Click the upload icon in the toolbox. The icon is a cylinder with a green arrow pointing up.

Click Upload File.

Navigate to and click the file you just modified.

Click Open.

A warning appears concerning file naming and the potential to overwrite files. Read the warning and click Yes.

vSphere Management Assistant and vSphere Command-Line Interface

This section is applicable to VMware ESX 3.5 Update 2 and later.

To download, edit and upload files to a datastore using the vifs utility:

Open a console to your vSphere Management Assistant (vMA) appliance or a vSphere Command-Line Interface (CLI).

Download the file and edit by executing:

vifs.pl <connection parameters> --get '[<datastore>] <path>/<filename>' <localpath>/<filename>

Where:

<connection parameters> specify the host that has access to the datastore or vCenter and the username and password of an Administrator account.

<datastore> is the name of the datastore that contains the file.

<path> is the path within the datastore that contains the file.

<filename> is the name of the file.

<localpath> is the path where you can download the file to. Make note of this location.

For more information and examples about the vifs utility, see Performing File System Operations with vifs in the vSphere CLI documentation.

Modify the file as required using the vMA or transfer it to another system for modification. If you are using the vCLI, proceed to the following step.

Open a preferred text editor. For more information about preferred editors, see Preferred Editors in this article.

Open the downloaded file, modify it as required, and save the file.

Return to the vMA appliance console or vSphere CLI.

Make a backup copy of the original by executing:

vifs.pl <connection parameters> --move '[<datastore>] <path>/<filename>' '[<datastore>] <path>/<filename>.bak'

Where:

<connection parameters> specify the host that has access to the datastore or vCenter and the username and password of an Administrator account.

<datastore> is the name of the datastore that contains the file. For our purposes, both <datastore> values should be the same.

<path> is the path within the datastore that contains the file. For our purposes, both <path> values should be the same.

<filename> is the name of the file. For our purposes, the second <filename> value should include a .bak extension to indicate a backup copy.

Caution: Omitting the additional .bak extension to the destination file name will result in overwriting your original file.

For more information and examples about the vifs utility, see Performing File System Operations with vifs section of the vSphere CLI documentation.

Upload the modified file to the original location by executing:

vifs.pl <connection parameters> --put <localpath>/<filename> '[<datastore>] <path>/<filename>'

Where:

<connection parameters> specify the host that has access to the datastore or vCenter and the username and password of an Administrator account.

<datastore> is the name of the datastore that contains the file.

<path> is the path within the datastore that contains the file.

<filename> is the name of the file.

<localpath> is the path where you will download the file to. Make note of this location.

For more information and examples about the vifs utility, see Performing File System Operations with vifs section of the vSphere CLI documentation.

VMware ESXi or ESX Terminal

This section applies to VMware ESXi and ESX 4.1 and earlier.

To edit files using the VMware ESX Service Console or VMware ESXi Technical Support Mode:

Log in to the VMware ESX host as the root user.

For more information on VMware ESX Service Console, see Unable to connect to an ESX host using Secure Shell (SSH) (1003807).

For more information on VMware ESXi Technical Support Mode, see Tech Support Mode for Emergency Support (1003677).

Make a backup copy of the file by executing:

cp <path>/<filename> <path>/<filename>.bak

Where:

<path> is the full path of the file.

<filename> is the name of the file.

Note: The second parameter in the cp command should have a filename with the .bak extension to indicate that it is a backup copy.

Edit the file by executing:

<editor> <path>/<filename>

Where:

<editor> is your preferred editor. For more information about preferred editors, see Preferred Editors in this article.

<path> is the full path to the file.

<filename> is the name of the file.

If prompted to overwrite, ensure that you have made a backup copy and type y. Press Enter to commit your changes.

Preferred Editors

There are different editors to choose from, depending on your running platform. This is non-exhaustive list of editors available in different platforms:

VMware ESX includes the open source terminal-based editors nano and vi.

VMware ESXi includes the open source terminal-based editor vi.

Windows-based machines include basic text editors such as Notepad and Wordpad. If you are using either of these text editors, you must ensure that you are saving files in their original format and encoding.

Notes:

The editors available in the shell (vi or nano) are meant for troubleshooting purposes only and must be used only when directed by VMware. The vSphere Client, vCLI, and PowerCLI should be the primary method of propagating changes to your ESX/ESXi host.

Notepad saves documents as ANSI text which may not be the same file format as the files downloaded from a VMware ESX or ESXi host. For more information, see Using different language formats in Notepad from Microsoft's Windows XP Professional Product Documentation.

Additional Information:

For translated versions of this article, see:

Portuguese: Editando arquivos de configuração no ESXi e no ESX da VMware (2032319)

Related Information

Recreating a missing virtual machine disk descriptor file
Tech Support Mode for Emergency Support
Unable to connect to an ESX host using Secure Shell (SSH)
El host ESX 4.x falla su proceso de inicio con el error: fsck.ext3: Unable to resolve UUID
Editando arquivos de configuração no ESXi e no ESX da VMware
VMware ESXi / ESX の設定ファイルの編集
Edición de archivos de configuración en VMware ESXi y ESX
vMotion が 14% の時点で失敗し、次のエラーが表示される: 移行開始要求の待機中にタイム アウトになりました
在 VMware ESXi 和 ESX 中编辑配置文件
ネットワークの瞬断が発生すると、仮想マシンから NFS 上の ISO イメージへの接続が切れる
Active Directory ドメインのアカウントを使用して ESXi ホストにログインすることができない

Detectable by VMware SkylineTM

Actions

Copy

link to clipboard
copied!

Print

Language:
Chinese (Simplified)Portuguese (European)JapaneseSpanishEnglish

Attachments

Additional Resources

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

Result 1 of 1

Ask The Community

Get answers quickly from VMware experts in the community

Post Subject

CONTINUE IN COMMUNITIES

Related Products:

VMware vSphere ESXi

VMware ESX Server

Related Versions:

VMware vSphere ESXi 5.5

VMware vSphere ESXi 5.0

VMware ESXi 4.1.x Installable

VMware ESXi 4.1.x Embedded

VMware ESXi 4.0.x Installable

VMware ESXi 4.0.x Embedded

VMware ESXi 3.5.x Installable

VMware ESXi 3.5.x Embedded

VMware ESX Server 3.5.x

VMware ESX 4.1.x

VMware ESX 4.0.x

view all

Take Our Survey

Support Assistant