Login  |  
 
July 29, 2010  
Blog  
Jul 8

Written by: John Wesorick
7/8/2009 12:15 PM 

   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:

 

vmware 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.

 

Tags:

36 comment(s) so far...

Re: VMware ESXi Configuration File Encoding Error

Thanks! saved my day!!

By Fredrik Linnander on   7/26/2009 6:48 AM

Re: VMware ESXi Configuration File Encoding Error

This was a great post. Clear, concise and to the point. Solved my problem in 5 minutes flat.

Thanks!

By DMAN on   8/1/2009 1:55 PM

Re: VMware ESXi Configuration File Encoding Error

Excellent post :) Solved it in 5 minutes

By Mervin on   8/9/2009 5:19 AM

Re: VMware ESXi Configuration File Encoding Error

Thxs so much. Saved so much time!

By Julien on   8/10/2009 11:34 AM

Re: VMware ESXi Configuration File Encoding Error

Glad I could help guys. :-)

By John Wesorick on   8/10/2009 11:44 AM

Re: VMware ESXi Configuration File Encoding Error

Excellent post. It solved my problem in 2 minutes. I've been dealing with this error for the past 4 days ever since I installed ESXi 4.0. Funny there is no mention of this on the VMWare web site.

By AM on   8/10/2009 2:07 PM

Re: VMware ESXi Configuration File Encoding Error

Thanks a lot. Excellent post

By verygood on   8/12/2009 1:20 AM

Re: VMware ESXi Configuration File Encoding Error

Life saver! Thanks!!!

By Gordon Grant on   8/14/2009 9:37 AM

Re: VMware ESXi Configuration File Encoding Error

Thanks dude quick fix, and easy fix, though I opted to do it through SSH, and with VI.

By dOEPain on   8/28/2009 4:14 PM

Re: VMware ESXi Configuration File Encoding Error

Excellent. My day is made.

By Dannavan Morrison on   9/6/2009 8:18 AM

Re: VMware ESXi Configuration File Encoding Error

Yeah, using SSH/VI would be faster/easier, but would require you to set that up, which is another blog post in and of itself. :-) Thanks for all your kind words folks!

By John Wesorick on   9/10/2009 10:19 AM

Re: VMware ESXi Configuration File Encoding Error

Excellent job. Saved me countless wasted hours!

By Lucky Person on   9/14/2009 12:29 PM

Re: VMware ESXi Configuration File Encoding Error

Thanks a lot!!

By Blaubohne on   9/23/2009 3:01 AM

Re: VMware ESXi Configuration File Encoding Error

Thanks for posting this.

By Dag Høidahl on   9/24/2009 2:17 AM

Re: VMware ESXi Configuration File Encoding Error

Great post, worked like a charm. Thanks.!

By Aaron on   10/7/2009 1:12 PM

Re: VMware ESXi Configuration File Encoding Error

Great Collaboration! Thanks for the post!!

By Guilherme Kanagusku on   10/27/2009 1:46 PM

Re: VMware ESXi Configuration File Encoding Error

This is great! thanks for the post!
Also this way I already learned how to transfer files from and to the datastore.
Thanks again!

By Jeroen Elias on   10/30/2009 3:26 AM

Re: VMware ESXi Configuration File Encoding Error

Great posting. ... you saved my Sunday, thanks a lot :-)
Hugo

By Hugo on   11/15/2009 2:20 AM

Re: VMware ESXi Configuration File Encoding Error

thanks, you're a star!

By JJ on   11/25/2009 6:53 AM

Re: VMware ESXi Configuration File Encoding Error

Kind regards from Germany,

this also saved my day. Thx a lot for this posting!!!!! Great!

By Scholle on   11/30/2009 12:48 PM

Re: VMware ESXi Configuration File Encoding Error

Great info! This error was making me mad !

By GG on   12/29/2009 10:44 PM

Re: VMware ESXi Configuration File Encoding Error

You saved me a lot of time. Thank you for this excellent post.

By CS on   1/5/2010 2:26 PM

Re: VMware ESXi Configuration File Encoding Error

I don't know how I could improve on all the quotes above, except to add my sincere thanks for this...

You have no idea (...or maybe you do...) about the acid that builds up in my stomach when I have a VMware/ESXi issue and I think about even trying to go to the VMware KB or community boards to try and figure it out...It's a nightmare.

BTW, I used TextPad to do the editing, in case anyone is keeping score...NotePad didn't account for the crlf's in the config file and I didn't want to take the chance of not getting the editing right.

By Steven on   1/8/2010 2:22 PM

Re: VMware ESXi Configuration File Encoding Error

This was brilliant. Saved my day as well. Very much appreciated.

By Mark on   1/16/2010 3:26 AM

Re: VMware ESXi Configuration File Encoding Error

Thanks a lot, It solved my problem.
thanks alot again

By Ahmed Latif on   1/19/2010 4:34 AM

Re: VMware ESXi Configuration File Encoding Error

This is a great post as so many professinal have got benefit of it. I dont think that I would be able to resolve this problem without your help. Mnay Thanks.

Regards
Naveed

By Naveed Sarwar on   1/26/2010 4:32 AM

Re: VMware ESXi Configuration File Encoding Error

One quick Google search brought me here. 5 mins later my VM was back up and running. Many Thanks!!!

By Shaun Owens on   1/27/2010 5:27 PM

Re: VMware ESXi Configuration File Encoding Error

Excellent post, it saved my day. Thanks a lot!!!!

By Ashish on   2/5/2010 5:34 AM

Re: VMware ESXi Configuration File Encoding Error

Exelente,
funciona impecable! te pasaste.

Salu2

By Herb on   2/9/2010 1:42 PM

Re: VMware ESXi Configuration File Encoding Error

Xcellent.

I had an idea but your post confirmed my doubt about the vmx file.

Used Wordpad, solved the issue in 5 min.

thanks for the post

By Imran on   2/25/2010 4:42 AM

Re: VMware ESXi Configuration File Encoding Error


fixed as advertised. GREAT WORK!

By Donnie on   3/1/2010 6:12 PM

Re: VMware ESXi Configuration File Encoding Error


fixed as advertised. GREAT WORK!

By Donnie on   3/1/2010 6:12 PM

Re: VMware ESXi Configuration File Encoding Error

Arbeiten gross! Und vielen vielen dank.
Dieser artikel war gross!

By Kirk Mensch on   4/15/2010 11:17 AM

Re: VMware ESXi Configuration File Encoding Error

Great thx a lot, just save us a lot of time

By anon on   5/18/2010 12:56 PM

Re: VMware ESXi Configuration File Encoding Error

Great Post! saved my weekend :)

By Mike on   6/4/2010 2:00 AM

Re: VMware ESXi Configuration File Encoding Error

You saved me a ton of work!!!! Thank you SOOOOO much!
Without this, I would not have made my migration window.

By Nathan Williams on   7/18/2010 9:05 PM

Your name:
Your email:
(Optional) Email used only to show Gravatar.
Your website:
Title:
Comment:
Add Comment   Cancel 
Blog  
Blog  
News  
Asbestos (New Program 6/6/08)
    I wrote a new program called Asbestos today. You can download it on my 'Programs' page. It is a simple program used to prevent screen burn-in on monitors that only display static images (i.e. a kiosk). We needed it at work for a large LCD monitor that is going to be used to display a few graphs all the time. I was worried about it getting burn in very quickly only displaying one image, so I wrote the program. Now I'm giving it to you. Let me know if you like it.
Thanks,
John read more ...