Automate a pause on the VM

Discussion in 'Parallels Desktop for Mac' started by sdlavergne, Mar 27, 2007.

  1. sdlavergne

    sdlavergne Junior Member

    Messages:
    13
    I want to schedule a VM to pause every day so that I can back it up. (I have tested and super duper or simply a copy of a paused VM is bootable.)

    Anyway, does anyone know how I could schdedule a pause and unpause?
     
  2. Eru Ithildur

    Eru Ithildur Forum Maven

    Messages:
    1,954
    Have you looked at Applescript?
     
  3. sdlavergne

    sdlavergne Junior Member

    Messages:
    13
    Not yet, I am not to familiar with Apple Script. I'll check into it. Thanks!
     
  4. Eru Ithildur

    Eru Ithildur Forum Maven

    Messages:
    1,954
    Apple has a guide on their site to using it. It sounds like it would accomplish what you need. It is in the developers section: http://www.apple.com/developers
     
  5. sdlavergne

    sdlavergne Junior Member

    Messages:
    13
    This is a direct link to Apple's guide. http://developer.apple.com/documentation/AppleScript/Conceptual/AppleScriptLangGuide/

    I searched around and found that Parallels is not a "scriptable" application. (I could be wrong, but I couldn't get the dictionary to open.) I then found out that Parallels will automatically suspend the OS on closing. (Which is a preference setting in Parallels.)

    I have had some success with Applescript just in closing and opening the application, but this wouldn't open the specific OS that I needed.

    FYI, The Applescript command, "tell application "Parallels Desktop" to quit" (without quotes) will shut down Parallels. Any open OS's will suspend. You can open Parallels with the command "launch "parallels Desktop"", but I still have to choose the OS I want to load.

    I then turned to Automator and I was able to open the OS I needed. I think this will work. All I need to do now is test that my OS will suspend properly. (Since it is Small Business Server running Exchange it might not.)

    Anyway, if suspend works I am going to suspend my OS, start a super duper backup of the drive a minute or two later, and then launch the OS again after the backup should be completed. This way If anything happens to the server I can restore the backup in moments from another computer.

    Thanks for the help! I'll let you know if it works like I am hoping.
     
  6. sdlavergne

    sdlavergne Junior Member

    Messages:
    13
    It looks like it is working. FYI, originally I wanted to pause the OS, but I just realized that a suspend is better. With a suspend RAM is written to the Parallels folder. When I started up a backed up OS from a pause, Windows 2003 wanted to know why I had shutdown unexpectedly. Windows 2003 appears to be starting up from a suspend without trouble.

    I am scheduling it with iCal. So far so good!
     

Share This Page