1 2 Previous Next 19 Replies Latest reply on Apr 9, 2012 6:01 AM by littleantz77

    How to edit .vmx

    littleantz77 Novice

      Hi,

       

      I did try searching about this topic and most of the answer does not applies to me or I am missing something.

       

      http://communities.vmware.com/thread/107485

       

      http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1714

       

      http://communities.vmware.com/message/2001553

       

      are the topics about editing vmx and I can't see how they edit their vmx

       

      I am using vSphere client on Vsphere ESXi

       

      I am not familiar with commands in ssh so I decided to download the .vmx file and reupload it.

       

      The problem is that everytime I edit the .vmx file, when I upload it, it is not recognized as .vmx file anymore. I cannot add it back to inventory.

       

      I am using Notepad++ to edit the file.

       

      Is there spedial editor for this file?

       

      I also saw in some topics that it should be editable from right click > edit but I do not have Edit contect menu when I right click the file.

       

      I attached my right click context menu.

       

      Thanks

        • 1. Re: How to edit .vmx
          vmroyale Guru

          Hello.

           

          What are you trying to edit exactly in the .VMX? You can right-click on the powered-off virtual machine in the Hosts and Clusters view and access the "Edit Settings" options there to access the virtual machine properties editor. Use the Options tab and the General field and then click the Configuration Parameters button. Many of the .VMX settings are accessible here for editing.

           

          Good Luck!

          • 2. Re: How to edit .vmx
            a.p. Guru
            vExpertUser ModeratorsCommunity Warriors

            I agree with vmroyale  on how this should be done. So this is just to explain why the uploaded .vmx file shows up as "file".

            ESXi is very picky about the correct file format. For the .vmx file it uses "0A" (LF) instead of "0D 0A" (CR/LF) for line breaks. I assume your editor just uses the wrong format and you may need to either configure it differently or use another editor.

             

            André

            • 3. Re: How to edit .vmx
              littleantz77 Novice

              Thanks for your reply.

               

              I am trying to add audio capability on my VM

               

              I am adding the strings according to this article

              http://virtualization.blognotions.com/2011/07/27/virtual-hd-audio-hardware-in-vsphere-5/

               

              I am adding this at the end of the .vmx file

               

              sound.present = “true”
              sound.allowGuestConnectionControl = “false”
              sound.virtualDev = “hdaudio”
              sound.fileName = “-1"
              sound.autodetect = “true”
              sound.pciSlotNumber = “34"

               

               

              Do you have official process of how to do this?

               

              Why is audio not part of the VMs?

               

              Here is my related topic why I need to do this.

              http://communities.vmware.com/message/2014603#2014603

               

               

              Thanks

              • 4. Re: How to edit .vmx
                aravinds3107 Master

                Assuming you are running vSphere 5.0 with VM hardware version 7 or 8 to enable Audio feautre on the VM

                 

                1) Shutdown the VM

                2) Right Click on VM and Select Remove from Inventory

                3) SSH to the ESXi host using Putty

                4) Change your working directory to VM folder

                cd /vmfs/volumes/datastorename/vmfolder

                5) VI vmname.vmx

                6) Press i (for insert option)

                7) Add the lines which you need

                8) Press Escape to Exit and ZZ to write the change

                9) Connect using vSphere Client and browe the VM folder in datastore

                10) Add VM back to inventory and Power ON

                • 5. Re: How to edit .vmx
                  littleantz77 Novice

                  I get this error on step 5

                   

                  /vmfs/volumes/4f71e6aa-10110a36-c2c2-001b21afa74e/TEST1 # VI TEST1.vmx
                  -sh: VI: not found

                  • 6. Re: How to edit .vmx
                    Troy Clavell Guru
                    vExpert

                    here's what we've found to be an effective way of editing the vmx file.  Using WinSCP, connect into the host in question, then browse to the VM's directory. Double clicking on the vmx file will open a text editor.  From there make your edits and save the file.  It will be saved in the proper format and youe vmx file will then be edited.

                     

                    my .02 worth.....

                    • 7. Re: How to edit .vmx
                      littleantz77 Novice

                      Troy Clavell wrote:

                       

                      here's what we've found to be an effective way of editing the vmx file.  Using WinSCP, connect into the host in question, then browse to the VM's directory. Double clicking on the vmx file will open a text editor.  From there make your edits and save the file.  It will be saved in the proper format and youe vmx file will then be edited.

                       

                      my .02 worth.....

                      it becomes non vmx file again after editing using winSCP

                      • 8. Re: How to edit .vmx
                        Troy Clavell Guru
                        vExpert

                        please attach .vmx file in question... We can edit it for you, if you'd like.

                        • 9. Re: How to edit .vmx
                          a.p. Guru
                          vExpertUser ModeratorsCommunity Warriors

                          Did you see my previous post about the line breaks?

                          -sh: VI: not found

                          Linux/Unix commands are case sensitive. Use vi insted of VI.

                           

                          André

                          • 10. Re: How to edit .vmx
                            peetz Master
                            vExpertUser Moderators

                            So, why don't you just add these parameters through the vSphere client GUI -> VM Properties -> Options -> General -> Configuration Parameters ?

                            hdaudio.vmx.jpg

                            • 11. Re: How to edit .vmx
                              littleantz77 Novice

                              Troy Clavell wrote:

                               

                              please attach .vmx file in question... We can edit it for you, if you'd like.

                               

                               

                              Here is my vmx file. Thanks a lot.

                               

                              Note: this is already not recognized as vm after I made my edits. I hope it can be repaired.

                               

                              Thanks

                              • 12. Re: How to edit .vmx
                                littleantz77 Novice

                                Andreas Peetz wrote:

                                 

                                So, why don't you just add these parameters through the vSphere client GUI -> VM Properties -> Options -> General -> Configuration Parameters ?

                                hdaudio.vmx.jpg

                                 

                                 

                                I can't get to that gui because first step is to remove the VM from inventory.

                                 

                                That gui can be access by right click on VM. Unless there is other way to access that gui, I will be glad to use it.

                                 

                                Thanks

                                • 13. Re: How to edit .vmx
                                  a.p. Guru
                                  Community WarriorsvExpertUser Moderators

                                  With all the typos fixed, this may work You shouldn't try to copy&paste from a web site.

                                  sound.present = "“TRE" --> = "TRUE"
                                  sound.allowGuestConnectionControl = "“FALS" -> = "FALSE"
                                  sound.virtualDev = "“hdaudi"” -> = "hdaudio"
                                  sound.fileName = "“-" -> = "-1"
                                  sound.autodetect = "“TRE" -> = "TRUE"
                                  sound.pciSlotNumber =ZZ “34" -> = "34"

                                   

                                  André

                                  • 14. Re: How to edit .vmx
                                    Troy Clavell Guru
                                    vExpert

                                    also, just in case.  The new .vmx is attached

                                    1 2 Previous Next