Wednesday, July 8, 2009

VMware ESXi Configuration File Encoding Error

   Today I had an error while trying to start up a VM on VMware ESXi 4.0 in the vSphere client after moving it from an ESXi 3.5 server with the VMware converter. This is how I fixed it. I put it here in the hopes it will help someone else.
First off, here is the error:

   File "/vmfs/volumes/xxxxx/ServerName/ServerName.vmx" line 63: File already has an encoding "UTF-8". Cannot open configuration file /vmfs/volumes/xxxxx/ServerName/ServerName.vmx.
Now apparently the reason for this error is the way in which this VM was created. My VM started his life in VMware Server on my computer while I was testing. I then moved it to an ESXi 3.5 server after I figured it was ready. Now I am moving it to an ESXi 4.0 server. Sometime along the way, the config file had gotten two different encodings set for it, which causes it to panic. Anyway, lets get to fixing this. Don't worry its not too hard.
   In a nutshell, all you have to do is download the offending file, delete the offending line and upload it back to where you found it. If you want a more detailed explanation, keep reading.

  • In the vSphere client, select the ESXi server (Not your VM!) and click the 'Configuration' tab on the right.
  • On the left, under 'Hardware', select 'Storage'. This should show your datastores to the right.

  • Right-click on the datastore on the right that contains your VM and select 'Browse Datastore...'. This will bring up the Datastore Browser.
  • Double-click on the ServerName (where ServerName is the name of your server) folder.
  • Right-click on ServerName.vmx and select 'Download...'. Save it to some temporary spot on your computer.

  • Open this file in your favorite text editor (I use SciTE. It's awesome, free and multi-platform) that supports Linux text files. (Linux and Windows use different newline characters)
  • Find the offending line and delete it. It should be something along the lines of: .encoding = "windows-1252"
  • Save the file.
  • Back at the Datastore Browser, click on the button that looks like a stack of coins with an up arrow and select 'Upload File...'.
  • Upload the file you made changes and enjoy a fully functional VM again.
   If this helped you out at all, please leave me a comment and let me know.


  1. You genius! Followed your steps exactly and got my VM up and running in less than 2 minutes having spent 2 hours previously trying to get this to work. Thank you, thank you, thank you!!

  2. Casino de juego - drmcd
    With over 80 live casinos 화성 출장안마 and one or more slot machines and 춘천 출장안마 more table games, it's time 당진 출장마사지 to go 순천 출장샵 all in with these top casino 오산 출장샵 sites and offer a