1 2 Previous Next 15 Replies Latest reply on Oct 10, 2011 12:42 PM by Amit_go

    Vmrun cannot find the VM

    Banzinho Novice



      I've tried everything. I'm trying to start a virtual machine from command line with no success. (windows server 2003 sp2 with Vmware Server 2)



      The command I'm running is:



      >vmrun.exe -T server -h -u myuser -p mypass start "F:\VirtualMachines\vm1\Windows XP Professional.vmx" 



      I get an error:  Cannot open F:\VirtualMachines\vm1\Windows XP Professional.vmxThe virtual machine cannot be found.



      I've also tried using the datastore



      >vmrun.exe -T server -h -u myuser -p

      mypass start "[Virtual] vm1/Windows XP Professional.vmx"



      With the same error.



      I'm sure about the vmx route and location, the VM starts perfectly from the web UI.



      The only thing i can notice is that everytime I run the comand I can see a new line in the Tasks log on the web ui that says:



      "Find virtual machine by datastore" with success.



      So I guess the virtual machine was found but the vmrun command has always the same error.



      I've included the vmware server route to the windows PATH, tried to run with many users, roles, permissions, tried all but nothing working..



      I would appreciate any sugestions please,






      Thank you very much for your time












        • 1. Re: Vmrun cannot find the VM
          Jim B Novice





          I'm getting exact same behavior as yourself.  If you happened to figure out the issue, please post the solution.



          I'm Running Server 2.0, Build 116503.  I have also tried both the windows drive letter path and using the ... storage path method.  Once I figured out a number of other command line issues, I also get the following command line message,  "Error: Cannot open VM: ...vmx, The virtual machine cannot be found".  however, a successful item appears in the Web browser in the task list for the following operation: "Find Virtual Machine By Datastore Path"









          • 2. Re: Vmrun cannot find the VM
            Jim B Novice


            Ok,  I think I figured it out, and I hope this solves other people's issues.  Make sure your machine is running and then issue the "list" operation.  This will give you the definitive path using the storage path.  It is critical you use the exact same path and make sure your parameters match the case of the paths returned by the list operation. 



            Why is this like this?  If I had to venture a guess, a lot of VMWare's stuff is configured via XML files and XML is case-sensitive, not to mention that there's got to be a ton of shared code between the Windows and *nix platform and unix is also case-sensitive.  IMO, this is a bug that should be fixed, in particular in the "Find virtual machine by datastore" operation, it should not have returned success.  Just part of the joys of cross platform development!



            Hope this helps.






            • 3. Re: Vmrun cannot find the VM
              jhope Novice

              i have this problem as well "cannot find..."




              Jim, what is this 'list' operation and how do i run it?













              had the path right...the fact i didn't realize it was case sensitive :|

              • 4. Re: Vmrun cannot find the VM
                Banzinho Novice





                Good to know another method to make it work.



                I've found that deleting datastores definition, adding a new datastore, copying all my VM's to this new datastore and running the commands works too. I think there's something when upgrading from vm server 1 in the problem.



                  Maybe is the xml that it's been generated again or something..






                Thanks for the help!












                • 5. Re: Vmrun cannot find the VM
                  Jim B Novice


                  To get a list of the storage paths, just run the following.  Be aware that this command only returns virtual machines that are running, not simply registered.



                  vmrun.exe -T server -h -u myuser -p mypass list



                  • 6. Re: Vmrun cannot find the VM
                    Jim B Novice

                    It should be noted that the machine I'm working on has had several of the beta's and RC1 installed, but I was good about uninstalling prior to the next build being installed.  I'm going to guess that Estefan's fix of recreating the datastore may have fixed a formatting issue with the xml files VMWare uses and that hopefully people that use VMWare Server on a clean machine don't come across this problem.  My assumption here is that the xml files were carried over from previous builds and there might have been some sort of incompatibility between them (but heck, you can't expect config files between beta/RC builds to be backwards compatible).  Just glad we were able to help eachother out.

                    • 7. Re: Vmrun cannot find the VM
                      omm Novice


                      This happen when you upgrade Vmware Server 1.x to 2.x because in VMware Server 2 the virtual machine path is "storage" +" path" (like ESX) with ver 1.x only with local host path (es C:\Virtual Machine\...)



                      • 8. Re: Vmrun cannot find the VM
                        rkrewinkel Lurker


                        Who designed this....



                        use: vmrun -T server -h https://myserver:port/sdk -u username -p password stop "[standard] subdir/machine.vmx"



                        where "[standard]" is quite literraly yo u default setting for your datastore.... (I've actually had to type '[standard] <space> subdir/machine.vmx' before this worked.....)



                        • 9. Re: Vmrun cannot find the VM
                          omm Novice


                          The right syntax is    " VirtualMachineDirectory/VirtualMachine.vmx"  where is the storage node where the virtual machine files live, but this path is only for Virtual machine created with Server 2.x, if you have old vitual machine the path is with previous syntax (es. "C:\Virtual Machine\Virtual Machine directory\Virtual Machine.vmx")




                          .....excuse me fo my english..



                          • 10. Re: Vmrun cannot find the VM
                            jason1365 Lurker

                            First, get the list of VMs:

                            vmrun -h https://localhost:8333/sdk -u USER -p PASSWORD listRegisteredVM


                            Returns something like:

                            \[VMWare] fedora9/Fedora 9.vmx

                            \[VMWare] MindTouch_Deki_Wiki_Jay_Cooke_8.05.2_VM/MindTouch_Deki_Wiki/Deki_Wiki_Jay_Cooke_8.05.2_VM.vmx

                            \[VMWare] Win2003ServerStd/Windows Server 2003 Standard Edition.vmx

                            \[VMWare] fedora-9-i386/fedora-9-i386.vmx

                            \[VMWare] WinXPPro1/Windows XP Professional.vmx

                            \[VM] XPvmware/CafeXP.vmx


                            Now start up the VM you'd like:

                            cd C:\Program Files\VMware\VMware Server

                            vmrun -h https://localhost:8333/sdk -u USER -p PASSWORD start "\[VMWare] WinXPPro1/Windows XP Professional.vmx" nogui


                            The key is to use the exact line shown above for the VM you want to manage.

                            • 11. Re: Vmrun cannot find the VM
                              spsammy Novice

                              For the record, and any future google searches, Jim B's trick helped me.  I'm running VMWare Server 2.0 (from scratch, not an upgrade) on Vista 64.

                              • 12. Re: Vmrun cannot find the VM
                                mwic Lurker

                                I also have this, but none of the above helped


                                my command is


                                vmrun -T server -u  me -p pw -h https://localhost:8333/sdk  start /var/lib/vmware/Virtual\ Machines/magento-1.1.5/JumpBox.vmx nogui





                                resp is







                                Error: Cannot open VM: /var/lib/vmware/Virtual Machines/magento-1.1.5/JumpBox.vmx, The virtual machine cannot be found




                                Another update:



                                I figured out enough of the datastore concept to use



                                vmrun -T server -u  mcrouch -p PW -h https://localhost:8333/sdk  start "[standard] magento-1.1.5/JumpBox.vmx" nogui



                                which chugs along for about 30 seconds and then says



                                Error: Unknown error

                                • 13. Re: Vmrun cannot find the VM
                                  wduncanSF Lurker


                                  Maybe I should start a new thread,  I am trying to use vmrun start to create a new VM on VMserver based on a pre-created VMX file.



                                  The VMserver is on Linux host. . .  if that makes a difference.   I get these same errors.    It makes sense based on the solutions above since there isn't a vmx file in the standard storage area.






                                  • 14. Re: Vmrun cannot find the VM
                                    david_hay@uk.ibm.com Lurker


                                    I was also seeing the exception: -



                                    Error: The virtual machine cannot be found



                                    when using the VMRUN command ( I'm running VMware Server 2.0 on Ubuntu 9.0.4 64-bit ) as follows: -



                                    vmrun -t server -h https://hostname.domainname.com:8333/sdk -u root -p passw0rd register "/vmwares/domino/Virtual\ Machine.vmx"



                                    Having validated the path to the .VMX file ( /vmwares is a mount point for a 1 TB drive formatted as EXT4 ), I was also baffled.



                                    The syntax of the VMRUN command does imply a logical/physical path to the VM: -



                                    " vm/myVM.vmx"



                                    and I was missing the obvious - the phrase .



                                    I followed the advice given here to start a VM from the Web UI and then issue the command: -



                                    vmrun -t server -h https://hostname.domainname.com:8333/sdk -u root -p passw0rd list



                                    which showed the running VM as: -



                                    domino/Virtual\ Machine.vmx



                                    Once I had this ( slightly strange ) "path", I was good to go.



                                    I can now start my VM as follows: -



                                    vmrun -t server -h https://hostname.domainname.com:8333/sdk -u root -p passw0rd start "[VMwares on Samsung] domino/Virtual\ Machine.vmx"



                                    and, if I want to be mean, stop it as follows: -



                                    +vmrun -t server -h https://hostname.domainname.com:8333/sdk -u root

                                    -p passw0rd stop "[VMwares on Samsung] domino/Virtual\ Machine.vmx"+






                                    1 2 Previous Next