• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1616
  • Last Modified:

How to suspend and resume a virtual machine from the command line in Vmware 7 Workstation on XP Pro?

I need to be able to suspend a VM, do a backup and restart the VM on an XP Pro box using Vmware Workstation 7 from the command line.

Anybody done this?
0
cerksees
Asked:
cerksees
2 Solutions
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
The vmrun command is responsible for command line control of VMs in workstation.

yes it's possible

this is the suspend command usage

vmrun suspend "C:\Documents and Settings\<user>\My Documents\My Virtual Machines\WinXP\WinXP.vmx"

You may want to complete the operation when the virtual mnachine is live, so you would create a snapshot with the follwowing command

vmrun -T ws snapshot /path/to/vm/Ubuntu/Ubuntu.vmx mySnapshot

and then copy the vmdk as before, and then delete the snapshot afterwards, this is how many third party backups operate.


Here's the PDF manual for reference to other commands.

http://www.vmware.com/pdf/vix160_vmrun_command.pdf
0
 
cerkseesAuthor Commented:
To be clear, here are the two commands that I used exactly as I used them.

To SUSPEND Vmware Workstation's running virtual machine on Windows XP Pro...
vmrun -T ws suspend "C:\Documents and Settings\User\My Documents\My Virtual Machines\Windows Server 2003 Enterprise Edition\Windows Server 2003 Enterprise Edition.vmx"

Open in new window


To RESTART the same vm after my backup ran on Windows XP Pro...
vmrun -T ws start "C:\Documents and Settings\User\My Documents\My Virtual Machines\Windows Server 2003 Enterprise Edition\Windows Server 2003 Enterprise Edition.vmx"

Open in new window


Enjoy.
0
 
NVITCommented:
I'm confused... The OP didn't mention doing the suggested snapshot in his post of the steps he took.

1. What is the purpose of the snapshot step http://www.experts-exchange.com/Software/Virtualization/Q_27025853.html#a35719102 above?

2. Do you do both the SUSPEND command before that and then the SNAPSHOT command?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now