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"
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.
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 :|
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!
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 https://192.168.0.200:8333/sdk -u myuser -p mypass list
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.
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\...)
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.....)
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..
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] Win2003ServerStd/Windows Server 2003 Standard Edition.vmx
\[VMWare] WinXPPro1/Windows XP Professional.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.
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.
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
Error: Cannot open VM: /var/lib/vmware/Virtual Machines/magento-1.1.5/JumpBox.vmx, The virtual machine cannot be found
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
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.
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: -
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: -
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"+