VMware

This Question is Answered

2 "helpful" answers available (6 pts)
14 Replies Last post: Oct 22, 2009 9:03 AM by david_hay@uk.…  

Vmrun cannot find the VM posted: Sep 29, 2008 1:50 PM

Click to view Banzinho's profile Novice 4 posts since
Feb 7, 2006
Hi,

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 https://192.168.0.200:8333/sdk -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 https://192.168.0.200:8333/sdk -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

Regards.

Esteban.


Re: Vmrun cannot find the VM

1. Oct 1, 2008 9:48 PM in response to: Banzinho
Click to view Jim B's profile Novice 8 posts since
Aug 23, 2005

Esteban,

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 standard... 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: standard ...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"

-Jim

Re: Vmrun cannot find the VM

2. Oct 1, 2008 10:02 PM in response to: Banzinho
Click to view Jim B's profile Novice 8 posts since
Aug 23, 2005

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.

-Jim

Re: Vmrun cannot find the VM

3. Oct 2, 2008 5:51 AM in response to: Jim B
Click to view jhope's profile Novice 6 posts since
Dec 14, 2007
i have this problem as well "cannot find..."


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


thanks.

n/m.

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

Re: Vmrun cannot find the VM

5. Oct 2, 2008 9:52 PM in response to: jhope
Click to view Jim B's profile Novice 8 posts since
Aug 23, 2005

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

Re: Vmrun cannot find the VM

6. Oct 2, 2008 9:58 PM in response to: Banzinho
Click to view Jim B's profile Novice 8 posts since
Aug 23, 2005
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.

Re: Vmrun cannot find the VM

7. Oct 7, 2008 6:39 AM in response to: Jim B
Click to view omm's profile Novice 8 posts since
Apr 27, 2005

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\...)

Re: Vmrun cannot find the VM

8. Oct 20, 2008 6:34 AM in response to: omm
Click to view rkrewinkel's profile Lurker 3 posts since
Apr 25, 2008

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

Re: Vmrun cannot find the VM

9. Oct 20, 2008 7:26 AM in response to: rkrewinkel
Click to view omm's profile Novice 8 posts since
Apr 27, 2005

The right syntax is "standard VirtualMachineDirectory/VirtualMachine.vmx" where Standard 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..

Re: Vmrun cannot find the VM

10. Feb 4, 2009 8:01 PM in response to: Banzinho
Click to view jason1365's profile Lurker 1 posts since
Feb 4, 2009
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.

Re: Vmrun cannot find the VM

11. Mar 6, 2009 3:02 AM in response to: Jim B
Click to view spsammy's profile Novice 8 posts since
Aug 7, 2007
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.

Re: Vmrun cannot find the VM

12. Mar 26, 2009 12:38 PM in response to: spsammy
Click to view mwic's profile Lurker 1 posts since
Mar 26, 2009
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

Re: Vmrun cannot find the VM

13. Apr 27, 2009 7:59 AM in response to: mwic
Click to view wduncanSF's profile Lurker 4 posts since
Apr 27, 2009

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.

Thanks,

Re: Vmrun cannot find the VM

14. Oct 22, 2009 9:03 AM in response to: wduncanSF
Click to view david_hay@uk.ibm.com's profile Lurker 1 posts since
Jun 22, 2008

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: -

"storage1 vm/myVM.vmx"

and I was missing the obvious - the phrase storage1.

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: -

VMwares on Samsung 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"+

Simple :-)

VMware Beta Programs

Want to be Considered for Future Beta Programs?

Learn More

VMware Developer

Download SDKs, APIs, videos,
training, and more in the Developer community.

Learn More

Developer
Sample Code

Increase your developer productivity with VMware API sample code.

Learn More

VMworld
Sessions & Labs

Online access to the latest VMworld Sessions & Labs and online services.

Learn more

Purchase PSO Credits Online

Purchase credits to redeem training and consulting services online.

Buy Now

Community Hardware Software

View reported configurations or report your own.

Learn More

Only VMware ... Delivers Nexus 1000V

Ensure consistent, policy-based network capabilities to virtual machines across your data center.

Learn More

Communities