Tech

Guides
 

Remotely control VMware Server machines

By Vincent Danen, TechRepublic
Monday, June 12, 2006 10:44 AM
Learn to control VMware Server from the command line.
The ability of VMware Server to run virtual machines "behind-the-scenes" is a great boon. This means you no longer have to have the GUI screen open on your desktop, taking up valuable screen real-estate. It also means that you can switch your virtual machines to another machine that is constantly up and have your virtual machines available to you at any time, keeping them up and running around the clock.

Running the server without a GUI interface makes it more difficult to control the machines, but with a little effort, you can get the same functionality via the command line. You will still want the GUI in order to change configuration options and create new machines, however.

The vmware-cmd program is your gateway to controlling virtual machines. The general syntax of the vmware-cmd for use with a VMware Server instance on the same machine is:

$ vmware-cmd [config] [option] ...

Assume you have a virtual machine of Mandriva in /var/lib/vmware/Virtual Machines/Mandriva. To get the status of the machine--whether it's on or off--you would use:

$ vmware-cmd /var/lib/vmware/Virtual\ Machines/Mandriva/Mandriva.vmx getstate VMControl: use vnc for unifiedDraw getstate() = off

As you can see, the virtual machine is turned off. To start this virtual machine you would use:

$ vmware-cmd /var/lib/vmware/Virtual\ Machines/Mandriva/Mandriva.vmx start VMControl: use vnc for unifiedDraw start() = 1

If you have the vmware-console running at the same time, you would see the virtual machine start. This is an easy way to start virtual machines at boot: simply call vmware-cmd with the configuration of each virtual machine that you want to start and the start command in a script like /etc/rc.d/rc.local.

Prior to shutting down your machine, you can signal the virtual machines in a similar manner by using the suspend command. This will suspend each virtual machine to disk, allowing you to issue the start command later to resume the machine from where you left off. Obviously, suspending a machine will make starting it up much faster than doing a full shutdown and start each time you have to restart the host system.

Looking at the output of vmware-cmd -h will give you a lot of other options that you can play with to manipulate virtual machines. The ability to start, suspend, and stop virtual machines from the command line (or a script) is perhaps vmware-cmd's most useful feature.



WORTHWHILE?

0

0 votes
Blog

Talkback 0 comments

There are currently no comments for this post.


Guest user

Guest user

Level: 
Joined: —
Already a member? Log in »



 

Loading...

Whitepapers/Case Studies

Downloads

Open Source News

 
Your complete guide to successful CRM
Discover how Oracle’s proven solutions deliver built-in best practices to increase sales, marketing & service effectiveness.


» Download your free CRM eBooks by Oracle now



Adapt to rapidly changing IT workloads
Get superior performance on demand and better energy usage.
» Ultimate virtualization blade
» Scalable SAN solution
» Accelerate service delivery


Tech Jobs Now!

Tags

  1. apache software foundation
  2. canada
  3. command
  4. e - mail
  5. environment
  6. fedora project
  7. file system
  8. gnome
  9. grep
  10. linux
  11. linux distribution
  12. mandriva
  13. mysql
  14. open source
  15. operating systems
  16. security
  17. server
  18. tool
  19. ubuntu
  20. vincent danen