Thanks John, but I don't understand your last post. The command you gave me seems to be in the wrong order, it only prints the disk id when rearranged.
I do understand where you are coming from Specimen and ideally I would spend all day learning bash and writing a program that edits the pvs file but this is for personal use only and I don't want to spend all day doing that. From what I've managed to pick up this morning with the help of John's command and without even knowing what commands to research I've constructed the following script which does the job as I originally intended it to. Feel free to provide improvements or give me some direction on how I could make it edit the .pvs file, but for now this works.
cd "/Users/nick/Documents/Parallels/Microsoft Windows XP"
disk=`diskutil list |grep -v /| grep disk | grep '.Windows extended' | awk '{ print $NF }'`
case $disk in
"disk1s2") cp 1.pvs "Microsoft Windows XP.pvs";
;;
"disk2s2") cp 2.pvs "Microsoft Windows XP.pvs";
;;
*) cp 0.pvs "Microsoft Windows XP.pvs";
;;
esac
A better solution would be if parallels did this for you and allowed you to manually select the partition by name in the virtual machine settings, maybe we will see this someday.
Edit: That didn't work at all, corrected.
Last edited: Aug 29, 2008