A couple of points to make. Firstly, from what you've described it sounds more like a tendonitis than it sounds like a myositis. Secondly and more importantly, I am a physician, and I am capable of making these diagnoses only to patients whom I interact with in a more personal manner. You are not in that category, and if you really want a definitive diagnosis you need to visit your physician.
To answer your question concerning appropriate training, the reason that this is happening (in my opinion) is that your tendons are taking more work than they can handle and they are sick of it. In order to correct this, they need to be stronger. There are a few ways you can accomplish this. First of all, I recommend you only do exercises that take you up to a level 5/10 pain (not discomfort but actual pain, if you experience no pain and only discomfort you can do whatever you like). As for the exercises, squats, deadlifts, lunges, leg press...etc. Stay away from the machines (quad extension, ab/adductor, glute thingy). Those all can put your muscles in eccentric positions that can actually strain tendons far worse than they currently are. This does however mean that you can run as long as it isn't painful, running slower and shorter isn't going to decrease your healing that much. You probably want to get some hill work in though (keep that short and fast to actually build strength). Lastly, STREEEEEEEEEEEETCCCCCCCCCCCHHHHHHH. I don't typically recommend stretching for runners, there isn't enough evidence to suggest that excessive flexibility does anything to benefit runners and I'd rather them spend that time doing core or weightlifting. In your case however, your tendons need to be relaxed, so stretch them.
https://www.youtube.com/user/physicaltherapyvideoI highly recommend the advice that these physical therapists give out. I recommend you scroll through their video list and find whatever they say about hamstrings and incorporate it into your training in the future at least until you heal up.
Cheers.