Scripting Parallels Mounter

Discussion in 'General Questions' started by GregS1, Apr 12, 2015.

  1. GregS1

    GregS1 Bit poster

    Messages:
    2
    I want to back up a few critical files in a VM each night from a script. I've noticed that if you try to mount a volume in a suspended VM, you get a modal dialog, which will hang the script. I've also noticed that when a VM is suspended, there is a somethingsomething.mem file in the bundle, and when it is running, there is also a somethingsomething.mem.sh file. This makes it easy to figure out the state of the VM among Shutdown, Suspended, and Running, and I've set up my script to try mounting only if the status is Shutdown (no *.mem or *.mem.sh files).

    My question is, to what extent is this approach a kludge that is likely to be broken by the next update of Parallels Desktop?

    Other questions: is there a less kludgy way to determine the VM's status? Is there some way to bypass the modal dialog that pops up when you try to mount a suspended VM when all you want to do is read, never write, the volume?

    Thanks.
     

Share This Page