VMware Communities
Bret_Palsson
Contributor
Contributor

Your Mac reboots with a VM running... What I did to fix the .WRITELOCK

So my machine was unplugged by an employee at the SCUBA shop that I do their computer work for. I have the macmini start up a VM at startup of os X which works fine unless the .WRITELOCK files were not deleted because the VM was still running when the machine was unplugged.

To keep this from happening again I created a shell script with the following:

#!/usr/bin/sh

rm -f /Users/admin/vmware/Windows\ Server\ 2003\ Enterprise\ Edition/*.WRITELOCK

Then I saved the file as: startupcommands.commands

and placed it in the startup items in os x.

This then deletes all the WRITELOCK files if there are any before the VM's startup.

Message was edited by:

Bret Palsson

VCP
0 Kudos
2 Replies
rcardona2k
Immortal
Immortal

>So my machine was unplugged by an employee at the SCUBA shop that I do their computer work for.

nice...

In case you add more VMs and/or rename your VM's folder, here's a more generic script:

#!/usr/bin/sh

find /Users/admin/vmware -name "*.WRITELOCK" -exec rm -f \{} \;

0 Kudos
Bret_Palsson
Contributor
Contributor

Great suggestion! I will modify my script right now. I hadn't considered having multiple VM's yet, but I probably will find the need here in a week or so.

VCP
0 Kudos