When I first got my milking machine I just ran it by itself in the goat shed - and yes to start with they completely went berserk in their pens, but it only took a few times of it being on that they didn't bat an eye lid. Then next step was to have it on while they were on the milking bench but still hand-milked, then after a few days I just put the clusters on and held onto the goat... it was fine after a few times.
Now as the machine is on regularly all the time my 1st kidders are not disturbed by it at all, although still a bit of kicking when they are put on the first few times. But I have found it easier to start off milking them on the machine rather than by hand - it leaves both hands free to steady the goat and make sure she doesn't kick the clusters off. They normally settle quite quickly into a routine. Also putting the clusters on from the back (as they would in a commercial milking parlour) means they can't kick them off as easily.