skip to main | skip to sidebar

Breaking Builds Since 2008

Pages

  • Home

Wednesday, 21 March 2012

Power on VMWare from command line

We were having some issues were our virtual machines were running unproductivly slowly or at times completely unresponsive.  Eventually we identified that the problem was with the VMWare Workstation we were using to access the machine, and not virtual machine itself.

To power on a virtual machine from the command line and then open it using remote desktop, thus avoiding having to use the workstation:
(Obviously fix the paths and names for your own machine and it might take a little while before the machine is ready to be accessed.)
cd "C:\Program Files (x86)\VMware\VMware Workstation"
vmrun start "C:\VM Images\MyVirtualMachine.vmx" nogui
mstsc /v:MyVirtualMachine

And to power down:
cd "C:\Program Files (x86)\VMware\VMware Workstation"  
vmrun stop "C:\VM Images\MyVirtualMachine.vmx"

Additionally I have seen that if you power the virtual machine off and on again it is possable for its ip address to change. To re-discover it just flush the dns cache before running the power on command:
ipconfig /flushdns
Posted by Mike at 04:24 0 comments Email This BlogThis! Share to X Share to Facebook
Newer Posts Older Posts Home

About Me

Mike
Keen on all things C#.
View my complete profile

Blog Archive

  • ►  2014 (1)
    • ►  July (1)
  • ►  2013 (1)
    • ►  August (1)
  • ▼  2012 (1)
    • ▼  March (1)
      • Power on VMWare from command line
  • ►  2011 (5)
    • ►  August (2)
    • ►  July (3)

Followers

Powered by Blogger.
 
Copyright (c) 2010 Breaking Builds Since 2008. Designed for Video Games
Download Christmas photos, Public Liability Insurance, Premium Themes